Commit 81ed24dd04a9524e59c08248af3647dae5830d56

Authored by Romain Deveaud
1 parent 4b35d22277
Exists in master

modules revamp.

Showing 63 changed files with 2301 additions and 669 deletions Inline Diff

doc/classes/Corpus.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: Corpus [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">Corpus</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../files/lib/rir/corpus_rb.html">
57
58 lib/rir/corpus.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 Object
74
75 </td>
76 </tr>
77
78 </table>
79 </div>
80 <!-- banner header -->
81
82 <div id="bodyContent">
83
84 <div id="contextContent">
85
86 </div>
87
88
89 <div id="method-list">
90 <h3 class="section-bar">Methods</h3>
91
92 <div class="name-list">
93
94 <a href="#M000002">files</a>&nbsp;&nbsp;
95
96 <a href="#M000001">new</a>&nbsp;&nbsp;
97
98 </div>
99 </div>
100
101 </div>
102
103 <!-- if includes -->
104
105 <div id="section">
106
107
108
109 <div id="attribute-list">
110 <h3 class="section-bar">Attributes</h3>
111
112 <div class="name-list">
113 <table>
114
115 <tr class="top-aligned-row context-row">
116 <td class="context-item-name">path</td>
117
118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
119
120 <td class="context-item-desc"></td>
121 </tr>
122
123 </table>
124 </div>
125 </div>
126
127
128 <!-- if method_list -->
129
130 <div id="methods">
131
132 <h3 class="section-bar">Public Class methods</h3>
133
134
135 <div id="method-M000001" class="method-detail">
136 <a name="M000001"></a>
137
138 <div class="method-heading">
139
140 <a href="Corpus.src/M000001.html" target="Code" class="method-signature"
141 onclick="popupCode('Corpus.src/M000001.html');return false;">
142
143 <span class="method-name">new</span><span class="method-args">(path)</span>
144
145 </a>
146
147 </div>
148
149 <div class="method-description">
150
151 </div>
152 </div>
153
154
155 <h3 class="section-bar">Public Instance methods</h3>
156
157
158 <div id="method-M000002" class="method-detail">
159 <a name="M000002"></a>
160
161 <div class="method-heading">
162
163 <a href="Corpus.src/M000002.html" target="Code" class="method-signature"
164 onclick="popupCode('Corpus.src/M000002.html');return false;">
165
166 <span class="method-name">files</span><span class="method-args">()</span>
167
168 </a>
169
170 </div>
171
172 <div class="method-description">
173
174 <p>
175 Recursively outputs all files in <tt>self.path</tt>. WARNING ! This
176 function may take a lot of time if many files are in subdirectories.
177 </p>
178 <pre>
179 c = Corpus.new &quot;my/path&quot;
180 c.files # =&gt; [&quot;README.txt&quot;, &quot;lib/code.rb&quot;]
181 </pre>
182
183 </div>
184 </div>
185
186
187
188 </div>
189
190
191
192
193 </div>
194
195 <div id="validator-badges">
196 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
197 </div>
198
199 </body>
200 </html>
201
doc/classes/Corpus.src/M000001.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>new (Corpus)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/corpus.rb, line 25</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>)
12 <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">chomp</span> <span class="ruby-value str">&quot;/&quot;</span>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/Corpus.src/M000002.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>files (Corpus)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/corpus.rb, line 35</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>
12 <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{@path}/**/*.*&quot;</span>]
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/Indri.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Module: Indri [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Module</strong></td>
49 <td class="class-name-in-header">Indri</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../files/lib/rir/query_rb.html">
57
58 lib/rir/query.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 </table>
70 </div>
71 <!-- banner header -->
72
73 <div id="bodyContent">
74
75 <div id="contextContent">
76
77 </div>
78
79
80 </div>
81
82 <!-- if includes -->
83
84 <div id="section">
85
86 <div id="class-list">
87 <h3 class="section-bar">Classes and Modules</h3>
88
89 Class <a href="Indri/IndriQuery.html" class="link">Indri::IndriQuery</a><br />
90 Class <a href="Indri/Parameters.html" class="link">Indri::Parameters</a><br />
91
92 </div>
93
94
95
96
97 <!-- if method_list -->
98
99
100
101
102 </div>
103
104 <div id="validator-badges">
105 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
106 </div>
107
108 </body>
109 </html>
110
doc/classes/Indri/IndriQuery.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: Indri::IndriQuery [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">Indri::IndriQuery</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/query_rb.html">
57
58 lib/rir/query.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 <a href="../Query.html">
74
75 Query
76
77 </a>
78
79 </td>
80 </tr>
81
82 </table>
83 </div>
84 <!-- banner header -->
85
86 <div id="bodyContent">
87
88 <div id="contextContent">
89
90 </div>
91
92
93 <div id="method-list">
94 <h3 class="section-bar">Methods</h3>
95
96 <div class="name-list">
97
98 <a href="#M000020">new</a>&nbsp;&nbsp;
99
100 <a href="#M000021">to_s</a>&nbsp;&nbsp;
101
102 </div>
103 </div>
104
105 </div>
106
107 <!-- if includes -->
108
109 <div id="section">
110
111
112
113 <div id="attribute-list">
114 <h3 class="section-bar">Attributes</h3>
115
116 <div class="name-list">
117 <table>
118
119 <tr class="top-aligned-row context-row">
120 <td class="context-item-name">id</td>
121
122 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
123
124 <td class="context-item-desc"></td>
125 </tr>
126
127 <tr class="top-aligned-row context-row">
128 <td class="context-item-name">params</td>
129
130 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
131
132 <td class="context-item-desc"></td>
133 </tr>
134
135 <tr class="top-aligned-row context-row">
136 <td class="context-item-name">query</td>
137
138 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
139
140 <td class="context-item-desc"></td>
141 </tr>
142
143 <tr class="top-aligned-row context-row">
144 <td class="context-item-name">rule</td>
145
146 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
147
148 <td class="context-item-desc"></td>
149 </tr>
150
151 </table>
152 </div>
153 </div>
154
155
156 <!-- if method_list -->
157
158 <div id="methods">
159
160 <h3 class="section-bar">Public Class methods</h3>
161
162
163 <div id="method-M000020" class="method-detail">
164 <a name="M000020"></a>
165
166 <div class="method-heading">
167
168 <a href="IndriQuery.src/M000020.html" target="Code" class="method-signature"
169 onclick="popupCode('IndriQuery.src/M000020.html');return false;">
170
171 <span class="method-name">new</span><span class="method-args">(id,query,params)</span>
172
173 </a>
174
175 </div>
176
177 <div class="method-description">
178
179 </div>
180 </div>
181
182
183 <h3 class="section-bar">Public Instance methods</h3>
184
185
186 <div id="method-M000021" class="method-detail">
187 <a name="M000021"></a>
188
189 <div class="method-heading">
190
191 <a href="IndriQuery.src/M000021.html" target="Code" class="method-signature"
192 onclick="popupCode('IndriQuery.src/M000021.html');return false;">
193
194 <span class="method-name">to_s</span><span class="method-args">()</span>
195
196 </a>
197
198 </div>
199
200 <div class="method-description">
201
202 </div>
203 </div>
204
205
206
207 </div>
208
209
210
211
212 </div>
213
214 <div id="validator-badges">
215 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
216 </div>
217
218 </body>
219 </html>
220
doc/classes/Indri/IndriQuery.src/M000020.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>new (Indri::IndriQuery)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/query.rb, line 62</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id</span>,<span class="ruby-identifier">query</span>,<span class="ruby-identifier">params</span>)
12 <span class="ruby-ivar">@params</span> = <span class="ruby-identifier">params</span>
13 <span class="ruby-comment cmt"># Here we set the default retrieval model as Language Modeling</span>
14 <span class="ruby-comment cmt"># with a Dirichlet smoothing at 2500.</span>
15 <span class="ruby-comment cmt"># TODO: maybe a Rule class...</span>
16 <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">rule</span> = <span class="ruby-value str">'method:dirichlet,mu:2500'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">rule</span>.<span class="ruby-identifier">nil?</span>
17
18 <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
19 <span class="ruby-ivar">@query</span> = <span class="ruby-identifier">query</span>
20 <span class="ruby-keyword kw">end</span></pre>
21 </body>
22 </html>
23
doc/classes/Indri/IndriQuery.src/M000021.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>to_s (Indri::IndriQuery)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/query.rb, line 73</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
12 <span class="ruby-identifier">h</span> = <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">to_s</span>
13 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;query&gt;\n&quot;</span>
14 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;number&gt;#{@id}&lt;/number&gt;\n&quot;</span>
15 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;text&gt;#{@query}&lt;/text&gt;\n&quot;</span>
16 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;/query&gt;\n&quot;</span>
17 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;/parameters&gt;&quot;</span>
18
19 <span class="ruby-identifier">h</span>
20 <span class="ruby-keyword kw">end</span></pre>
21 </body>
22 </html>
23
doc/classes/Indri/Parameters.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: Indri::Parameters [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">Indri::Parameters</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/query_rb.html">
57
58 lib/rir/query.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 Object
74
75 </td>
76 </tr>
77
78 </table>
79 </div>
80 <!-- banner header -->
81
82 <div id="bodyContent">
83
84 <div id="contextContent">
85
86 </div>
87
88
89 <div id="method-list">
90 <h3 class="section-bar">Methods</h3>
91
92 <div class="name-list">
93
94 <a href="#M000018">new</a>&nbsp;&nbsp;
95
96 <a href="#M000019">to_s</a>&nbsp;&nbsp;
97
98 </div>
99 </div>
100
101 </div>
102
103 <!-- if includes -->
104
105 <div id="section">
106
107
108
109 <div id="attribute-list">
110 <h3 class="section-bar">Attributes</h3>
111
112 <div class="name-list">
113 <table>
114
115 <tr class="top-aligned-row context-row">
116 <td class="context-item-name">baseline</td>
117
118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
119
120 <td class="context-item-desc"></td>
121 </tr>
122
123 <tr class="top-aligned-row context-row">
124 <td class="context-item-name">count</td>
125
126 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
127
128 <td class="context-item-desc"></td>
129 </tr>
130
131 <tr class="top-aligned-row context-row">
132 <td class="context-item-name">index_path</td>
133
134 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
135
136 <td class="context-item-desc"></td>
137 </tr>
138
139 <tr class="top-aligned-row context-row">
140 <td class="context-item-name">memory</td>
141
142 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
143
144 <td class="context-item-desc"></td>
145 </tr>
146
147 <tr class="top-aligned-row context-row">
148 <td class="context-item-name">offset</td>
149
150 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
151
152 <td class="context-item-desc"></td>
153 </tr>
154
155 <tr class="top-aligned-row context-row">
156 <td class="context-item-name">print_docs</td>
157
158 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
159
160 <td class="context-item-desc"></td>
161 </tr>
162
163 <tr class="top-aligned-row context-row">
164 <td class="context-item-name">print_query</td>
165
166 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
167
168 <td class="context-item-desc"></td>
169 </tr>
170
171 <tr class="top-aligned-row context-row">
172 <td class="context-item-name">rule</td>
173
174 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
175
176 <td class="context-item-desc"></td>
177 </tr>
178
179 <tr class="top-aligned-row context-row">
180 <td class="context-item-name">run_id</td>
181
182 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
183
184 <td class="context-item-desc"></td>
185 </tr>
186
187 </table>
188 </div>
189 </div>
190
191
192 <!-- if method_list -->
193
194 <div id="methods">
195
196 <h3 class="section-bar">Public Class methods</h3>
197
198
199 <div id="method-M000018" class="method-detail">
200 <a name="M000018"></a>
201
202 <div class="method-heading">
203
204 <a href="Parameters.src/M000018.html" target="Code" class="method-signature"
205 onclick="popupCode('Parameters.src/M000018.html');return false;">
206
207 <span class="method-name">new</span><span class="method-args">(corpus,mem=&quot;1g&quot;,count=&quot;1000&quot;,offset=&quot;1&quot;,run_id=&quot;default&quot;,print_query=false,print_docs=false)</span>
208
209 </a>
210
211 </div>
212
213 <div class="method-description">
214
215 </div>
216 </div>
217
218
219 <h3 class="section-bar">Public Instance methods</h3>
220
221
222 <div id="method-M000019" class="method-detail">
223 <a name="M000019"></a>
224
225 <div class="method-heading">
226
227 <a href="Parameters.src/M000019.html" target="Code" class="method-signature"
228 onclick="popupCode('Parameters.src/M000019.html');return false;">
229
230 <span class="method-name">to_s</span><span class="method-args">()</span>
231
232 </a>
233
234 </div>
235
236 <div class="method-description">
237
238 </div>
239 </div>
240
241
242
243 </div>
244
245
246
247
248 </div>
249
250 <div id="validator-badges">
251 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
252 </div>
253
254 </body>
255 </html>
256
doc/classes/Indri/Parameters.src/M000018.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>new (Indri::Parameters)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/query.rb, line 30</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">corpus</span>,<span class="ruby-identifier">mem</span>=<span class="ruby-value str">&quot;1g&quot;</span>,<span class="ruby-identifier">count</span>=<span class="ruby-value str">&quot;1000&quot;</span>,<span class="ruby-identifier">offset</span>=<span class="ruby-value str">&quot;1&quot;</span>,<span class="ruby-identifier">run_id</span>=<span class="ruby-value str">&quot;default&quot;</span>,<span class="ruby-identifier">print_query</span>=<span class="ruby-keyword kw">false</span>,<span class="ruby-identifier">print_docs</span>=<span class="ruby-keyword kw">false</span>)
12 <span class="ruby-ivar">@index_path</span> = <span class="ruby-identifier">corpus</span>
13 <span class="ruby-ivar">@memory</span> = <span class="ruby-identifier">mem</span>
14 <span class="ruby-ivar">@count</span> = <span class="ruby-identifier">count</span>
15 <span class="ruby-ivar">@offset</span> = <span class="ruby-identifier">offset</span>
16 <span class="ruby-ivar">@run_id</span> = <span class="ruby-identifier">run_id</span>
17 <span class="ruby-ivar">@print_query</span> = <span class="ruby-identifier">print_query</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;true&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;false&quot;</span>
18 <span class="ruby-ivar">@print_docs</span> = <span class="ruby-identifier">print_docs</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;true&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;false&quot;</span>
19 <span class="ruby-keyword kw">end</span></pre>
20 </body>
21 </html>
22
doc/classes/Indri/Parameters.src/M000019.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>to_s (Indri::Parameters)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/query.rb, line 40</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
12 <span class="ruby-identifier">h</span> = <span class="ruby-value str">&quot;&lt;parameters&gt;\n&quot;</span>
13 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;memory&gt;#{@memory}&lt;/memory&gt;\n&quot;</span>
14 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;index&gt;#{@index_path}&lt;/index&gt;\n&quot;</span>
15 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;count&gt;#{@count}&lt;/count&gt;\n&quot;</span>
16 <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@baseline</span>.<span class="ruby-identifier">nil?</span>
17 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;baseline&gt;#{@baseline}&lt;/baseline&gt;\n&quot;</span>
18 <span class="ruby-keyword kw">else</span>
19 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;rule&gt;#{@rule}&lt;/rule&gt;\n&quot;</span>
20 <span class="ruby-keyword kw">end</span>
21 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;queryOffset&gt;#{@offset}&lt;/queryOffset&gt;\n&quot;</span>
22 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;runID&gt;#{@run_id}&lt;/runID&gt;\n&quot;</span>
23 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;printQuery&gt;#{@print_query}&lt;/printQuery&gt;\n&quot;</span>
24 <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;printDocuments&gt;#{@print_docs}&lt;/printDocuments&gt;\n&quot;</span>
25
26 <span class="ruby-identifier">h</span>
27 <span class="ruby-keyword kw">end</span></pre>
28 </body>
29 </html>
30
doc/classes/Query.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: Query [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">Query</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../files/lib/rir/query_rb.html">
57
58 lib/rir/query.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 Object
74
75 </td>
76 </tr>
77
78 </table>
79 </div>
80 <!-- banner header -->
81
82 <div id="bodyContent">
83
84 <div id="contextContent">
85
86 </div>
87
88
89 </div>
90
91 <!-- if includes -->
92
93 <div id="section">
94
95
96
97
98 <!-- if method_list -->
99
100
101
102
103 </div>
104
105 <div id="validator-badges">
106 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
107 </div>
108
109 </body>
110 </html>
111
doc/classes/RIR.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>Module: RIR [RDoc Documentation]</title> 5 <title>Module: RIR [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="classHeader"> 45 <div id="classHeader">
46 <table class="header-table"> 46 <table class="header-table">
47 <tr class="top-aligned-row"> 47 <tr class="top-aligned-row">
48 <td><strong>Module</strong></td> 48 <td><strong>Module</strong></td>
49 <td class="class-name-in-header">RIR</td> 49 <td class="class-name-in-header">RIR</td>
50 </tr> 50 </tr>
51 <tr class="top-aligned-row"> 51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td> 52 <td><strong>In:</strong></td>
53 <td> 53 <td>
54 54
55 55
56 <a href="../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65
66 <a href="../files/lib/rir/corpus_rb.html">
67
68 lib/rir/corpus.rb
69
70 </a>
71
72
73 <br />
74
75
76 <a href="../files/lib/rir/query_rb.html">
77
78 lib/rir/query.rb
79
80 </a>
81
82
83 <br />
84
85
86 <a href="../files/lib/rir/string_rb.html"> 56 <a href="../files/lib/rir/string_rb.html">
87 57
88 lib/rir/string.rb 58 lib/rir/string.rb
89 59
90 </a> 60 </a>
91 61
92 62
93 <br /> 63 <br />
94 64
95 65
96 <a href="../files/lib/rir/document_rb.html"> 66 <a href="../files/lib/rir/document_rb.html">
97 67
98 lib/rir/document.rb 68 lib/rir/document.rb
99 69
100 </a> 70 </a>
101 71
102 72
103 <br /> 73 <br />
104 74
105 </td> 75 </td>
106 </tr> 76 </tr>
107 77
108 78
109 </table> 79 </table>
110 </div> 80 </div>
111 <!-- banner header --> 81 <!-- banner header -->
112 82
113 <div id="bodyContent"> 83 <div id="bodyContent">
114 84
115 <div id="contextContent"> 85 <div id="contextContent">
116 86
117 <div id="description"> 87 <div id="description">
118 <p> 88 <hr size="1"></hr><p>
119 This file is a part of an Information Retrieval oriented Ruby library
120 </p>
121 <p>
122 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
123 </p>
124 <p>
125 This program is free software: you can redistribute it and/or modify it
126 under the terms of the GNU General Public License as published by the Free
127 Software Foundation, either version 3 of the License, or (at your option)
128 any later version.
129 </p>
130 <p>
131 This program is distributed in the hope that it will be useful, but WITHOUT
132 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
133 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
134 more details.
135 </p>
136 <p>
137 You should have received a copy of the GNU General Public License along
138 with this program. If not, see <<a
139 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
140 </p>
141 <hr size="1"></hr><p>
142 This file is a part of an Information Retrieval oriented Ruby library
143 </p>
144 <p>
145 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
146 </p>
147 <p>
148 This program is free software: you can redistribute it and/or modify it
149 under the terms of the GNU General Public License as published by the Free
150 Software Foundation, either version 3 of the License, or (at your option)
151 any later version.
152 </p>
153 <p>
154 This program is distributed in the hope that it will be useful, but WITHOUT
155 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
156 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
157 more details.
158 </p>
159 <p>
160 You should have received a copy of the GNU General Public License along
161 with this program. If not, see <<a
162 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
163 </p>
164 <hr size="1"></hr><p>
165 This file is a part of an Information Retrieval oriented Ruby library
166 </p>
167 <p>
168 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
169 </p>
170 <p>
171 This program is free software: you can redistribute it and/or modify it
172 under the terms of the GNU General Public License as published by the Free
173 Software Foundation, either version 3 of the License, or (at your option)
174 any later version.
175 </p>
176 <p>
177 This program is distributed in the hope that it will be useful, but WITHOUT
178 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
179 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
180 more details.
181 </p>
182 <p>
183 You should have received a copy of the GNU General Public License along
184 with this program. If not, see <<a
185 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
186 </p>
187 <hr size="1"></hr><p>
188 This file is a part of an Information Retrieval oriented Ruby library
189 </p>
190 <p>
191 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
192 </p>
193 <p>
194 This program is free software: you can redistribute it and/or modify it
195 under the terms of the GNU General Public License as published by the Free
196 Software Foundation, either version 3 of the License, or (at your option)
197 any later version.
198 </p>
199 <p>
200 This program is distributed in the hope that it will be useful, but WITHOUT
201 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
202 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
203 more details.
204 </p>
205 <p>
206 You should have received a copy of the GNU General Public License along
207 with this program. If not, see <<a
208 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
209 </p>
210 <hr size="1"></hr><p>
211 General module for many purposes related to Information Retrieval. 89 General module for many purposes related to Information Retrieval.
212 </p> 90 </p>
213 91
214 </div> 92 </div>
215 93
216 </div> 94 </div>
217 95
218 96
219 </div> 97 </div>
220 98
221 <!-- if includes --> 99 <!-- if includes -->
222 100
223 <div id="section"> 101 <div id="section">
224 102
225 <div id="class-list"> 103 <div id="class-list">
226 <h3 class="section-bar">Classes and Modules</h3> 104 <h3 class="section-bar">Classes and Modules</h3>
227 105
228 Module <a href="RIR/Indri.html" class="link">RIR::Indri</a><br /> 106 Class <a href="RIR/Document.html" class="link">RIR::Document</a><br />
229 Module <a href="RIR/TreeTagger.html" class="link">RIR::TreeTagger</a><br />
230 Class <a href="RIR/Corpus.html" class="link">RIR::Corpus</a><br />
231 Class <a href="RIR/Document.html" class="link">RIR::Document</a><br />
232 Class <a href="RIR/Query.html" class="link">RIR::Query</a><br />
233 Class <a href="RIR/WebDocument.html" class="link">RIR::WebDocument</a><br /> 107 Class <a href="RIR/WebDocument.html" class="link">RIR::WebDocument</a><br />
234 Class <a href="RIR/WikipediaPage.html" class="link">RIR::WikipediaPage</a><br /> 108 Class <a href="RIR/WikipediaPage.html" class="link">RIR::WikipediaPage</a><br />
235 109
236 </div> 110 </div>
237 111
238 <div id="constants-list"> 112 <div id="constants-list">
239 <h3 class="section-bar">Constants</h3> 113 <h3 class="section-bar">Constants</h3>
240 114
241 <div class="name-list"> 115 <div class="name-list">
242 <table summary="Constants"> 116 <table summary="Constants">
243 117
244 <tr class="top-aligned-row context-row"> 118 <tr class="top-aligned-row context-row">
245 <td class="context-item-name">Stoplist</td> 119 <td class="context-item-name">Stoplist</td>
246 <td>=</td> 120 <td>=</td>
247 <td class="context-item-value">[ &quot;a&quot;, &quot;anything&quot;, &quot;anyway&quot;, &quot;anywhere&quot;, &quot;apart&quot;, &quot;are&quot;, &quot;around&quot;, &quot;as&quot;, &quot;at&quot;, &quot;av&quot;, &quot;be&quot;, &quot;became&quot;, &quot;because&quot;, &quot;become&quot;, &quot;becomes&quot;, &quot;becoming&quot;, &quot;been&quot;, &quot;before&quot;, &quot;beforehand&quot;, &quot;behind&quot;, &quot;being&quot;, &quot;below&quot;, &quot;beside&quot;, &quot;besides&quot;, &quot;between&quot;, &quot;beyond&quot;, &quot;both&quot;, &quot;but&quot;, &quot;by&quot;, &quot;can&quot;, &quot;cannot&quot;, &quot;canst&quot;, &quot;certain&quot;, &quot;cf&quot;, &quot;choose&quot;, &quot;contrariwise&quot;, &quot;cos&quot;, &quot;could&quot;, &quot;cu&quot;, &quot;day&quot;, &quot;do&quot;, &quot;does&quot;, &quot;doesn't&quot;, &quot;doing&quot;, &quot;dost&quot;, &quot;doth&quot;, &quot;double&quot;, &quot;down&quot;, &quot;dual&quot;, &quot;during&quot;, &quot;each&quot;, &quot;either&quot;, &quot;else&quot;, &quot;elsewhere&quot;, &quot;enough&quot;, &quot;et&quot;, &quot;etc&quot;, &quot;even&quot;, &quot;ever&quot;, &quot;every&quot;, &quot;everybody&quot;, &quot;everyone&quot;, &quot;everything&quot;, &quot;everywhere&quot;, &quot;except&quot;, &quot;excepted&quot;, &quot;excepting&quot;, &quot;exception&quot;, &quot;exclude&quot;, &quot;excluding&quot;, &quot;exclusive&quot;, &quot;far&quot;, &quot;farther&quot;, &quot;farthest&quot;, &quot;few&quot;, &quot;ff&quot;, &quot;first&quot;, &quot;for&quot;, &quot;formerly&quot;, &quot;forth&quot;, &quot;forward&quot;, &quot;from&quot;, &quot;front&quot;, &quot;further&quot;, &quot;furthermore&quot;, &quot;furthest&quot;, &quot;get&quot;, &quot;go&quot;, &quot;had&quot;, &quot;halves&quot;, &quot;hardly&quot;, &quot;has&quot;, &quot;hast&quot;, &quot;hath&quot;, &quot;have&quot;, &quot;he&quot;, &quot;hence&quot;, &quot;henceforth&quot;, &quot;her&quot;, &quot;here&quot;, &quot;hereabouts&quot;, &quot;hereafter&quot;, &quot;hereby&quot;, &quot;herein&quot;, &quot;hereto&quot;, &quot;hereupon&quot;, &quot;hers&quot;, &quot;herself&quot;, &quot;him&quot;, &quot;himself&quot;, &quot;hindmost&quot;, &quot;his&quot;, &quot;hither&quot;, &quot;hitherto&quot;, &quot;how&quot;, &quot;however&quot;, &quot;howsoever&quot;, &quot;i&quot;, &quot;ie&quot;, &quot;if&quot;, &quot;in&quot;, &quot;inasmuch&quot;, &quot;inc&quot;, &quot;include&quot;, &quot;included&quot;, &quot;including&quot;, &quot;indeed&quot;, &quot;indoors&quot;, &quot;inside&quot;, &quot;insomuch&quot;, &quot;instead&quot;, &quot;into&quot;, &quot;inward&quot;, &quot;inwards&quot;, &quot;is&quot;, &quot;it&quot;, &quot;its&quot;, &quot;itself&quot;, &quot;just&quot;, &quot;kind&quot;, &quot;kg&quot;, &quot;km&quot;, &quot;last&quot;, &quot;latter&quot;, &quot;latterly&quot;, &quot;less&quot;, &quot;lest&quot;, &quot;let&quot;, &quot;like&quot;, &quot;little&quot;, &quot;ltd&quot;, &quot;many&quot;, &quot;may&quot;, &quot;maybe&quot;, &quot;me&quot;, &quot;meantime&quot;, &quot;meanwhile&quot;, &quot;might&quot;, &quot;moreover&quot;, &quot;most&quot;, &quot;mostly&quot;, &quot;more&quot;, &quot;mr&quot;, &quot;mrs&quot;, &quot;ms&quot;, &quot;much&quot;, &quot;must&quot;, &quot;my&quot;, &quot;myself&quot;, &quot;namely&quot;, &quot;need&quot;, &quot;neither&quot;, &quot;never&quot;, &quot;nevertheless&quot;, &quot;next&quot;, &quot;no&quot;, &quot;nobody&quot;, &quot;none&quot;, &quot;nonetheless&quot;, &quot;noone&quot;, &quot;nope&quot;, &quot;nor&quot;, &quot;not&quot;, &quot;nothing&quot;, &quot;notwithstanding&quot;, &quot;now&quot;, &quot;nowadays&quot;, &quot;nowhere&quot;, &quot;of&quot;, &quot;off&quot;, &quot;often&quot;, &quot;ok&quot;, &quot;on&quot;, &quot;once&quot;, &quot;one&quot;, &quot;only&quot;, &quot;onto&quot;, &quot;or&quot;, &quot;other&quot;, &quot;others&quot;, &quot;otherwise&quot;, &quot;ought&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;ourselves&quot;, &quot;out&quot;, &quot;outside&quot;, &quot;over&quot;, &quot;own&quot;, &quot;per&quot;, &quot;perhaps&quot;, &quot;plenty&quot;, &quot;provide&quot;, &quot;quite&quot;, &quot;rather&quot;, &quot;really&quot;, &quot;round&quot;, &quot;said&quot;, &quot;sake&quot;, &quot;same&quot;, &quot;sang&quot;, &quot;save&quot;, &quot;saw&quot;, &quot;see&quot;, &quot;seeing&quot;, &quot;seem&quot;, &quot;seemed&quot;, &quot;seeming&quot;, &quot;seems&quot;, &quot;seen&quot;, &quot;seldom&quot;, &quot;selves&quot;, &quot;sent&quot;, &quot;several&quot;, &quot;shalt&quot;, &quot;she&quot;, &quot;should&quot;, &quot;shown&quot;, &quot;sideways&quot;, &quot;since&quot;, &quot;slept&quot;, &quot;slew&quot;, &quot;slung&quot;, &quot;slunk&quot;, &quot;smote&quot;, &quot;so&quot;, &quot;some&quot;, &quot;somebody&quot;, &quot;somehow&quot;, &quot;someone&quot;, &quot;something&quot;, &quot;sometime&quot;, &quot;sometimes&quot;, &quot;somewhat&quot;, &quot;somewhere&quot;, &quot;spake&quot;, &quot;spat&quot;, &quot;spoke&quot;, &quot;spoken&quot;, &quot;sprang&quot;, &quot;sprung&quot;, &quot;stave&quot;, &quot;staves&quot;, &quot;still&quot;, &quot;such&quot;, &quot;supposing&quot;, &quot;than&quot;, &quot;that&quot;, &quot;the&quot;, &quot;thee&quot;, &quot;their&quot;, &quot;them&quot;, &quot;themselves&quot;, &quot;then&quot;, &quot;thence&quot;, &quot;thenceforth&quot;, &quot;there&quot;, &quot;thereabout&quot;, &quot;thereabouts&quot;, &quot;thereafter&quot;, &quot;thereby&quot;, &quot;therefore&quot;, &quot;therein&quot;, &quot;thereof&quot;, &quot;thereon&quot;, &quot;thereto&quot;, &quot;thereupon&quot;, &quot;these&quot;, &quot;they&quot;, &quot;this&quot;, &quot;those&quot;, &quot;thou&quot;, &quot;though&quot;, &quot;thrice&quot;, &quot;through&quot;, &quot;throughout&quot;, &quot;thru&quot;, &quot;thus&quot;, &quot;thy&quot;, &quot;thyself&quot;, &quot;till&quot;, &quot;to&quot;, &quot;together&quot;, &quot;too&quot;, &quot;toward&quot;, &quot;towards&quot;, &quot;ugh&quot;, &quot;unable&quot;, &quot;under&quot;, &quot;underneath&quot;, &quot;unless&quot;, &quot;unlike&quot;, &quot;until&quot;, &quot;up&quot;, &quot;upon&quot;, &quot;upward&quot;, &quot;upwards&quot;, &quot;us&quot;, &quot;use&quot;, &quot;used&quot;, &quot;using&quot;, &quot;very&quot;, &quot;via&quot;, &quot;vs&quot;, &quot;want&quot;, &quot;was&quot;, &quot;we&quot;, &quot;week&quot;, &quot;well&quot;, &quot;were&quot;, &quot;what&quot;, &quot;whatever&quot;, &quot;whatsoever&quot;, &quot;when&quot;, &quot;whence&quot;, &quot;whenever&quot;, &quot;whensoever&quot;, &quot;where&quot;, &quot;whereabouts&quot;, &quot;whereafter&quot;, &quot;whereas&quot;, &quot;whereat&quot;, &quot;whereby&quot;, &quot;wherefore&quot;, &quot;wherefrom&quot;, &quot;wherein&quot;, &quot;whereinto&quot;, &quot;whereof&quot;, &quot;whereon&quot;, &quot;wheresoever&quot;, &quot;whereto&quot;, &quot;whereunto&quot;, &quot;whereupon&quot;, &quot;wherever&quot;, &quot;wherewith&quot;, &quot;whether&quot;, &quot;whew&quot;, &quot;which&quot;, &quot;whichever&quot;, &quot;whichsoever&quot;, &quot;while&quot;, &quot;whilst&quot;, &quot;whither&quot;, &quot;who&quot;, &quot;whoa&quot;, &quot;whoever&quot;, &quot;whole&quot;, &quot;whom&quot;, &quot;whomever&quot;, &quot;whomsoever&quot;, &quot;whose&quot;, &quot;whosoever&quot;, &quot;why&quot;, &quot;will&quot;, &quot;wilt&quot;, &quot;with&quot;, &quot;within&quot;, &quot;without&quot;, &quot;worse&quot;, &quot;worst&quot;, &quot;would&quot;, &quot;wow&quot;, &quot;ye&quot;, &quot;yet&quot;, &quot;year&quot;, &quot;yippee&quot;, &quot;you&quot;, &quot;your&quot;, &quot;yours&quot;, &quot;yourself&quot;, &quot;yourselves&quot; ]</td> 121 <td class="context-item-value">[ &quot;a&quot;, &quot;anything&quot;, &quot;anyway&quot;, &quot;anywhere&quot;, &quot;apart&quot;, &quot;are&quot;, &quot;around&quot;, &quot;as&quot;, &quot;at&quot;, &quot;av&quot;, &quot;be&quot;, &quot;became&quot;, &quot;because&quot;, &quot;become&quot;, &quot;becomes&quot;, &quot;becoming&quot;, &quot;been&quot;, &quot;before&quot;, &quot;beforehand&quot;, &quot;behind&quot;, &quot;being&quot;, &quot;below&quot;, &quot;beside&quot;, &quot;besides&quot;, &quot;between&quot;, &quot;beyond&quot;, &quot;both&quot;, &quot;but&quot;, &quot;by&quot;, &quot;can&quot;, &quot;cannot&quot;, &quot;canst&quot;, &quot;certain&quot;, &quot;cf&quot;, &quot;choose&quot;, &quot;contrariwise&quot;, &quot;cos&quot;, &quot;could&quot;, &quot;cu&quot;, &quot;day&quot;, &quot;do&quot;, &quot;does&quot;, &quot;doesn't&quot;, &quot;doing&quot;, &quot;dost&quot;, &quot;doth&quot;, &quot;double&quot;, &quot;down&quot;, &quot;dual&quot;, &quot;during&quot;, &quot;each&quot;, &quot;either&quot;, &quot;else&quot;, &quot;elsewhere&quot;, &quot;enough&quot;, &quot;et&quot;, &quot;etc&quot;, &quot;even&quot;, &quot;ever&quot;, &quot;every&quot;, &quot;everybody&quot;, &quot;everyone&quot;, &quot;everything&quot;, &quot;everywhere&quot;, &quot;except&quot;, &quot;excepted&quot;, &quot;excepting&quot;, &quot;exception&quot;, &quot;exclude&quot;, &quot;excluding&quot;, &quot;exclusive&quot;, &quot;far&quot;, &quot;farther&quot;, &quot;farthest&quot;, &quot;few&quot;, &quot;ff&quot;, &quot;first&quot;, &quot;for&quot;, &quot;formerly&quot;, &quot;forth&quot;, &quot;forward&quot;, &quot;from&quot;, &quot;front&quot;, &quot;further&quot;, &quot;furthermore&quot;, &quot;furthest&quot;, &quot;get&quot;, &quot;go&quot;, &quot;had&quot;, &quot;halves&quot;, &quot;hardly&quot;, &quot;has&quot;, &quot;hast&quot;, &quot;hath&quot;, &quot;have&quot;, &quot;he&quot;, &quot;hence&quot;, &quot;henceforth&quot;, &quot;her&quot;, &quot;here&quot;, &quot;hereabouts&quot;, &quot;hereafter&quot;, &quot;hereby&quot;, &quot;herein&quot;, &quot;hereto&quot;, &quot;hereupon&quot;, &quot;hers&quot;, &quot;herself&quot;, &quot;him&quot;, &quot;himself&quot;, &quot;hindmost&quot;, &quot;his&quot;, &quot;hither&quot;, &quot;hitherto&quot;, &quot;how&quot;, &quot;however&quot;, &quot;howsoever&quot;, &quot;i&quot;, &quot;ie&quot;, &quot;if&quot;, &quot;in&quot;, &quot;inasmuch&quot;, &quot;inc&quot;, &quot;include&quot;, &quot;included&quot;, &quot;including&quot;, &quot;indeed&quot;, &quot;indoors&quot;, &quot;inside&quot;, &quot;insomuch&quot;, &quot;instead&quot;, &quot;into&quot;, &quot;inward&quot;, &quot;inwards&quot;, &quot;is&quot;, &quot;it&quot;, &quot;its&quot;, &quot;itself&quot;, &quot;just&quot;, &quot;kind&quot;, &quot;kg&quot;, &quot;km&quot;, &quot;last&quot;, &quot;latter&quot;, &quot;latterly&quot;, &quot;less&quot;, &quot;lest&quot;, &quot;let&quot;, &quot;like&quot;, &quot;little&quot;, &quot;ltd&quot;, &quot;many&quot;, &quot;may&quot;, &quot;maybe&quot;, &quot;me&quot;, &quot;meantime&quot;, &quot;meanwhile&quot;, &quot;might&quot;, &quot;moreover&quot;, &quot;most&quot;, &quot;mostly&quot;, &quot;more&quot;, &quot;mr&quot;, &quot;mrs&quot;, &quot;ms&quot;, &quot;much&quot;, &quot;must&quot;, &quot;my&quot;, &quot;myself&quot;, &quot;namely&quot;, &quot;need&quot;, &quot;neither&quot;, &quot;never&quot;, &quot;nevertheless&quot;, &quot;next&quot;, &quot;no&quot;, &quot;nobody&quot;, &quot;none&quot;, &quot;nonetheless&quot;, &quot;noone&quot;, &quot;nope&quot;, &quot;nor&quot;, &quot;not&quot;, &quot;nothing&quot;, &quot;notwithstanding&quot;, &quot;now&quot;, &quot;nowadays&quot;, &quot;nowhere&quot;, &quot;of&quot;, &quot;off&quot;, &quot;often&quot;, &quot;ok&quot;, &quot;on&quot;, &quot;once&quot;, &quot;one&quot;, &quot;only&quot;, &quot;onto&quot;, &quot;or&quot;, &quot;other&quot;, &quot;others&quot;, &quot;otherwise&quot;, &quot;ought&quot;, &quot;our&quot;, &quot;ours&quot;, &quot;ourselves&quot;, &quot;out&quot;, &quot;outside&quot;, &quot;over&quot;, &quot;own&quot;, &quot;per&quot;, &quot;perhaps&quot;, &quot;plenty&quot;, &quot;provide&quot;, &quot;quite&quot;, &quot;rather&quot;, &quot;really&quot;, &quot;round&quot;, &quot;said&quot;, &quot;sake&quot;, &quot;same&quot;, &quot;sang&quot;, &quot;save&quot;, &quot;saw&quot;, &quot;see&quot;, &quot;seeing&quot;, &quot;seem&quot;, &quot;seemed&quot;, &quot;seeming&quot;, &quot;seems&quot;, &quot;seen&quot;, &quot;seldom&quot;, &quot;selves&quot;, &quot;sent&quot;, &quot;several&quot;, &quot;shalt&quot;, &quot;she&quot;, &quot;should&quot;, &quot;shown&quot;, &quot;sideways&quot;, &quot;since&quot;, &quot;slept&quot;, &quot;slew&quot;, &quot;slung&quot;, &quot;slunk&quot;, &quot;smote&quot;, &quot;so&quot;, &quot;some&quot;, &quot;somebody&quot;, &quot;somehow&quot;, &quot;someone&quot;, &quot;something&quot;, &quot;sometime&quot;, &quot;sometimes&quot;, &quot;somewhat&quot;, &quot;somewhere&quot;, &quot;spake&quot;, &quot;spat&quot;, &quot;spoke&quot;, &quot;spoken&quot;, &quot;sprang&quot;, &quot;sprung&quot;, &quot;stave&quot;, &quot;staves&quot;, &quot;still&quot;, &quot;such&quot;, &quot;supposing&quot;, &quot;than&quot;, &quot;that&quot;, &quot;the&quot;, &quot;thee&quot;, &quot;their&quot;, &quot;them&quot;, &quot;themselves&quot;, &quot;then&quot;, &quot;thence&quot;, &quot;thenceforth&quot;, &quot;there&quot;, &quot;thereabout&quot;, &quot;thereabouts&quot;, &quot;thereafter&quot;, &quot;thereby&quot;, &quot;therefore&quot;, &quot;therein&quot;, &quot;thereof&quot;, &quot;thereon&quot;, &quot;thereto&quot;, &quot;thereupon&quot;, &quot;these&quot;, &quot;they&quot;, &quot;this&quot;, &quot;those&quot;, &quot;thou&quot;, &quot;though&quot;, &quot;thrice&quot;, &quot;through&quot;, &quot;throughout&quot;, &quot;thru&quot;, &quot;thus&quot;, &quot;thy&quot;, &quot;thyself&quot;, &quot;till&quot;, &quot;to&quot;, &quot;together&quot;, &quot;too&quot;, &quot;toward&quot;, &quot;towards&quot;, &quot;ugh&quot;, &quot;unable&quot;, &quot;under&quot;, &quot;underneath&quot;, &quot;unless&quot;, &quot;unlike&quot;, &quot;until&quot;, &quot;up&quot;, &quot;upon&quot;, &quot;upward&quot;, &quot;upwards&quot;, &quot;us&quot;, &quot;use&quot;, &quot;used&quot;, &quot;using&quot;, &quot;very&quot;, &quot;via&quot;, &quot;vs&quot;, &quot;want&quot;, &quot;was&quot;, &quot;we&quot;, &quot;week&quot;, &quot;well&quot;, &quot;were&quot;, &quot;what&quot;, &quot;whatever&quot;, &quot;whatsoever&quot;, &quot;when&quot;, &quot;whence&quot;, &quot;whenever&quot;, &quot;whensoever&quot;, &quot;where&quot;, &quot;whereabouts&quot;, &quot;whereafter&quot;, &quot;whereas&quot;, &quot;whereat&quot;, &quot;whereby&quot;, &quot;wherefore&quot;, &quot;wherefrom&quot;, &quot;wherein&quot;, &quot;whereinto&quot;, &quot;whereof&quot;, &quot;whereon&quot;, &quot;wheresoever&quot;, &quot;whereto&quot;, &quot;whereunto&quot;, &quot;whereupon&quot;, &quot;wherever&quot;, &quot;wherewith&quot;, &quot;whether&quot;, &quot;whew&quot;, &quot;which&quot;, &quot;whichever&quot;, &quot;whichsoever&quot;, &quot;while&quot;, &quot;whilst&quot;, &quot;whither&quot;, &quot;who&quot;, &quot;whoa&quot;, &quot;whoever&quot;, &quot;whole&quot;, &quot;whom&quot;, &quot;whomever&quot;, &quot;whomsoever&quot;, &quot;whose&quot;, &quot;whosoever&quot;, &quot;why&quot;, &quot;will&quot;, &quot;wilt&quot;, &quot;with&quot;, &quot;within&quot;, &quot;without&quot;, &quot;worse&quot;, &quot;worst&quot;, &quot;would&quot;, &quot;wow&quot;, &quot;ye&quot;, &quot;yet&quot;, &quot;year&quot;, &quot;yippee&quot;, &quot;you&quot;, &quot;your&quot;, &quot;yours&quot;, &quot;yourself&quot;, &quot;yourselves&quot; ]</td>
248 122
249 <td>&nbsp;</td> 123 <td>&nbsp;</td>
250 <td class="context-item-desc"> 124 <td class="context-item-desc">
251 These are the default stopwords provided by Lemur. 125 These are the default stopwords provided by Lemur.
252 126
253 </td> 127 </td>
254 128
255 </tr> 129 </tr>
256 130
257 </table> 131 </table>
258 </div> 132 </div>
259 </div> 133 </div>
260 134
261 135
262 136
263 137
264 <!-- if method_list --> 138 <!-- if method_list -->
265 139
266 140
267 141
268 142
269 </div> 143 </div>
270 144
271 <div id="validator-badges"> 145 <div id="validator-badges">
272 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 146 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
273 </div> 147 </div>
274 148
275 </body> 149 </body>
276 </html> 150 </html>
277 151
doc/classes/RIR/Document.src/M000022.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>format_words (RIR::Document)</title> 5 <title>format_words (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 31</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 34</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_words</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_words</span>
12 <span class="ruby-identifier">wo</span> = [] 12 <span class="ruby-identifier">wo</span> = []
13 13
14 <span class="ruby-ivar">@doc_content</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> 14 <span class="ruby-ivar">@doc_content</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span>
15 <span class="ruby-identifier">w</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\W/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sw</span><span class="ruby-operator">|</span> 15 <span class="ruby-identifier">w</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\W/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sw</span><span class="ruby-operator">|</span>
16 <span class="ruby-identifier">wo</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">downcase</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sw</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[a-zA-Z]/</span> 16 <span class="ruby-identifier">wo</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">sw</span>.<span class="ruby-identifier">downcase</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sw</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/[a-zA-Z]/</span>
17 <span class="ruby-keyword kw">end</span> 17 <span class="ruby-keyword kw">end</span>
18 <span class="ruby-keyword kw">end</span> 18 <span class="ruby-keyword kw">end</span>
19 19
20 <span class="ruby-identifier">wo</span> 20 <span class="ruby-identifier">wo</span>
21 <span class="ruby-keyword kw">end</span></pre> 21 <span class="ruby-keyword kw">end</span></pre>
22 </body> 22 </body>
23 </html> 23 </html>
24 24
doc/classes/RIR/Document.src/M000023.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>ngrams (RIR::Document)</title> 5 <title>ngrams (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 46</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 49</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ngrams</span>(<span class="ruby-identifier">n</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ngrams</span>(<span class="ruby-identifier">n</span>)
12 <span class="ruby-identifier">window</span> = [] 12 <span class="ruby-identifier">window</span> = []
13 <span class="ruby-identifier">ngrams_array</span> = [] 13 <span class="ruby-identifier">ngrams_array</span> = []
14 14
15 <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> 15 <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span>
16 <span class="ruby-identifier">window</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">w</span>) 16 <span class="ruby-identifier">window</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">w</span>)
17 <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">window</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">n</span> 17 <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">window</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">n</span>
18 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">window</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>) 18 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">window</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>)
19 <span class="ruby-identifier">window</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-value">0</span>) 19 <span class="ruby-identifier">window</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-value">0</span>)
20 <span class="ruby-keyword kw">end</span> 20 <span class="ruby-keyword kw">end</span>
21 <span class="ruby-keyword kw">end</span> 21 <span class="ruby-keyword kw">end</span>
22 22
23 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">uniq</span> 23 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">uniq</span>
24 <span class="ruby-keyword kw">end</span></pre> 24 <span class="ruby-keyword kw">end</span></pre>
25 </body> 25 </body>
26 </html> 26 </html>
27 27
doc/classes/RIR/Document.src/M000024.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>count_words (RIR::Document)</title> 5 <title>count_words (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 64</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 67</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count_words</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count_words</span>
12 <span class="ruby-identifier">counts</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-value">0</span> } 12 <span class="ruby-identifier">counts</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-value">0</span> }
13 <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-identifier">counts</span>[<span class="ruby-identifier">w</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> } 13 <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-identifier">counts</span>[<span class="ruby-identifier">w</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> }
14 14
15 <span class="ruby-identifier">counts</span> 15 <span class="ruby-identifier">counts</span>
16 <span class="ruby-keyword kw">end</span></pre> 16 <span class="ruby-keyword kw">end</span></pre>
17 </body> 17 </body>
18 </html> 18 </html>
19 19
doc/classes/RIR/Document.src/M000025.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>entropy (RIR::Document)</title> 5 <title>entropy (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 78</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 81</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>(<span class="ruby-identifier">s</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>(<span class="ruby-identifier">s</span>)
12 <span class="ruby-identifier">en</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span> 12 <span class="ruby-identifier">en</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
13 <span class="ruby-identifier">counts</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span> 13 <span class="ruby-identifier">counts</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>
14 14
15 <span class="ruby-identifier">s</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> 15 <span class="ruby-identifier">s</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span>
16 <span class="ruby-identifier">p_wi</span> = <span class="ruby-identifier">counts</span>[<span class="ruby-identifier">w</span>].<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@words</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">to_f</span> 16 <span class="ruby-identifier">p_wi</span> = <span class="ruby-identifier">counts</span>[<span class="ruby-identifier">w</span>].<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@words</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">to_f</span>
17 <span class="ruby-identifier">en</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">p_wi</span><span class="ruby-operator">*</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log2</span>(<span class="ruby-identifier">p_wi</span>) 17 <span class="ruby-identifier">en</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">p_wi</span><span class="ruby-operator">*</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log2</span>(<span class="ruby-identifier">p_wi</span>)
18 <span class="ruby-keyword kw">end</span> 18 <span class="ruby-keyword kw">end</span>
19 19
20 <span class="ruby-identifier">en</span> <span class="ruby-operator">*=</span> <span class="ruby-value">-1</span> 20 <span class="ruby-identifier">en</span> <span class="ruby-operator">*=</span> <span class="ruby-value">-1</span>
21 <span class="ruby-identifier">en</span> 21 <span class="ruby-identifier">en</span>
22 <span class="ruby-keyword kw">end</span></pre> 22 <span class="ruby-keyword kw">end</span></pre>
23 </body> 23 </body>
24 </html> 24 </html>
25 25
doc/classes/RIR/Document.src/M000026.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>tf (RIR::Document)</title> 5 <title>tf (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 94</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 97</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tf</span>(<span class="ruby-identifier">s</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tf</span>(<span class="ruby-identifier">s</span>)
12 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@words</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span> 12 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-ivar">@words</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/RIR/Document.src/M000027.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>new (RIR::Document)</title> 5 <title>new (RIR::Document)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 99</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 102</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">content</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">content</span>)
12 <span class="ruby-ivar">@doc_content</span> = <span class="ruby-identifier">content</span> 12 <span class="ruby-ivar">@doc_content</span> = <span class="ruby-identifier">content</span>
13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span> 13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span>
14 <span class="ruby-keyword kw">end</span></pre> 14 <span class="ruby-keyword kw">end</span></pre>
15 </body> 15 </body>
16 </html> 16 </html>
17 17
doc/classes/RIR/WebDocument.src/M000028.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>get_content (RIR::WebDocument)</title> 5 <title>get_content (RIR::WebDocument)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 112</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 115</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_content</span>(<span class="ruby-identifier">url</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_content</span>(<span class="ruby-identifier">url</span>)
12 <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span> 12 <span class="ruby-identifier">require</span> <span class="ruby-value str">'net/http'</span>
13 <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>)) 13 <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>))
14 <span class="ruby-keyword kw">end</span></pre> 14 <span class="ruby-keyword kw">end</span></pre>
15 </body> 15 </body>
16 </html> 16 </html>
17 17
doc/classes/RIR/WebDocument.src/M000029.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>new (RIR::WebDocument)</title> 5 <title>new (RIR::WebDocument)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 119</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 122</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span>)
12 <span class="ruby-ivar">@url</span> = <span class="ruby-identifier">url</span> 12 <span class="ruby-ivar">@url</span> = <span class="ruby-identifier">url</span>
13 <span class="ruby-keyword kw">super</span> <span class="ruby-constant">WebDocument</span>.<span class="ruby-identifier">get_content</span>(<span class="ruby-identifier">url</span>).<span class="ruby-identifier">strip_javascripts</span>.<span class="ruby-identifier">strip_stylesheets</span>.<span class="ruby-identifier">strip_xml_tags</span> 13 <span class="ruby-keyword kw">super</span> <span class="ruby-constant">WebDocument</span>.<span class="ruby-identifier">get_content</span>(<span class="ruby-identifier">url</span>).<span class="ruby-identifier">strip_javascripts</span>.<span class="ruby-identifier">strip_stylesheets</span>.<span class="ruby-identifier">strip_xml_tags</span>
14 <span class="ruby-keyword kw">end</span></pre> 14 <span class="ruby-keyword kw">end</span></pre>
15 </body> 15 </body>
16 </html> 16 </html>
17 17
doc/classes/RIR/WikipediaPage.src/M000030.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>search_wikipedia_titles (RIR::WikipediaPage)</title> 5 <title>search_wikipedia_titles (RIR::WikipediaPage)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 132</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 135</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">search_wikipedia_titles</span>(<span class="ruby-identifier">name</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">search_wikipedia_titles</span>(<span class="ruby-identifier">name</span>)
12 <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Bad encoding&quot;</span>, <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">isutf8</span> 12 <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Bad encoding&quot;</span>, <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">isutf8</span>
13 13
14 <span class="ruby-identifier">res</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span> <span class="ruby-node">&quot;http://en.wikipedia.org/w/api.php?action=query&amp;list=search&amp;srsearch=#{URI.escape name}&amp;format=xml&quot;</span> ).<span class="ruby-identifier">toutf8</span>).<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'api/query/search'</span>] 14 <span class="ruby-identifier">res</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span> <span class="ruby-node">&quot;http://en.wikipedia.org/w/api.php?action=query&amp;list=search&amp;srsearch=#{URI.escape name}&amp;format=xml&quot;</span> ).<span class="ruby-identifier">toutf8</span>).<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'api/query/search'</span>]
15 15
16 <span class="ruby-identifier">res</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">'title'</span>] } <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">nil?</span> 16 <span class="ruby-identifier">res</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">'title'</span>] } <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">nil?</span>
17 <span class="ruby-keyword kw">end</span></pre> 17 <span class="ruby-keyword kw">end</span></pre>
18 </body> 18 </body>
19 </html> 19 </html>
20 20
doc/classes/RIR/WikipediaPage.src/M000031.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>get_url (RIR::WikipediaPage)</title> 5 <title>get_url (RIR::WikipediaPage)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 140</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 143</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_url</span>(<span class="ruby-identifier">name</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_url</span>(<span class="ruby-identifier">name</span>)
12 <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Bad encoding&quot;</span>, <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">isutf8</span> 12 <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Bad encoding&quot;</span>, <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">isutf8</span>
13 13
14 <span class="ruby-identifier">atts</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span> <span class="ruby-node">&quot;http://en.wikipedia.org/w/api.php?action=query&amp;titles=#{URI.escape name}&amp;inprop=url&amp;prop=info&amp;format=xml&quot;</span> ).<span class="ruby-identifier">toutf8</span>).<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'api/query/pages/page'</span>].<span class="ruby-identifier">attributes</span> 14 <span class="ruby-identifier">atts</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>( <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span> <span class="ruby-node">&quot;http://en.wikipedia.org/w/api.php?action=query&amp;titles=#{URI.escape name}&amp;inprop=url&amp;prop=info&amp;format=xml&quot;</span> ).<span class="ruby-identifier">toutf8</span>).<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'api/query/pages/page'</span>].<span class="ruby-identifier">attributes</span>
15 15
16 <span class="ruby-identifier">atts</span>[<span class="ruby-value str">'fullurl'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">atts</span>[<span class="ruby-value str">'missing'</span>].<span class="ruby-identifier">nil?</span> 16 <span class="ruby-identifier">atts</span>[<span class="ruby-value str">'fullurl'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">atts</span>[<span class="ruby-value str">'missing'</span>].<span class="ruby-identifier">nil?</span>
17 <span class="ruby-keyword kw">end</span></pre> 17 <span class="ruby-keyword kw">end</span></pre>
18 </body> 18 </body>
19 </html> 19 </html>
20 20
doc/classes/RIR/WikipediaPage.src/M000032.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>search_homepage (RIR::WikipediaPage)</title> 5 <title>search_homepage (RIR::WikipediaPage)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 148</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 151</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">search_homepage</span>(<span class="ruby-identifier">name</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">search_homepage</span>(<span class="ruby-identifier">name</span>)
12 <span class="ruby-identifier">title</span> = <span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">search_wikipedia_titles</span> <span class="ruby-identifier">name</span> 12 <span class="ruby-identifier">title</span> = <span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">search_wikipedia_titles</span> <span class="ruby-identifier">name</span>
13 13
14 <span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">get_url</span> <span class="ruby-identifier">title</span>[<span class="ruby-value">0</span>]) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">empty?</span> 14 <span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">WikipediaPage</span>.<span class="ruby-identifier">get_url</span> <span class="ruby-identifier">title</span>[<span class="ruby-value">0</span>]) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">empty?</span>
15 <span class="ruby-keyword kw">end</span></pre> 15 <span class="ruby-keyword kw">end</span></pre>
16 </body> 16 </body>
17 </html> 17 </html>
18 18
doc/classes/Regexp.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>Class: Regexp [RDoc Documentation]</title> 5 <title>Class: Regexp [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="classHeader"> 45 <div id="classHeader">
46 <table class="header-table"> 46 <table class="header-table">
47 <tr class="top-aligned-row"> 47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td> 48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">Regexp</td> 49 <td class="class-name-in-header">Regexp</td>
50 </tr> 50 </tr>
51 <tr class="top-aligned-row"> 51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td> 52 <td><strong>In:</strong></td>
53 <td> 53 <td>
54 54
55 55
56 <a href="../files/lib/rir/regexp_rb.html"> 56 <a href="../files/lib/rir/regexp_rb.html">
57 57
58 lib/rir/regexp.rb 58 lib/rir/regexp.rb
59 59
60 </a> 60 </a>
61 61
62 62
63 <br /> 63 <br />
64 64
65 </td> 65 </td>
66 </tr> 66 </tr>
67 67
68 68
69 <tr class="top-aligned-row"> 69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td> 70 <td><strong>Parent:</strong></td>
71 <td> 71 <td>
72 72
73 Object 73 Object
74 74
75 </td> 75 </td>
76 </tr> 76 </tr>
77 77
78 </table> 78 </table>
79 </div> 79 </div>
80 <!-- banner header --> 80 <!-- banner header -->
81 81
82 <div id="bodyContent"> 82 <div id="bodyContent">
83 83
84 <div id="contextContent"> 84 <div id="contextContent">
85 85
86 <div id="description">
87 <p>
88 This file is a part of an Information Retrieval oriented Ruby library
89 </p>
90 <p>
91 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
92 </p>
93 <p>
94 This program is free software: you can redistribute it and/or modify it
95 under the terms of the GNU General Public License as published by the Free
96 Software Foundation, either version 3 of the License, or (at your option)
97 any later version.
98 </p>
99 <p>
100 This program is distributed in the hope that it will be useful, but WITHOUT
101 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
102 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
103 more details.
104 </p>
105 <p>
106 You should have received a copy of the GNU General Public License along
107 with this program. If not, see <<a
108 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
109 </p>
110
111 </div>
112
113 </div> 86 </div>
114 87
115 88
116 <div id="method-list"> 89 <div id="method-list">
117 <h3 class="section-bar">Methods</h3> 90 <h3 class="section-bar">Methods</h3>
118 91
119 <div class="name-list"> 92 <div class="name-list">
120 93
121 <a href="#M000001">negated</a>&nbsp;&nbsp; 94 <a href="#M000003">negated</a>&nbsp;&nbsp;
122 95
123 </div> 96 </div>
124 </div> 97 </div>
125 98
126 </div> 99 </div>
127 100
128 <!-- if includes --> 101 <!-- if includes -->
129 102
130 <div id="section"> 103 <div id="section">
131 104
132 105
133 106
134 107
135 <!-- if method_list --> 108 <!-- if method_list -->
136 109
137 <div id="methods"> 110 <div id="methods">
138 111
139 <h3 class="section-bar">Public Instance methods</h3> 112 <h3 class="section-bar">Public Instance methods</h3>
140 113
141 114
142 <div id="method-M000001" class="method-detail"> 115 <div id="method-M000003" class="method-detail">
143 <a name="M000001"></a> 116 <a name="M000003"></a>
144 117
145 <div class="method-heading"> 118 <div class="method-heading">
146 119
147 <a href="Regexp.src/M000001.html" target="Code" class="method-signature" 120 <a href="Regexp.src/M000003.html" target="Code" class="method-signature"
148 onclick="popupCode('Regexp.src/M000001.html');return false;"> 121 onclick="popupCode('Regexp.src/M000003.html');return false;">
149 122
150 <span class="method-name">negated</span><span class="method-args">()</span> 123 <span class="method-name">negated</span><span class="method-args">()</span>
151 124
152 </a> 125 </a>
153 126
154 </div> 127 </div>
155 128
156 <div class="method-description"> 129 <div class="method-description">
157 130
158 </div> 131 </div>
159 </div> 132 </div>
160 133
161 134
162 135
163 </div> 136 </div>
164 137
165 138
166 139
167 140
168 </div> 141 </div>
169 142
170 <div id="validator-badges"> 143 <div id="validator-badges">
171 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 144 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172 </div> 145 </div>
173 146
174 </body> 147 </body>
175 </html> 148 </html>
176 149
doc/classes/Regexp.src/M000003.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>negated (Regexp)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/regexp.rb, line 24</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">negated</span>
12 <span class="ruby-node">/^((?!#{self}).)*$/</span>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/String.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>Class: String [RDoc Documentation]</title> 5 <title>Class: String [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="classHeader"> 45 <div id="classHeader">
46 <table class="header-table"> 46 <table class="header-table">
47 <tr class="top-aligned-row"> 47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td> 48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">String</td> 49 <td class="class-name-in-header">String</td>
50 </tr> 50 </tr>
51 <tr class="top-aligned-row"> 51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td> 52 <td><strong>In:</strong></td>
53 <td> 53 <td>
54 54
55 55
56 <a href="../files/lib/rir/string_rb.html"> 56 <a href="../files/lib/rir/string_rb.html">
57 57
58 lib/rir/string.rb 58 lib/rir/string.rb
59 59
60 </a> 60 </a>
61 61
62 62
63 <br /> 63 <br />
64 64
65 </td> 65 </td>
66 </tr> 66 </tr>
67 67
68 68
69 <tr class="top-aligned-row"> 69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td> 70 <td><strong>Parent:</strong></td>
71 <td> 71 <td>
72 72
73 Object 73 Object
74 74
75 </td> 75 </td>
76 </tr> 76 </tr>
77 77
78 </table> 78 </table>
79 </div> 79 </div>
80 <!-- banner header --> 80 <!-- banner header -->
81 81
82 <div id="bodyContent"> 82 <div id="bodyContent">
83 83
84 <div id="contextContent"> 84 <div id="contextContent">
85 85
86 <div id="description"> 86 <div id="description">
87 <p> 87 <p>
88 Extention of the standard class <a href="String.html">String</a> with 88 Extention of the standard class <a href="String.html">String</a> with
89 useful function. 89 useful function.
90 </p> 90 </p>
91 91
92 </div> 92 </div>
93 93
94 </div> 94 </div>
95 95
96 96
97 <div id="method-list"> 97 <div id="method-list">
98 <h3 class="section-bar">Methods</h3> 98 <h3 class="section-bar">Methods</h3>
99 99
100 <div class="name-list"> 100 <div class="name-list">
101 101
102 <a href="#M000012">extract_xmltags_values</a>&nbsp;&nbsp; 102 <a href="#M000014">extract_xmltags_values</a>&nbsp;&nbsp;
103 103
104 <a href="#M000002">is_stopword?</a>&nbsp;&nbsp; 104 <a href="#M000004">is_stopword?</a>&nbsp;&nbsp;
105 105
106 <a href="#M000003">remove_special_characters</a>&nbsp;&nbsp; 106 <a href="#M000005">remove_special_characters</a>&nbsp;&nbsp;
107 107
108 <a href="#M000007">strip_javascripts</a>&nbsp;&nbsp; 108 <a href="#M000009">strip_javascripts</a>&nbsp;&nbsp;
109 109
110 <a href="#M000006">strip_javascripts!</a>&nbsp;&nbsp; 110 <a href="#M000008">strip_javascripts!</a>&nbsp;&nbsp;
111 111
112 <a href="#M000011">strip_punctuation</a>&nbsp;&nbsp; 112 <a href="#M000013">strip_punctuation</a>&nbsp;&nbsp;
113 113
114 <a href="#M000010">strip_punctuation!</a>&nbsp;&nbsp; 114 <a href="#M000012">strip_punctuation!</a>&nbsp;&nbsp;
115 115
116 <a href="#M000009">strip_stylesheets</a>&nbsp;&nbsp; 116 <a href="#M000011">strip_stylesheets</a>&nbsp;&nbsp;
117 117
118 <a href="#M000008">strip_stylesheets!</a>&nbsp;&nbsp; 118 <a href="#M000010">strip_stylesheets!</a>&nbsp;&nbsp;
119 119
120 <a href="#M000005">strip_xml_tags</a>&nbsp;&nbsp; 120 <a href="#M000007">strip_xml_tags</a>&nbsp;&nbsp;
121 121
122 <a href="#M000004">strip_xml_tags!</a>&nbsp;&nbsp; 122 <a href="#M000006">strip_xml_tags!</a>&nbsp;&nbsp;
123 123
124 </div> 124 </div>
125 </div> 125 </div>
126 126
127 </div> 127 </div>
128 128
129 <!-- if includes --> 129 <!-- if includes -->
130 130
131 <div id="includes"> 131 <div id="includes">
132 <h3 class="section-bar">Included Modules</h3> 132 <h3 class="section-bar">Included Modules</h3>
133 133
134 <div id="includes-list"> 134 <div id="includes-list">
135 135
136 <span class="include-name"><a href="RIR.html">RIR</a></span> 136 <span class="include-name"><a href="RIR.html">RIR</a></span>
137 137
138 </div> 138 </div>
139 </div> 139 </div>
140 140
141 <div id="section"> 141 <div id="section">
142 142
143 143
144 144
145 145
146 <!-- if method_list --> 146 <!-- if method_list -->
147 147
148 <div id="methods"> 148 <div id="methods">
149 149
150 <h3 class="section-bar">Public Instance methods</h3> 150 <h3 class="section-bar">Public Instance methods</h3>
151 151
152 152
153 <div id="method-M000012" class="method-detail"> 153 <div id="method-M000014" class="method-detail">
154 <a name="M000012"></a> 154 <a name="M000014"></a>
155 155
156 <div class="method-heading"> 156 <div class="method-heading">
157 157
158 <a href="String.src/M000012.html" target="Code" class="method-signature" 158 <a href="String.src/M000014.html" target="Code" class="method-signature"
159 onclick="popupCode('String.src/M000012.html');return false;"> 159 onclick="popupCode('String.src/M000014.html');return false;">
160 160
161 <span class="method-name">extract_xmltags_values</span><span class="method-args">(tag_name)</span> 161 <span class="method-name">extract_xmltags_values</span><span class="method-args">(tag_name)</span>
162 162
163 </a> 163 </a>
164 164
165 </div> 165 </div>
166 166
167 <div class="method-description"> 167 <div class="method-description">
168 168
169 <p> 169 <p>
170 Returns the text values inside all occurences of a XML tag in <tt>self</tt> 170 Returns the text values inside all occurences of a XML tag in <tt>self</tt>
171 </p> 171 </p>
172 <pre> 172 <pre>
173 s = &quot;four-piece in &lt;a href='#'&gt;Indianapolis&lt;/a&gt;, &lt;a href='#'&gt;Indiana&lt;/a&gt; at the Murat Theatre&quot; 173 s = &quot;four-piece in &lt;a href='#'&gt;Indianapolis&lt;/a&gt;, &lt;a href='#'&gt;Indiana&lt;/a&gt; at the Murat Theatre&quot;
174 s.extract_xmltags_values 'a' #=&gt; [&quot;Indianapolis&quot;, &quot;Indiana&quot;] 174 s.extract_xmltags_values 'a' #=&gt; [&quot;Indianapolis&quot;, &quot;Indiana&quot;]
175 </pre> 175 </pre>
176 176
177 </div> 177 </div>
178 </div> 178 </div>
179 179
180 180
181 <div id="method-M000002" class="method-detail"> 181 <div id="method-M000004" class="method-detail">
182 <a name="M000002"></a> 182 <a name="M000004"></a>
183 183
184 <div class="method-heading"> 184 <div class="method-heading">
185 185
186 <a href="String.src/M000002.html" target="Code" class="method-signature" 186 <a href="String.src/M000004.html" target="Code" class="method-signature"
187 onclick="popupCode('String.src/M000002.html');return false;"> 187 onclick="popupCode('String.src/M000004.html');return false;">
188 188
189 <span class="method-name">is_stopword?</span><span class="method-args">()</span> 189 <span class="method-name">is_stopword?</span><span class="method-args">()</span>
190 190
191 </a> 191 </a>
192 192
193 </div> 193 </div>
194 194
195 <div class="method-description"> 195 <div class="method-description">
196 196
197 <p> 197 <p>
198 Returns <tt>true</tt> if <tt>self</tt> belongs to Rir::Stoplist, 198 Returns <tt>true</tt> if <tt>self</tt> belongs to Rir::Stoplist,
199 <tt>false</tt> otherwise. 199 <tt>false</tt> otherwise.
200 </p> 200 </p>
201 201
202 </div> 202 </div>
203 </div> 203 </div>
204 204
205 205
206 <div id="method-M000003" class="method-detail"> 206 <div id="method-M000005" class="method-detail">
207 <a name="M000003"></a> 207 <a name="M000005"></a>
208 208
209 <div class="method-heading"> 209 <div class="method-heading">
210 210
211 <a href="String.src/M000003.html" target="Code" class="method-signature" 211 <a href="String.src/M000005.html" target="Code" class="method-signature"
212 onclick="popupCode('String.src/M000003.html');return false;"> 212 onclick="popupCode('String.src/M000005.html');return false;">
213 213
214 <span class="method-name">remove_special_characters</span><span class="method-args">()</span> 214 <span class="method-name">remove_special_characters</span><span class="method-args">()</span>
215 215
216 </a> 216 </a>
217 217
218 </div> 218 </div>
219 219
220 <div class="method-description"> 220 <div class="method-description">
221 221
222 <p> 222 <p>
223 Do not use. TODO: rewamp. find why this function is here. 223 Do not use. TODO: rewamp. find why this function is here.
224 </p> 224 </p>
225 225
226 </div> 226 </div>
227 </div> 227 </div>
228 228
229 229
230 <div id="method-M000007" class="method-detail"> 230 <div id="method-M000009" class="method-detail">
231 <a name="M000007"></a> 231 <a name="M000009"></a>
232 232
233 <div class="method-heading"> 233 <div class="method-heading">
234 234
235 <a href="String.src/M000007.html" target="Code" class="method-signature" 235 <a href="String.src/M000009.html" target="Code" class="method-signature"
236 onclick="popupCode('String.src/M000007.html');return false;"> 236 onclick="popupCode('String.src/M000009.html');return false;">
237 237
238 <span class="method-name">strip_javascripts</span><span class="method-args">()</span> 238 <span class="method-name">strip_javascripts</span><span class="method-args">()</span>
239 239
240 </a> 240 </a>
241 241
242 </div> 242 </div>
243 243
244 <div class="method-description"> 244 <div class="method-description">
245 245
246 <p> 246 <p>
247 Removes all Javascript sources from <tt>self</tt>. 247 Removes all Javascript sources from <tt>self</tt>.
248 </p> 248 </p>
249 <pre> 249 <pre>
250 s = &quot;&lt;script type='text/javascript'&gt; 250 s = &quot;&lt;script type='text/javascript'&gt;
251 var skin='vector', 251 var skin='vector',
252 stylepath='http://bits.wikimedia.org/skins-1.5' 252 stylepath='http://bits.wikimedia.org/skins-1.5'
253 &lt;/script&gt; 253 &lt;/script&gt;
254 254
255 test&quot; 255 test&quot;
256 s.strip_javascripts #=&gt; &quot;test&quot; 256 s.strip_javascripts #=&gt; &quot;test&quot;
257 </pre> 257 </pre>
258 258
259 </div> 259 </div>
260 </div> 260 </div>
261 261
262 262
263 <div id="method-M000006" class="method-detail"> 263 <div id="method-M000008" class="method-detail">
264 <a name="M000006"></a> 264 <a name="M000008"></a>
265 265
266 <div class="method-heading"> 266 <div class="method-heading">
267 267
268 <a href="String.src/M000006.html" target="Code" class="method-signature" 268 <a href="String.src/M000008.html" target="Code" class="method-signature"
269 onclick="popupCode('String.src/M000006.html');return false;"> 269 onclick="popupCode('String.src/M000008.html');return false;">
270 270
271 <span class="method-name">strip_javascripts!</span><span class="method-args">()</span> 271 <span class="method-name">strip_javascripts!</span><span class="method-args">()</span>
272 272
273 </a> 273 </a>
274 274
275 </div> 275 </div>
276 276
277 <div class="method-description"> 277 <div class="method-description">
278 278
279 <p> 279 <p>
280 Removes all Javascript sources from <tt>self</tt>. 280 Removes all Javascript sources from <tt>self</tt>.
281 </p> 281 </p>
282 <pre> 282 <pre>
283 s = &quot;&lt;script type='text/javascript'&gt; 283 s = &quot;&lt;script type='text/javascript'&gt;
284 var skin='vector', 284 var skin='vector',
285 stylepath='http://bits.wikimedia.org/skins-1.5' 285 stylepath='http://bits.wikimedia.org/skins-1.5'
286 &lt;/script&gt; 286 &lt;/script&gt;
287 287
288 test&quot; 288 test&quot;
289 s.strip_javascripts! 289 s.strip_javascripts!
290 s #=&gt; &quot;test&quot; 290 s #=&gt; &quot;test&quot;
291 </pre> 291 </pre>
292 292
293 </div> 293 </div>
294 </div> 294 </div>
295 295
296 296
297 <div id="method-M000011" class="method-detail"> 297 <div id="method-M000013" class="method-detail">
298 <a name="M000011"></a> 298 <a name="M000013"></a>
299 299
300 <div class="method-heading"> 300 <div class="method-heading">
301 301
302 <a href="String.src/M000011.html" target="Code" class="method-signature" 302 <a href="String.src/M000013.html" target="Code" class="method-signature"
303 onclick="popupCode('String.src/M000011.html');return false;"> 303 onclick="popupCode('String.src/M000013.html');return false;">
304 304
305 <span class="method-name">strip_punctuation</span><span class="method-args">()</span> 305 <span class="method-name">strip_punctuation</span><span class="method-args">()</span>
306 306
307 </a> 307 </a>
308 308
309 </div> 309 </div>
310 310
311 <div class="method-description"> 311 <div class="method-description">
312 312
313 <p> 313 <p>
314 Removes punctuation from <tt>self</tt>. 314 Removes punctuation from <tt>self</tt>.
315 </p> 315 </p>
316 <pre> 316 <pre>
317 s = &quot;hello, world. how are you?!&quot; 317 s = &quot;hello, world. how are you?!&quot;
318 s.strip_punctuation # =&gt; &quot;hello world how are you&quot; 318 s.strip_punctuation # =&gt; &quot;hello world how are you&quot;
319 </pre> 319 </pre>
320 320
321 </div> 321 </div>
322 </div> 322 </div>
323 323
324 324
325 <div id="method-M000010" class="method-detail"> 325 <div id="method-M000012" class="method-detail">
326 <a name="M000010"></a> 326 <a name="M000012"></a>
327 327
328 <div class="method-heading"> 328 <div class="method-heading">
329 329
330 <a href="String.src/M000010.html" target="Code" class="method-signature" 330 <a href="String.src/M000012.html" target="Code" class="method-signature"
331 onclick="popupCode('String.src/M000010.html');return false;"> 331 onclick="popupCode('String.src/M000012.html');return false;">
332 332
333 <span class="method-name">strip_punctuation!</span><span class="method-args">()</span> 333 <span class="method-name">strip_punctuation!</span><span class="method-args">()</span>
334 334
335 </a> 335 </a>
336 336
337 </div> 337 </div>
338 338
339 <div class="method-description"> 339 <div class="method-description">
340 340
341 <p> 341 <p>
342 Removes punctuation from <tt>self</tt>. 342 Removes punctuation from <tt>self</tt>.
343 </p> 343 </p>
344 <pre> 344 <pre>
345 s = &quot;hello, world. how are you?!&quot; 345 s = &quot;hello, world. how are you?!&quot;
346 s.strip_punctuation! 346 s.strip_punctuation!
347 s # =&gt; &quot;hello world how are you&quot; 347 s # =&gt; &quot;hello world how are you&quot;
348 </pre> 348 </pre>
349 349
350 </div> 350 </div>
351 </div> 351 </div>
352 352
353 353
354 <div id="method-M000009" class="method-detail"> 354 <div id="method-M000011" class="method-detail">
355 <a name="M000009"></a> 355 <a name="M000011"></a>
356 356
357 <div class="method-heading"> 357 <div class="method-heading">
358 358
359 <a href="String.src/M000009.html" target="Code" class="method-signature" 359 <a href="String.src/M000011.html" target="Code" class="method-signature"
360 onclick="popupCode('String.src/M000009.html');return false;"> 360 onclick="popupCode('String.src/M000011.html');return false;">
361 361
362 <span class="method-name">strip_stylesheets</span><span class="method-args">()</span> 362 <span class="method-name">strip_stylesheets</span><span class="method-args">()</span>
363 363
364 </a> 364 </a>
365 365
366 </div> 366 </div>
367 367
368 <div class="method-description"> 368 <div class="method-description">
369 369
370 </div> 370 </div>
371 </div> 371 </div>
372 372
373 373
374 <div id="method-M000008" class="method-detail"> 374 <div id="method-M000010" class="method-detail">
375 <a name="M000008"></a> 375 <a name="M000010"></a>
376 376
377 <div class="method-heading"> 377 <div class="method-heading">
378 378
379 <a href="String.src/M000008.html" target="Code" class="method-signature" 379 <a href="String.src/M000010.html" target="Code" class="method-signature"
380 onclick="popupCode('String.src/M000008.html');return false;"> 380 onclick="popupCode('String.src/M000010.html');return false;">
381 381
382 <span class="method-name">strip_stylesheets!</span><span class="method-args">()</span> 382 <span class="method-name">strip_stylesheets!</span><span class="method-args">()</span>
383 383
384 </a> 384 </a>
385 385
386 </div> 386 </div>
387 387
388 <div class="method-description"> 388 <div class="method-description">
389 389
390 </div> 390 </div>
391 </div> 391 </div>
392 392
393 393
394 <div id="method-M000005" class="method-detail"> 394 <div id="method-M000007" class="method-detail">
395 <a name="M000005"></a> 395 <a name="M000007"></a>
396 396
397 <div class="method-heading"> 397 <div class="method-heading">
398 398
399 <a href="String.src/M000005.html" target="Code" class="method-signature" 399 <a href="String.src/M000007.html" target="Code" class="method-signature"
400 onclick="popupCode('String.src/M000005.html');return false;"> 400 onclick="popupCode('String.src/M000007.html');return false;">
401 401
402 <span class="method-name">strip_xml_tags</span><span class="method-args">()</span> 402 <span class="method-name">strip_xml_tags</span><span class="method-args">()</span>
403 403
404 </a> 404 </a>
405 405
406 </div> 406 </div>
407 407
408 <div class="method-description"> 408 <div class="method-description">
409 409
410 <p> 410 <p>
411 Removes all XML-like tags from <tt>self</tt>. 411 Removes all XML-like tags from <tt>self</tt>.
412 </p> 412 </p>
413 <pre> 413 <pre>
414 s = &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot; 414 s = &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;
415 s.strip_xml_tags #=&gt; &quot;test&quot; 415 s.strip_xml_tags #=&gt; &quot;test&quot;
416 s #=&gt; &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot; 416 s #=&gt; &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;
417 </pre> 417 </pre>
418 418
419 </div> 419 </div>
420 </div> 420 </div>
421 421
422 422
423 <div id="method-M000004" class="method-detail"> 423 <div id="method-M000006" class="method-detail">
424 <a name="M000004"></a> 424 <a name="M000006"></a>
425 425
426 <div class="method-heading"> 426 <div class="method-heading">
427 427
428 <a href="String.src/M000004.html" target="Code" class="method-signature" 428 <a href="String.src/M000006.html" target="Code" class="method-signature"
429 onclick="popupCode('String.src/M000004.html');return false;"> 429 onclick="popupCode('String.src/M000006.html');return false;">
430 430
431 <span class="method-name">strip_xml_tags!</span><span class="method-args">()</span> 431 <span class="method-name">strip_xml_tags!</span><span class="method-args">()</span>
432 432
433 </a> 433 </a>
434 434
435 </div> 435 </div>
436 436
437 <div class="method-description"> 437 <div class="method-description">
438 438
439 <p> 439 <p>
440 Removes all XML-like tags from <tt>self</tt>. 440 Removes all XML-like tags from <tt>self</tt>.
441 </p> 441 </p>
442 <pre> 442 <pre>
443 s = &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot; 443 s = &quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;
444 s.strip_xml_tags! 444 s.strip_xml_tags!
445 s #=&gt; &quot;test&quot; 445 s #=&gt; &quot;test&quot;
446 </pre> 446 </pre>
447 447
448 </div> 448 </div>
449 </div> 449 </div>
450 450
451 451
452 452
453 </div> 453 </div>
454 454
455 455
456 456
457 457
458 </div> 458 </div>
459 459
460 <div id="validator-badges"> 460 <div id="validator-badges">
461 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 461 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
462 </div> 462 </div>
463 463
464 </body> 464 </body>
465 </html> 465 </html>
466 466
doc/classes/String.src/M000004.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_xml_tags! (String)</title> 5 <title>is_stopword? (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 91</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 78</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_xml_tags!</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_stopword?</span>
12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/?[^&gt;]*&gt;/</span> 12 <span class="ruby-constant">Stoplist</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">downcase</span>)
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000005.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_xml_tags (String)</title> 5 <title>remove_special_characters (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 100</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 84</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_xml_tags</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_special_characters</span>
12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_xml_tags!</span> 12 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-identifier">w</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\W/</span>,<span class="ruby-value str">' '</span>).<span class="ruby-identifier">split</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-identifier">w</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\W/</span>,<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\A.\z/</span>, <span class="ruby-value str">''</span>)}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\A.\z/</span>, <span class="ruby-value str">''</span>)}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000006.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_javascripts! (String)</title> 5 <title>strip_xml_tags! (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 114</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 93</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_javascripts!</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_xml_tags!</span>
12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">script</span> <span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;text\/javascript&quot;</span><span class="ruby-operator">&gt;</span>(.<span class="ruby-operator">+</span><span class="ruby-value">?)</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/script&gt;/</span><span class="ruby-identifier">m</span> 12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/?[^&gt;]*&gt;/</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000007.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_javascripts (String)</title> 5 <title>strip_xml_tags (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 127</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 102</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_javascripts</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_xml_tags</span>
12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_javascripts!</span> 12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_xml_tags!</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000008.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_stylesheets! (String)</title> 5 <title>strip_javascripts! (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 131</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 116</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_stylesheets!</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_javascripts!</span>
12 <span class="ruby-comment cmt"># TODO: rewamp. dunno what is it.</span> 12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">script</span> <span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;text\/javascript&quot;</span><span class="ruby-operator">&gt;</span>(.<span class="ruby-operator">+</span><span class="ruby-value">?)</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/script&gt;/</span><span class="ruby-identifier">m</span>
13 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">style</span> <span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;text\/css&quot;</span><span class="ruby-operator">&gt;</span>(.<span class="ruby-operator">+</span><span class="ruby-value">?)</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/style&gt;/</span><span class="ruby-identifier">m</span>
14 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
15 </body> 14 </body>
16 </html> 15 </html>
17 16
doc/classes/String.src/M000009.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_stylesheets (String)</title> 5 <title>strip_javascripts (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 136</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 129</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_stylesheets</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_javascripts</span>
12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_stylesheets!</span> 12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_javascripts!</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000010.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_punctuation! (String)</title> 5 <title>strip_stylesheets! (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 145</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 133</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_punctuation!</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_stylesheets!</span>
12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span>[<span class="ruby-operator">^</span><span class="ruby-identifier">a</span><span class="ruby-operator">-</span><span class="ruby-identifier">zA</span><span class="ruby-operator">-</span><span class="ruby-constant">Z0</span><span class="ruby-operator">-</span><span class="ruby-value">9</span>\<span class="ruby-operator">-</span>\<span class="ruby-identifier">s</span>]<span class="ruby-operator">/</span> 12 <span class="ruby-comment cmt"># TODO: rewamp. dunno what is it.</span>
13 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">style</span> <span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;text\/css&quot;</span><span class="ruby-operator">&gt;</span>(.<span class="ruby-operator">+</span><span class="ruby-value">?)</span><span class="ruby-operator">&lt;</span>\<span class="ruby-regexp re">/style&gt;/</span><span class="ruby-identifier">m</span>
13 <span class="ruby-keyword kw">end</span></pre> 14 <span class="ruby-keyword kw">end</span></pre>
14 </body> 15 </body>
15 </html> 16 </html>
16 17
doc/classes/String.src/M000011.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>strip_punctuation (String)</title> 5 <title>strip_stylesheets (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 153</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 138</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_punctuation</span> 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_stylesheets</span>
12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_punctuation!</span> 12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_stylesheets!</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000012.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>extract_xmltags_values (String)</title> 5 <title>strip_punctuation! (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> 7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head> 8 </head>
9 <body class="standalone-code"> 9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 161</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 147</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_xmltags_values</span>(<span class="ruby-identifier">tag_name</span>) 11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_punctuation!</span>
12 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-node">/&lt;#{tag_name}.*?&gt;(.+?)&lt;\/#{tag_name}&gt;/</span>).<span class="ruby-identifier">flatten</span> 12 <span class="ruby-identifier">replace</span> <span class="ruby-identifier">strip_with_pattern</span> <span class="ruby-operator">/</span>[<span class="ruby-operator">^</span><span class="ruby-identifier">a</span><span class="ruby-operator">-</span><span class="ruby-identifier">zA</span><span class="ruby-operator">-</span><span class="ruby-constant">Z0</span><span class="ruby-operator">-</span><span class="ruby-value">9</span>\<span class="ruby-operator">-</span>\<span class="ruby-identifier">s</span>]<span class="ruby-operator">/</span>
13 <span class="ruby-keyword kw">end</span></pre> 13 <span class="ruby-keyword kw">end</span></pre>
14 </body> 14 </body>
15 </html> 15 </html>
16 16
doc/classes/String.src/M000013.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>strip_punctuation (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 155</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_punctuation</span>
12 <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">strip_punctuation!</span>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/String.src/M000014.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>extract_xmltags_values (String)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/string.rb, line 163</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_xmltags_values</span>(<span class="ruby-identifier">tag_name</span>)
12 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-node">/&lt;#{tag_name}.*?&gt;(.+?)&lt;\/#{tag_name}&gt;/</span>).<span class="ruby-identifier">flatten</span>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/TreeTagger.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Module: TreeTagger [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Module</strong></td>
49 <td class="class-name-in-header">TreeTagger</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 </table>
70 </div>
71 <!-- banner header -->
72
73 <div id="bodyContent">
74
75 <div id="contextContent">
76
77 <div id="description">
78 <p>
79 TreeTagger-related stuff module.
80 </p>
81 <p>
82 See <a
83 href="http://www.ims.uni-stuttgart.de/projekte/corplex/TreeTagger/DecisionTreeTagger.html">www.ims.uni-stuttgart.de/projekte/corplex/TreeTagger/DecisionTreeTagger.html</a>
84 </p>
85
86 </div>
87
88 </div>
89
90
91 </div>
92
93 <!-- if includes -->
94
95 <div id="section">
96
97 <div id="class-list">
98 <h3 class="section-bar">Classes and Modules</h3>
99
100 Class <a href="TreeTagger/Chunk.html" class="link">TreeTagger::Chunk</a><br />
101 Class <a href="TreeTagger/TaggerChunker.html" class="link">TreeTagger::TaggerChunker</a><br />
102 Class <a href="TreeTagger/TaggerChunkerEnglish.html" class="link">TreeTagger::TaggerChunkerEnglish</a><br />
103 Class <a href="TreeTagger/TaggerChunkerFrench.html" class="link">TreeTagger::TaggerChunkerFrench</a><br />
104 Class <a href="TreeTagger/TaggerChunkerGerman.html" class="link">TreeTagger::TaggerChunkerGerman</a><br />
105
106 </div>
107
108
109
110
111 <!-- if method_list -->
112
113
114
115
116 </div>
117
118 <div id="validator-badges">
119 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
120 </div>
121
122 </body>
123 </html>
124
doc/classes/TreeTagger/Chunk.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: TreeTagger::Chunk [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">TreeTagger::Chunk</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 Object
74
75 </td>
76 </tr>
77
78 </table>
79 </div>
80 <!-- banner header -->
81
82 <div id="bodyContent">
83
84 <div id="contextContent">
85
86 <div id="description">
87 <p>
88 Represents a <a href="Chunk.html">Chunk</a> extracted when parsing a <a
89 href="TaggerChunker.html">TaggerChunker</a> file.
90 </p>
91
92 </div>
93
94 </div>
95
96
97 <div id="method-list">
98 <h3 class="section-bar">Methods</h3>
99
100 <div class="name-list">
101
102 <a href="#M000017">new</a>&nbsp;&nbsp;
103
104 </div>
105 </div>
106
107 </div>
108
109 <!-- if includes -->
110
111 <div id="section">
112
113
114
115 <div id="attribute-list">
116 <h3 class="section-bar">Attributes</h3>
117
118 <div class="name-list">
119 <table>
120
121 <tr class="top-aligned-row context-row">
122 <td class="context-item-name">tag</td>
123
124 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
125
126 <td class="context-item-desc"></td>
127 </tr>
128
129 <tr class="top-aligned-row context-row">
130 <td class="context-item-name">words</td>
131
132 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
133
134 <td class="context-item-desc"></td>
135 </tr>
136
137 </table>
138 </div>
139 </div>
140
141
142 <!-- if method_list -->
143
144 <div id="methods">
145
146 <h3 class="section-bar">Public Class methods</h3>
147
148
149 <div id="method-M000017" class="method-detail">
150 <a name="M000017"></a>
151
152 <div class="method-heading">
153
154 <a href="Chunk.src/M000017.html" target="Code" class="method-signature"
155 onclick="popupCode('Chunk.src/M000017.html');return false;">
156
157 <span class="method-name">new</span><span class="method-args">(str,tag)</span>
158
159 </a>
160
161 </div>
162
163 <div class="method-description">
164
165 <p>
166 Creates a <a href="Chunk.html">Chunk</a>.
167 </p>
168 <ul>
169 <li><tt>str</tt> are whitespace-separated terms.
170
171 </li>
172 <li><tt>tag</tt> see : <a
173 href="ftp://ftp.ims.uni-stuttgart.de/pub/corpora/chunker-tagset-english.txt">ftp.ims.uni-stuttgart.de/pub/corpora/chunker-tagset-english.txt</a>
174
175 </li>
176 </ul>
177
178 </div>
179 </div>
180
181
182
183 </div>
184
185
186
187
188 </div>
189
190 <div id="validator-badges">
191 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
192 </div>
193
194 </body>
195 </html>
196
doc/classes/TreeTagger/Chunk.src/M000017.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>new (TreeTagger::Chunk)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/ttagger.rb, line 89</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">str</span>,<span class="ruby-identifier">tag</span>
12 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>
13 <span class="ruby-ivar">@tag</span> = <span class="ruby-identifier">tag</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>]
14 <span class="ruby-keyword kw">end</span></pre>
15 </body>
16 </html>
17
doc/classes/TreeTagger/TaggerChunker.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: TreeTagger::TaggerChunker [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">TreeTagger::TaggerChunker</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 Object
74
75 </td>
76 </tr>
77
78 </table>
79 </div>
80 <!-- banner header -->
81
82 <div id="bodyContent">
83
84 <div id="contextContent">
85
86 <div id="description">
87 <p>
88 This class handles generic parsing of tagger-chunker outputs.
89 </p>
90
91 </div>
92
93 </div>
94
95
96 <div id="method-list">
97 <h3 class="section-bar">Methods</h3>
98
99 <div class="name-list">
100
101 <a href="#M000016">new</a>&nbsp;&nbsp;
102
103 <a href="#M000015">parse</a>&nbsp;&nbsp;
104
105 </div>
106 </div>
107
108 </div>
109
110 <!-- if includes -->
111
112 <div id="section">
113
114
115
116 <div id="attribute-list">
117 <h3 class="section-bar">Attributes</h3>
118
119 <div class="name-list">
120 <table>
121
122 <tr class="top-aligned-row context-row">
123 <td class="context-item-name">chunks</td>
124
125 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
126
127 <td class="context-item-desc"></td>
128 </tr>
129
130 <tr class="top-aligned-row context-row">
131 <td class="context-item-name">file</td>
132
133 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
134
135 <td class="context-item-desc"></td>
136 </tr>
137
138 </table>
139 </div>
140 </div>
141
142
143 <!-- if method_list -->
144
145 <div id="methods">
146
147 <h3 class="section-bar">Public Class methods</h3>
148
149
150 <div id="method-M000016" class="method-detail">
151 <a name="M000016"></a>
152
153 <div class="method-heading">
154
155 <a href="TaggerChunker.src/M000016.html" target="Code" class="method-signature"
156 onclick="popupCode('TaggerChunker.src/M000016.html');return false;">
157
158 <span class="method-name">new</span><span class="method-args">(chunk_file)</span>
159
160 </a>
161
162 </div>
163
164 <div class="method-description">
165
166 <p>
167 Initializes parsing. <tt>chunk_file</tt> is the output of
168 <tt>tagger-chunker-</tt> and must be a valid path to the file.
169 </p>
170 <pre>
171 TaggerChunker.new(&quot;ttout/2010020&quot;) #=&gt; #&lt;RIR::TreeTagger::TaggerChunker:0x92fd088 @chunks=[#&lt;RIR::TreeTagger::Chunk:0x8ec5a10 @words=[&quot;robert&quot;, &quot;schumann&quot;], @tag=&quot;NC&quot;&gt;, ...] ...&gt;
172 </pre>
173
174 </div>
175 </div>
176
177
178 <div id="method-M000015" class="method-detail">
179 <a name="M000015"></a>
180
181 <div class="method-heading">
182
183 <a href="TaggerChunker.src/M000015.html" target="Code" class="method-signature"
184 onclick="popupCode('TaggerChunker.src/M000015.html');return false;">
185
186 <span class="method-name">parse</span><span class="method-args">(chunk_lines)</span>
187
188 </a>
189
190 </div>
191
192 <div class="method-description">
193
194 <p>
195 Parses a tagger-chunker output and returns an Array of <a
196 href="Chunk.html">Chunk</a>.
197 </p>
198
199 </div>
200 </div>
201
202
203
204 </div>
205
206
207
208
209 </div>
210
211 <div id="validator-badges">
212 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
213 </div>
214
215 </body>
216 </html>
217
doc/classes/TreeTagger/TaggerChunker.src/M000015.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>parse (TreeTagger::TaggerChunker)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/ttagger.rb, line 34</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">chunk_lines</span>
12 <span class="ruby-identifier">open</span> = <span class="ruby-keyword kw">false</span>
13 <span class="ruby-identifier">tag</span> = <span class="ruby-keyword kw">nil</span>
14
15 <span class="ruby-identifier">chunks</span> = []
16 <span class="ruby-identifier">words</span> = []
17
18 <span class="ruby-identifier">chunk_lines</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
19 <span class="ruby-identifier">l</span>.<span class="ruby-identifier">chomp!</span>
20 <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">l</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^&lt;\w+&gt;$/</span>
21 <span class="ruby-identifier">open</span> = <span class="ruby-keyword kw">true</span>
22 <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">l</span>
23 <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">l</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^&lt;\/\w+&gt;$/</span>
24 <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">words</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">open</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">l</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/&lt;/</span>, <span class="ruby-value str">'&lt;/'</span>)
25 <span class="ruby-identifier">open</span> = <span class="ruby-keyword kw">false</span>
26 <span class="ruby-identifier">chunks</span>.<span class="ruby-identifier">push</span> <span class="ruby-constant">Chunk</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">words</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>), <span class="ruby-identifier">tag</span>)
27 <span class="ruby-identifier">words</span>.<span class="ruby-identifier">clear</span>
28 <span class="ruby-keyword kw">else</span>
29 <span class="ruby-keyword kw">next</span>
30 <span class="ruby-keyword kw">end</span>
31 <span class="ruby-keyword kw">else</span>
32 <span class="ruby-identifier">words</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">l</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">first</span>)
33 <span class="ruby-keyword kw">end</span>
34 <span class="ruby-keyword kw">end</span>
35
36 <span class="ruby-identifier">chunks</span>
37 <span class="ruby-keyword kw">end</span></pre>
38 </body>
39 </html>
40
doc/classes/TreeTagger/TaggerChunker.src/M000016.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>new (TreeTagger::TaggerChunker)</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10 <pre><span class="ruby-comment cmt"># File lib/rir/ttagger.rb, line 66</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">chunk_file</span>
12 <span class="ruby-ivar">@chunks</span> = <span class="ruby-constant">TaggerChunker</span>.<span class="ruby-identifier">parse</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">chunk_file</span>).<span class="ruby-identifier">readlines</span>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/TreeTagger/TaggerChunkerEnglish.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: TreeTagger::TaggerChunkerEnglish [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">TreeTagger::TaggerChunkerEnglish</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 <a href="TaggerChunker.html">
74
75 TreeTagger::TaggerChunker
76
77 </a>
78
79 </td>
80 </tr>
81
82 </table>
83 </div>
84 <!-- banner header -->
85
86 <div id="bodyContent">
87
88 <div id="contextContent">
89
90 </div>
91
92
93 </div>
94
95 <!-- if includes -->
96
97 <div id="section">
98
99
100
101
102 <!-- if method_list -->
103
104
105
106
107 </div>
108
109 <div id="validator-badges">
110 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
111 </div>
112
113 </body>
114 </html>
115
doc/classes/TreeTagger/TaggerChunkerFrench.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: TreeTagger::TaggerChunkerFrench [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">TreeTagger::TaggerChunkerFrench</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 <a href="TaggerChunker.html">
74
75 TreeTagger::TaggerChunker
76
77 </a>
78
79 </td>
80 </tr>
81
82 </table>
83 </div>
84 <!-- banner header -->
85
86 <div id="bodyContent">
87
88 <div id="contextContent">
89
90 </div>
91
92
93 </div>
94
95 <!-- if includes -->
96
97 <div id="section">
98
99
100
101
102 <!-- if method_list -->
103
104
105
106
107 </div>
108
109 <div id="validator-badges">
110 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
111 </div>
112
113 </body>
114 </html>
115
doc/classes/TreeTagger/TaggerChunkerGerman.html
File was created 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Class: TreeTagger::TaggerChunkerGerman [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript">
10 // <![CDATA[
11
12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 }
15
16 function toggleCode( id ) {
17 if ( document.getElementById )
18 elem = document.getElementById( id );
19 else if ( document.all )
20 elem = eval( "document.all." + id );
21 else
22 return false;
23
24 elemStyle = elem.style;
25
26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block"
28 } else {
29 elemStyle.display = "none"
30 }
31
32 return true;
33 }
34
35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
38 // ]]>
39 </script>
40
41 </head>
42 <body>
43
44
45 <div id="classHeader">
46 <table class="header-table">
47 <tr class="top-aligned-row">
48 <td><strong>Class</strong></td>
49 <td class="class-name-in-header">TreeTagger::TaggerChunkerGerman</td>
50 </tr>
51 <tr class="top-aligned-row">
52 <td><strong>In:</strong></td>
53 <td>
54
55
56 <a href="../../files/lib/rir/ttagger_rb.html">
57
58 lib/rir/ttagger.rb
59
60 </a>
61
62
63 <br />
64
65 </td>
66 </tr>
67
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72
73 <a href="TaggerChunker.html">
74
75 TreeTagger::TaggerChunker
76
77 </a>
78
79 </td>
80 </tr>
81
82 </table>
83 </div>
84 <!-- banner header -->
85
86 <div id="bodyContent">
87
88 <div id="contextContent">
89
90 </div>
91
92
93 </div>
94
95 <!-- if includes -->
96
97 <div id="section">
98
99
100
101
102 <!-- if method_list -->
103
104
105
106
107 </div>
108
109 <div id="validator-badges">
110 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
111 </div>
112
113 </body>
114 </html>
115
1 Thu, 25 Nov 2010 17:10:04 +0100 1 Thu, 25 Nov 2010 17:21:51 +0100
2 2
doc/files/lib/rir/corpus_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: corpus.rb [RDoc Documentation]</title> 5 <title>File: corpus.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>corpus.rb</h1> 46 <h1>corpus.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/corpus.rb 50 <td>lib/rir/corpus.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-23 18:20:24 +0100</td> 56 <td>2010-11-25 17:20:52 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65
66 <div id="description">
67 <p>
68 This file is a part of an Information Retrieval oriented Ruby library
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p>
90
91 </div>
92 65
93 </div> 66 </div>
94 67
95 68
96 </div> 69 </div>
97 70
98 <!-- if includes --> 71 <!-- if includes -->
99 72
100 <div id="section"> 73 <div id="section">
101 74
102 75
103 76
104 77
105 <!-- if method_list --> 78 <!-- if method_list -->
106 79
107 80
108 81
109 82
110 </div> 83 </div>
111 84
112 <div id="validator-badges"> 85 <div id="validator-badges">
113 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 86 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114 </div> 87 </div>
115 88
116 </body> 89 </body>
117 </html> 90 </html>
118 91
doc/files/lib/rir/document_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: document.rb [RDoc Documentation]</title> 5 <title>File: document.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>document.rb</h1> 46 <h1>document.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/document.rb 50 <td>lib/rir/document.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-25 16:04:20 +0100</td> 56 <td>2010-11-25 17:20:25 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65
66 <div id="description">
67 <p>
68 This file is a part of an Information Retrieval oriented Ruby library
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p>
90
91 </div>
92 65
93 <div id="requires-list"> 66 <div id="requires-list">
94 <h3 class="section-bar">Required files</h3> 67 <h3 class="section-bar">Required files</h3>
95 68
96 <div class="name-list"> 69 <div class="name-list">
97 70
98 net/http&nbsp;&nbsp; 71 net/http&nbsp;&nbsp;
99 72
100 rexml/document&nbsp;&nbsp; 73 rexml/document&nbsp;&nbsp;
101 74
102 net/http&nbsp;&nbsp; 75 net/http&nbsp;&nbsp;
103 76
104 kconv&nbsp;&nbsp; 77 kconv&nbsp;&nbsp;
105 78
106 </div> 79 </div>
107 </div> 80 </div>
108 81
109 </div> 82 </div>
110 83
111 84
112 </div> 85 </div>
113 86
114 <!-- if includes --> 87 <!-- if includes -->
115 88
116 <div id="section"> 89 <div id="section">
117 90
118 91
119 92
120 93
121 <!-- if method_list --> 94 <!-- if method_list -->
122 95
123 96
124 97
125 98
126 </div> 99 </div>
127 100
128 <div id="validator-badges"> 101 <div id="validator-badges">
129 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 102 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
130 </div> 103 </div>
131 104
132 </body> 105 </body>
133 </html> 106 </html>
134 107
doc/files/lib/rir/query_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: query.rb [RDoc Documentation]</title> 5 <title>File: query.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>query.rb</h1> 46 <h1>query.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/query.rb 50 <td>lib/rir/query.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-25 13:25:18 +0100</td> 56 <td>2010-11-25 17:21:14 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65
66 <div id="description">
67 <p>
68 This file is a part of an Information Retrieval oriented Ruby library
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p>
90
91 </div>
92 65
93 </div> 66 </div>
94 67
95 68
96 </div> 69 </div>
97 70
98 <!-- if includes --> 71 <!-- if includes -->
99 72
100 <div id="section"> 73 <div id="section">
101 74
102 75
103 76
104 77
105 <!-- if method_list --> 78 <!-- if method_list -->
106 79
107 80
108 81
109 82
110 </div> 83 </div>
111 84
112 <div id="validator-badges"> 85 <div id="validator-badges">
113 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 86 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114 </div> 87 </div>
115 88
116 </body> 89 </body>
117 </html> 90 </html>
118 91
doc/files/lib/rir/regexp_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: regexp.rb [RDoc Documentation]</title> 5 <title>File: regexp.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>regexp.rb</h1> 46 <h1>regexp.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/regexp.rb 50 <td>lib/rir/regexp.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-19 11:27:06 +0100</td> 56 <td>2010-11-25 17:19:39 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65
66 <div id="description">
67 <p>
68 This file is a part of an Information Retrieval oriented Ruby library
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p>
90
91 </div>
92 65
93 </div> 66 </div>
94 67
95 68
96 </div> 69 </div>
97 70
98 <!-- if includes --> 71 <!-- if includes -->
99 72
100 <div id="section"> 73 <div id="section">
101 74
102 75
103 76
104 77
105 <!-- if method_list --> 78 <!-- if method_list -->
106 79
107 80
108 81
109 82
110 </div> 83 </div>
111 84
112 <div id="validator-badges"> 85 <div id="validator-badges">
113 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 86 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114 </div> 87 </div>
115 88
116 </body> 89 </body>
117 </html> 90 </html>
118 91
doc/files/lib/rir/string_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: string.rb [RDoc Documentation]</title> 5 <title>File: string.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>string.rb</h1> 46 <h1>string.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/string.rb 50 <td>lib/rir/string.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-23 18:20:41 +0100</td> 56 <td>2010-11-25 17:20:14 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65 65
66 <div id="description"> 66 <div id="description">
67 <p> 67 <hr size="1"></hr><p>
68 This file is a part of an Information Retrieval oriented Ruby library 68 General module for many purposes related to Information Retrieval.
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p> 69 </p>
90 70
91 </div> 71 </div>
92 72
93 <div id="requires-list"> 73 <div id="requires-list">
94 <h3 class="section-bar">Required files</h3> 74 <h3 class="section-bar">Required files</h3>
95 75
96 <div class="name-list"> 76 <div class="name-list">
97 77
98 cgi&nbsp;&nbsp; 78 cgi&nbsp;&nbsp;
99 79
100 kconv&nbsp;&nbsp; 80 kconv&nbsp;&nbsp;
101 81
102 </div> 82 </div>
103 </div> 83 </div>
104 84
105 </div> 85 </div>
106 86
107 87
108 </div> 88 </div>
109 89
110 <!-- if includes --> 90 <!-- if includes -->
111 91
112 <div id="section"> 92 <div id="section">
113 93
114 94
115 95
116 96
117 <!-- if method_list --> 97 <!-- if method_list -->
118 98
119 99
120 100
121 101
122 </div> 102 </div>
123 103
124 <div id="validator-badges"> 104 <div id="validator-badges">
125 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 105 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
126 </div> 106 </div>
127 107
128 </body> 108 </body>
129 </html> 109 </html>
130 110
doc/files/lib/rir/ttagger_rb.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head> 4 <head>
5 <title>File: ttagger.rb [RDoc Documentation]</title> 5 <title>File: ttagger.rb [RDoc Documentation]</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 7 <meta http-equiv="Content-Script-Type" content="text/javascript" />
8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> 8 <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 // <![CDATA[ 10 // <![CDATA[
11 11
12 function popupCode( url ) { 12 function popupCode( url ) {
13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") 13 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14 } 14 }
15 15
16 function toggleCode( id ) { 16 function toggleCode( id ) {
17 if ( document.getElementById ) 17 if ( document.getElementById )
18 elem = document.getElementById( id ); 18 elem = document.getElementById( id );
19 else if ( document.all ) 19 else if ( document.all )
20 elem = eval( "document.all." + id ); 20 elem = eval( "document.all." + id );
21 else 21 else
22 return false; 22 return false;
23 23
24 elemStyle = elem.style; 24 elemStyle = elem.style;
25 25
26 if ( elemStyle.display != "block" ) { 26 if ( elemStyle.display != "block" ) {
27 elemStyle.display = "block" 27 elemStyle.display = "block"
28 } else { 28 } else {
29 elemStyle.display = "none" 29 elemStyle.display = "none"
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34 34
35 // Make codeblocks hidden by default 35 // Make codeblocks hidden by default
36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" ) 36 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37 37
38 // ]]> 38 // ]]>
39 </script> 39 </script>
40 40
41 </head> 41 </head>
42 <body> 42 <body>
43 43
44 44
45 <div id="fileHeader"> 45 <div id="fileHeader">
46 <h1>ttagger.rb</h1> 46 <h1>ttagger.rb</h1>
47 <table class="header-table"> 47 <table class="header-table">
48 <tr class="top-aligned-row"> 48 <tr class="top-aligned-row">
49 <td><strong>Path:</strong></td> 49 <td><strong>Path:</strong></td>
50 <td>lib/rir/ttagger.rb 50 <td>lib/rir/ttagger.rb
51 51
52 </td> 52 </td>
53 </tr> 53 </tr>
54 <tr class="top-aligned-row"> 54 <tr class="top-aligned-row">
55 <td><strong>Last Update:</strong></td> 55 <td><strong>Last Update:</strong></td>
56 <td>2010-11-25 17:01:46 +0100</td> 56 <td>2010-11-25 17:21:44 +0100</td>
57 </tr> 57 </tr>
58 </table> 58 </table>
59 </div> 59 </div>
60 <!-- banner header --> 60 <!-- banner header -->
61 61
62 <div id="bodyContent"> 62 <div id="bodyContent">
63 63
64 <div id="contextContent"> 64 <div id="contextContent">
65
66 <div id="description">
67 <p>
68 This file is a part of an Information Retrieval oriented Ruby library
69 </p>
70 <p>
71 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
72 </p>
73 <p>
74 This program is free software: you can redistribute it and/or modify it
75 under the terms of the GNU General Public License as published by the Free
76 Software Foundation, either version 3 of the License, or (at your option)
77 any later version.
78 </p>
79 <p>
80 This program is distributed in the hope that it will be useful, but WITHOUT
81 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
83 more details.
84 </p>
85 <p>
86 You should have received a copy of the GNU General Public License along
87 with this program. If not, see <<a
88 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
89 </p>
90 <hr size="1"></hr><p>
91 This file is a part of an Information Retrieval oriented Ruby library
92 </p>
93 <p>
94 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
95 </p>
96 <p>
97 This program is free software: you can redistribute it and/or modify it
98 under the terms of the GNU General Public License as published by the Free
99 Software Foundation, either version 3 of the License, or (at your option)
100 any later version.
101 </p>
102 <p>
103 This program is distributed in the hope that it will be useful, but WITHOUT
104 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
105 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
106 more details.
107 </p>
108 <p>
109 You should have received a copy of the GNU General Public License along
110 with this program. If not, see <<a
111 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
112 </p>
113 <hr size="1"></hr><p>
114 This file is a part of an Information Retrieval oriented Ruby library
115 </p>
116 <p>
117 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
118 </p>
119 <p>
120 This program is free software: you can redistribute it and/or modify it
121 under the terms of the GNU General Public License as published by the Free
122 Software Foundation, either version 3 of the License, or (at your option)
123 any later version.
124 </p>
125 <p>
126 This program is distributed in the hope that it will be useful, but WITHOUT
127 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
128 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
129 more details.
130 </p>
131 <p>
132 You should have received a copy of the GNU General Public License along
133 with this program. If not, see <<a
134 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
135 </p>
136 <hr size="1"></hr><p>
137 This file is a part of an Information Retrieval oriented Ruby library
138 </p>
139 <p>
140 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
141 </p>
142 <p>
143 This program is free software: you can redistribute it and/or modify it
144 under the terms of the GNU General Public License as published by the Free
145 Software Foundation, either version 3 of the License, or (at your option)
146 any later version.
147 </p>
148 <p>
149 This program is distributed in the hope that it will be useful, but WITHOUT
150 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
151 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
152 more details.
153 </p>
154 <p>
155 You should have received a copy of the GNU General Public License along
156 with this program. If not, see <<a
157 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
158 </p>
159 <hr size="1"></hr><p>
160 General module for many purposes related to Information Retrieval.
161 </p>
162
163 </div>
164 65
165 </div> 66 </div>
166 67
167 68
168 </div> 69 </div>
169 70
170 <!-- if includes --> 71 <!-- if includes -->
171 72
172 <div id="section"> 73 <div id="section">
173 74
174 75
175 76
176 77
177 <!-- if method_list --> 78 <!-- if method_list -->
178 79
179 80
180 81
181 82
182 </div> 83 </div>
183 84
184 <div id="validator-badges"> 85 <div id="validator-badges">
185 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 86 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
186 </div> 87 </div>
187 88
188 </body> 89 </body>
189 </html> 90 </html>
190 91
doc/fr_class_index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!-- 4 <!--
5 5
6 Classes [RDoc Documentation] 6 Classes [RDoc Documentation]
7 7
8 --> 8 -->
9 <head> 9 <head>
10 <title>Classes [RDoc Documentation]</title> 10 <title>Classes [RDoc Documentation]</title>
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" /> 12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
13 <base target="docwin" /> 13 <base target="docwin" />
14 </head> 14 </head>
15 <body> 15 <body>
16 <div class="index"> 16 <div class="index">
17 <h1 class="section-bar">Classes</h1> 17 <h1 class="section-bar">Classes</h1>
18 <div id="index-entries"> 18 <div id="index-entries">
19 19
20 <a href="classes/RIR.html">RIR</a><br /> 20 <a href="classes/Corpus.html">Corpus</a><br />
21 21
22 <a href="classes/RIR/Corpus.html">RIR::Corpus</a><br /> 22 <a href="classes/Indri.html">Indri</a><br />
23 23
24 <a href="classes/RIR/Document.html">RIR::Document</a><br /> 24 <a href="classes/Indri/IndriQuery.html">Indri::IndriQuery</a><br />
25 25
26 <a href="classes/RIR/Indri.html">RIR::Indri</a><br /> 26 <a href="classes/Indri/Parameters.html">Indri::Parameters</a><br />
27 27
28 <a href="classes/RIR/Indri/IndriQuery.html">RIR::Indri::IndriQuery</a><br /> 28 <a href="classes/Query.html">Query</a><br />
29 29
30 <a href="classes/RIR/Indri/Parameters.html">RIR::Indri::Parameters</a><br /> 30 <a href="classes/RIR.html">RIR</a><br />
31 31
32 <a href="classes/RIR/Query.html">RIR::Query</a><br /> 32 <a href="classes/RIR/Document.html">RIR::Document</a><br />
33 33
34 <a href="classes/RIR/TreeTagger.html">RIR::TreeTagger</a><br /> 34 <a href="classes/RIR/WebDocument.html">RIR::WebDocument</a><br />
35 35
36 <a href="classes/RIR/TreeTagger/Chunk.html">RIR::TreeTagger::Chunk</a><br /> 36 <a href="classes/RIR/WikipediaPage.html">RIR::WikipediaPage</a><br />
37 37
38 <a href="classes/RIR/TreeTagger/TaggerChunker.html">RIR::TreeTagger::TaggerChunker</a><br /> 38 <a href="classes/Regexp.html">Regexp</a><br />
39 39
40 <a href="classes/RIR/TreeTagger/TaggerChunkerEnglish.html">RIR::TreeTagger::TaggerChunkerEnglish</a><br /> 40 <a href="classes/String.html">String</a><br />
41 41
42 <a href="classes/RIR/TreeTagger/TaggerChunkerFrench.html">RIR::TreeTagger::TaggerChunkerFrench</a><br /> 42 <a href="classes/TreeTagger.html">TreeTagger</a><br />
43 43
44 <a href="classes/RIR/TreeTagger/TaggerChunkerGerman.html">RIR::TreeTagger::TaggerChunkerGerman</a><br /> 44 <a href="classes/TreeTagger/Chunk.html">TreeTagger::Chunk</a><br />
45 45
46 <a href="classes/RIR/WebDocument.html">RIR::WebDocument</a><br /> 46 <a href="classes/TreeTagger/TaggerChunker.html">TreeTagger::TaggerChunker</a><br />
47 47
48 <a href="classes/RIR/WikipediaPage.html">RIR::WikipediaPage</a><br /> 48 <a href="classes/TreeTagger/TaggerChunkerEnglish.html">TreeTagger::TaggerChunkerEnglish</a><br />
49 49
50 <a href="classes/Regexp.html">Regexp</a><br /> 50 <a href="classes/TreeTagger/TaggerChunkerFrench.html">TreeTagger::TaggerChunkerFrench</a><br />
51 51
52 <a href="classes/String.html">String</a><br /> 52 <a href="classes/TreeTagger/TaggerChunkerGerman.html">TreeTagger::TaggerChunkerGerman</a><br />
53 53
54 </div> 54 </div>
55 </div> 55 </div>
56 </body> 56 </body>
57 </html> 57 </html>
58 58
doc/fr_file_index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!-- 4 <!--
5 5
6 Files [RDoc Documentation] 6 Files [RDoc Documentation]
7 7
8 --> 8 -->
9 <head> 9 <head>
10 <title>Files [RDoc Documentation]</title> 10 <title>Files [RDoc Documentation]</title>
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" /> 12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
13 <base target="docwin" /> 13 <base target="docwin" />
14 </head> 14 </head>
15 <body> 15 <body>
16 <div class="index"> 16 <div class="index">
17 <h1 class="section-bar">Files</h1> 17 <h1 class="section-bar">Files</h1>
18 <div id="index-entries"> 18 <div id="index-entries">
19 19
20 <a href="files/lib/rir_rb.html">lib/rir.rb</a><br />
21
22 <a href="files/lib/rir/corpus_rb.html">lib/rir/corpus.rb</a><br /> 20 <a href="files/lib/rir/corpus_rb.html">lib/rir/corpus.rb</a><br />
23 21
24 <a href="files/lib/rir/document_rb.html">lib/rir/document.rb</a><br /> 22 <a href="files/lib/rir/document_rb.html">lib/rir/document.rb</a><br />
25 23
26 <a href="files/lib/rir/query_rb.html">lib/rir/query.rb</a><br /> 24 <a href="files/lib/rir/query_rb.html">lib/rir/query.rb</a><br />
27 25
28 <a href="files/lib/rir/regexp_rb.html">lib/rir/regexp.rb</a><br /> 26 <a href="files/lib/rir/regexp_rb.html">lib/rir/regexp.rb</a><br />
29 27
30 <a href="files/lib/rir/string_rb.html">lib/rir/string.rb</a><br /> 28 <a href="files/lib/rir/string_rb.html">lib/rir/string.rb</a><br />
31 29
32 <a href="files/lib/rir/ttagger_rb.html">lib/rir/ttagger.rb</a><br /> 30 <a href="files/lib/rir/ttagger_rb.html">lib/rir/ttagger.rb</a><br />
33 31
34 </div> 32 </div>
35 </div> 33 </div>
36 </body> 34 </body>
37 </html> 35 </html>
38 36
doc/fr_method_index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!-- 4 <!--
5 5
6 Methods [RDoc Documentation] 6 Methods [RDoc Documentation]
7 7
8 --> 8 -->
9 <head> 9 <head>
10 <title>Methods [RDoc Documentation]</title> 10 <title>Methods [RDoc Documentation]</title>
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" /> 12 <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
13 <base target="docwin" /> 13 <base target="docwin" />
14 </head> 14 </head>
15 <body> 15 <body>
16 <div class="index"> 16 <div class="index">
17 <h1 class="section-bar">Methods</h1> 17 <h1 class="section-bar">Methods</h1>
18 <div id="index-entries"> 18 <div id="index-entries">
19 19
20 <a href="classes/RIR/Document.html#M000024">count_words (RIR::Document)</a><br /> 20 <a href="classes/RIR/Document.html#M000024">count_words (RIR::Document)</a><br />
21 21
22 <a href="classes/RIR/Document.html#M000025">entropy (RIR::Document)</a><br /> 22 <a href="classes/RIR/Document.html#M000025">entropy (RIR::Document)</a><br />
23 23
24 <a href="classes/String.html#M000012">extract_xmltags_values (String)</a><br /> 24 <a href="classes/String.html#M000014">extract_xmltags_values (String)</a><br />
25 25
26 <a href="classes/RIR/Corpus.html#M000021">files (RIR::Corpus)</a><br /> 26 <a href="classes/Corpus.html#M000002">files (Corpus)</a><br />
27 27
28 <a href="classes/RIR/Document.html#M000022">format_words (RIR::Document)</a><br /> 28 <a href="classes/RIR/Document.html#M000022">format_words (RIR::Document)</a><br />
29 29
30 <a href="classes/RIR/WebDocument.html#M000028">get_content (RIR::WebDocument)</a><br /> 30 <a href="classes/RIR/WebDocument.html#M000028">get_content (RIR::WebDocument)</a><br />
31 31
32 <a href="classes/RIR/WikipediaPage.html#M000031">get_url (RIR::WikipediaPage)</a><br /> 32 <a href="classes/RIR/WikipediaPage.html#M000031">get_url (RIR::WikipediaPage)</a><br />
33 33
34 <a href="classes/String.html#M000002">is_stopword? (String)</a><br /> 34 <a href="classes/String.html#M000004">is_stopword? (String)</a><br />
35 35
36 <a href="classes/Regexp.html#M000001">negated (Regexp)</a><br /> 36 <a href="classes/Regexp.html#M000003">negated (Regexp)</a><br />
37 37
38 <a href="classes/RIR/Document.html#M000027">new (RIR::Document)</a><br /> 38 <a href="classes/RIR/Document.html#M000027">new (RIR::Document)</a><br />
39 39
40 <a href="classes/RIR/WebDocument.html#M000029">new (RIR::WebDocument)</a><br /> 40 <a href="classes/RIR/WebDocument.html#M000029">new (RIR::WebDocument)</a><br />
41 41
42 <a href="classes/RIR/Indri/IndriQuery.html#M000018">new (RIR::Indri::IndriQuery)</a><br /> 42 <a href="classes/Indri/IndriQuery.html#M000020">new (Indri::IndriQuery)</a><br />
43 43
44 <a href="classes/RIR/Corpus.html#M000020">new (RIR::Corpus)</a><br /> 44 <a href="classes/Indri/Parameters.html#M000018">new (Indri::Parameters)</a><br />
45 45
46 <a href="classes/RIR/TreeTagger/TaggerChunker.html#M000014">new (RIR::TreeTagger::TaggerChunker)</a><br /> 46 <a href="classes/Corpus.html#M000001">new (Corpus)</a><br />
47 47
48 <a href="classes/RIR/Indri/Parameters.html#M000016">new (RIR::Indri::Parameters)</a><br /> 48 <a href="classes/TreeTagger/TaggerChunker.html#M000016">new (TreeTagger::TaggerChunker)</a><br />
49 49
50 <a href="classes/RIR/TreeTagger/Chunk.html#M000015">new (RIR::TreeTagger::Chunk)</a><br /> 50 <a href="classes/TreeTagger/Chunk.html#M000017">new (TreeTagger::Chunk)</a><br />
51 51
52 <a href="classes/RIR/Document.html#M000023">ngrams (RIR::Document)</a><br /> 52 <a href="classes/RIR/Document.html#M000023">ngrams (RIR::Document)</a><br />
53 53
54 <a href="classes/RIR/TreeTagger/TaggerChunker.html#M000013">parse (RIR::TreeTagger::TaggerChunker)</a><br /> 54 <a href="classes/TreeTagger/TaggerChunker.html#M000015">parse (TreeTagger::TaggerChunker)</a><br />
55 55
56 <a href="classes/String.html#M000003">remove_special_characters (String)</a><br /> 56 <a href="classes/String.html#M000005">remove_special_characters (String)</a><br />
57 57
58 <a href="classes/RIR/WikipediaPage.html#M000032">search_homepage (RIR::WikipediaPage)</a><br /> 58 <a href="classes/RIR/WikipediaPage.html#M000032">search_homepage (RIR::WikipediaPage)</a><br />
59 59
60 <a href="classes/RIR/WikipediaPage.html#M000030">search_wikipedia_titles (RIR::WikipediaPage)</a><br /> 60 <a href="classes/RIR/WikipediaPage.html#M000030">search_wikipedia_titles (RIR::WikipediaPage)</a><br />
61 61
62 <a href="classes/String.html#M000007">strip_javascripts (String)</a><br /> 62 <a href="classes/String.html#M000009">strip_javascripts (String)</a><br />
63 63
64 <a href="classes/String.html#M000006">strip_javascripts! (String)</a><br /> 64 <a href="classes/String.html#M000008">strip_javascripts! (String)</a><br />
65 65
66 <a href="classes/String.html#M000011">strip_punctuation (String)</a><br /> 66 <a href="classes/String.html#M000013">strip_punctuation (String)</a><br />
67 67
68 <a href="classes/String.html#M000010">strip_punctuation! (String)</a><br /> 68 <a href="classes/String.html#M000012">strip_punctuation! (String)</a><br />
69 69
70 <a href="classes/String.html#M000009">strip_stylesheets (String)</a><br /> 70 <a href="classes/String.html#M000011">strip_stylesheets (String)</a><br />
71 71
72 <a href="classes/String.html#M000008">strip_stylesheets! (String)</a><br /> 72 <a href="classes/String.html#M000010">strip_stylesheets! (String)</a><br />
73 73
74 <a href="classes/String.html#M000005">strip_xml_tags (String)</a><br /> 74 <a href="classes/String.html#M000007">strip_xml_tags (String)</a><br />
75 75
76 <a href="classes/String.html#M000004">strip_xml_tags! (String)</a><br /> 76 <a href="classes/String.html#M000006">strip_xml_tags! (String)</a><br />
77 77
78 <a href="classes/RIR/Document.html#M000026">tf (RIR::Document)</a><br /> 78 <a href="classes/RIR/Document.html#M000026">tf (RIR::Document)</a><br />
79 79
80 <a href="classes/RIR/Indri/IndriQuery.html#M000019">to_s (RIR::Indri::IndriQuery)</a><br /> 80 <a href="classes/Indri/Parameters.html#M000019">to_s (Indri::Parameters)</a><br />
81 81
82 <a href="classes/RIR/Indri/Parameters.html#M000017">to_s (RIR::Indri::Parameters)</a><br /> 82 <a href="classes/Indri/IndriQuery.html#M000021">to_s (Indri::IndriQuery)</a><br />
83 83
84 </div> 84 </div>
85 </div> 85 </div>
86 </body> 86 </body>
87 </html> 87 </html>
88 88
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!-- 4 <!--
5 5
6 RDoc Documentation 6 RDoc Documentation
7 7
8 --> 8 -->
9 <head> 9 <head>
10 <title>RDoc Documentation</title> 10 <title>RDoc Documentation</title>
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12 </head> 12 </head>
13 <frameset rows="20%, 80%"> 13 <frameset rows="20%, 80%">
14 <frameset cols="25%,35%,45%"> 14 <frameset cols="25%,35%,45%">
15 <frame src="fr_file_index.html" title="Files" name="Files" /> 15 <frame src="fr_file_index.html" title="Files" name="Files" />
16 <frame src="fr_class_index.html" name="Classes" /> 16 <frame src="fr_class_index.html" name="Classes" />
17 <frame src="fr_method_index.html" name="Methods" /> 17 <frame src="fr_method_index.html" name="Methods" />
18 </frameset> 18 </frameset>
19 <frame src="files/lib/rir_rb.html" name="docwin" /> 19 <frame src="files/lib/rir/ttagger_rb.html" name="docwin" />
20 </frameset> 20 </frameset>
21 </html> 21 </html>
22 22
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
19 21
20 module RIR 22 class Corpus
23 attr_accessor :path
21 24
22 class Corpus 25 def initialize(path)
23 attr_accessor :path 26 @path = path.chomp "/"
24
25 def initialize(path)
26 @path = path.chomp "/"
27 end
28
29 # Recursively outputs all files in +self.path+.
30 # WARNING ! This function may take a lot of time if many
31 # files are in subdirectories.
32 #
33 # c = Corpus.new "my/path"
34 # c.files # => ["README.txt", "lib/code.rb"]
35 def files
36 Dir["#{@path}/**/*.*"]
37 end
38 end 27 end
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
21
19 22
20 # General module for many purposes related to Information Retrieval. 23 # General module for many purposes related to Information Retrieval.
21 module RIR 24 module RIR
22 25
23 # A Document is a bag of words and is constructed from a string. 26 # A Document is a bag of words and is constructed from a string.
24 class Document 27 class Document
25 attr_reader :words, :doc_content 28 attr_reader :words, :doc_content
26 29
27 # Any non-word characters are removed from the words (see http://perldoc.perl.org/perlre.html 30 # Any non-word characters are removed from the words (see http://perldoc.perl.org/perlre.html
28 # and the \\W special escape). 31 # and the \\W special escape).
29 # 32 #
30 # Protected function, only meant to by called at the initialization. 33 # Protected function, only meant to by called at the initialization.
31 def format_words 34 def format_words
32 wo = [] 35 wo = []
33 36
34 @doc_content.split.each do |w| 37 @doc_content.split.each do |w|
35 w.split(/\W/).each do |sw| 38 w.split(/\W/).each do |sw|
36 wo.push(sw.downcase) if sw =~ /[a-zA-Z]/ 39 wo.push(sw.downcase) if sw =~ /[a-zA-Z]/
37 end 40 end
38 end 41 end
39 42
40 wo 43 wo
41 end 44 end
42 45
43 # Returns an Array containing the +n+-grams (words) from the current Document. 46 # Returns an Array containing the +n+-grams (words) from the current Document.
44 # 47 #
45 # ngrams(2) #=> ["the free", "free encyclopedia", "encyclopedia var", "var skin", ...] 48 # ngrams(2) #=> ["the free", "free encyclopedia", "encyclopedia var", "var skin", ...]
46 def ngrams(n) 49 def ngrams(n)
47 window = [] 50 window = []
48 ngrams_array = [] 51 ngrams_array = []
49 52
50 @words.each do |w| 53 @words.each do |w|
51 window.push(w) 54 window.push(w)
52 if window.size == n 55 if window.size == n
53 ngrams_array.push window.join(" ") 56 ngrams_array.push window.join(" ")
54 window.delete_at(0) 57 window.delete_at(0)
55 end 58 end
56 end 59 end
57 60
58 ngrams_array.uniq 61 ngrams_array.uniq
59 end 62 end
60 63
61 # Returns a Hash containing the words and their associated counts in the current Document. 64 # Returns a Hash containing the words and their associated counts in the current Document.
62 # 65 #
63 # count_words #=> { "guitar"=>1, "bass"=>3, "album"=>20, ... } 66 # count_words #=> { "guitar"=>1, "bass"=>3, "album"=>20, ... }
64 def count_words 67 def count_words
65 counts = Hash.new { |h,k| h[k] = 0 } 68 counts = Hash.new { |h,k| h[k] = 0 }
66 @words.each { |w| counts[w] += 1 } 69 @words.each { |w| counts[w] += 1 }
67 70
68 counts 71 counts
69 end 72 end
70 73
71 # Computes the entropy of a given string +s+ inside the document. 74 # Computes the entropy of a given string +s+ inside the document.
72 # 75 #
73 # If the string parameter is composed of many words (i.e. tokens separated 76 # If the string parameter is composed of many words (i.e. tokens separated
74 # by whitespace(s)), it is considered as an ngram. 77 # by whitespace(s)), it is considered as an ngram.
75 # 78 #
76 # entropy("guitar") #=> 0.00432114812727959 79 # entropy("guitar") #=> 0.00432114812727959
77 # entropy("dillinger escape plan") #=> 0.265862076325102 80 # entropy("dillinger escape plan") #=> 0.265862076325102
78 def entropy(s) 81 def entropy(s)
79 en = 0.0 82 en = 0.0
80 counts = self.count_words 83 counts = self.count_words
81 84
82 s.split.each do |w| 85 s.split.each do |w|
83 p_wi = counts[w].to_f/@words.count.to_f 86 p_wi = counts[w].to_f/@words.count.to_f
84 en += p_wi*Math.log2(p_wi) 87 en += p_wi*Math.log2(p_wi)
85 end 88 end
86 89
87 en *= -1 90 en *= -1
88 en 91 en
89 end 92 end
90 93
91 # Computes the term frequency of a given *word* +s+. 94 # Computes the term frequency of a given *word* +s+.
92 # 95 #
93 # tf("guitar") #=> 0.000380372765310004 96 # tf("guitar") #=> 0.000380372765310004
94 def tf(s) 97 def tf(s)
95 self.count_words[s].to_f/@words.size.to_f 98 self.count_words[s].to_f/@words.size.to_f
96 end 99 end
97 100
98 101
99 def initialize(content) 102 def initialize(content)
100 @doc_content = content 103 @doc_content = content
101 @words = format_words 104 @words = format_words
102 end 105 end
103 106
104 protected :format_words 107 protected :format_words
105 end 108 end
106 109
107 # A WebDocument is a Document with a +url+. 110 # A WebDocument is a Document with a +url+.
108 class WebDocument < Document 111 class WebDocument < Document
109 attr_reader :url 112 attr_reader :url
110 113
111 # Returns the HTML text from the page of a given +url+. 114 # Returns the HTML text from the page of a given +url+.
112 def self.get_content(url) 115 def self.get_content(url)
113 require 'net/http' 116 require 'net/http'
114 Net::HTTP.get(URI.parse(url)) 117 Net::HTTP.get(URI.parse(url))
115 end 118 end
116 119
117 # WebDocument constructor, the content of the Document is the HTML page 120 # WebDocument constructor, the content of the Document is the HTML page
118 # without the tags. 121 # without the tags.
119 def initialize(url) 122 def initialize(url)
120 @url = url 123 @url = url
121 super WebDocument.get_content(url).strip_javascripts.strip_stylesheets.strip_xml_tags 124 super WebDocument.get_content(url).strip_javascripts.strip_stylesheets.strip_xml_tags
122 end 125 end
123 end 126 end
124 127
125 # A WikipediaPage is a WebDocument. 128 # A WikipediaPage is a WebDocument.
126 class WikipediaPage < WebDocument 129 class WikipediaPage < WebDocument
127 require 'rexml/document' 130 require 'rexml/document'
128 require 'net/http' 131 require 'net/http'
129 require 'kconv' 132 require 'kconv'
130 133
131 134
132 def self.search_wikipedia_titles(name) 135 def self.search_wikipedia_titles(name)
133 raise ArgumentError, "Bad encoding", name unless name.isutf8 136 raise ArgumentError, "Bad encoding", name unless name.isutf8
134 137
135 res = REXML::Document.new(Net::HTTP.get( URI.parse "http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=#{URI.escape name}&format=xml" ).toutf8).elements['api/query/search'] 138 res = REXML::Document.new(Net::HTTP.get( URI.parse "http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=#{URI.escape name}&format=xml" ).toutf8).elements['api/query/search']
136 139
137 res.collect { |e| e.attributes['title'] } unless res.nil? 140 res.collect { |e| e.attributes['title'] } unless res.nil?
138 end 141 end
139 142
140 def self.get_url(name) 143 def self.get_url(name)
141 raise ArgumentError, "Bad encoding", name unless name.isutf8 144 raise ArgumentError, "Bad encoding", name unless name.isutf8
142 145
143 atts = REXML::Document.new(Net::HTTP.get( URI.parse "http://en.wikipedia.org/w/api.php?action=query&titles=#{URI.escape name}&inprop=url&prop=info&format=xml" ).toutf8).elements['api/query/pages/page'].attributes 146 atts = REXML::Document.new(Net::HTTP.get( URI.parse "http://en.wikipedia.org/w/api.php?action=query&titles=#{URI.escape name}&inprop=url&prop=info&format=xml" ).toutf8).elements['api/query/pages/page'].attributes
144 147
145 atts['fullurl'] if atts['missing'].nil? 148 atts['fullurl'] if atts['missing'].nil?
146 end 149 end
147 150
148 def self.search_homepage(name) 151 def self.search_homepage(name)
149 title = WikipediaPage.search_wikipedia_titles name 152 title = WikipediaPage.search_wikipedia_titles name
150 153
151 WikipediaPage.new(WikipediaPage.get_url title[0]) unless title.nil? || title.empty? 154 WikipediaPage.new(WikipediaPage.get_url title[0]) unless title.nil? || title.empty?
152 end 155 end
153 156
154 # def initialize(name) 157 # def initialize(name)
155 # title = WikipediaPage.search_wikipedia_titles name 158 # title = WikipediaPage.search_wikipedia_titles name
156 # raise ArgumentError, "No page found" if title.empty? 159 # raise ArgumentError, "No page found" if title.empty?
157 # super WikipediaPage.get_url title[0] 160 # super WikipediaPage.get_url title[0]
158 # end 161 # end
159 end 162 end
160 end 163 end
161 164
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
19 21
20 module RIR 22 class Query
23 end
21 24
22 class Query 25 module Indri
23 end
24 26
25 module Indri 27 class Parameters
28 attr_accessor :index_path, :memory, :count, :offset, :run_id, :print_query, :print_docs, :rule, :baseline
26 29
27 class Parameters 30 def initialize(corpus,mem="1g",count="1000",offset="1",run_id="default",print_query=false,print_docs=false)
28 attr_accessor :index_path, :memory, :count, :offset, :run_id, :print_query, :print_docs, :rule, :baseline 31 @index_path = corpus
32 @memory = mem
33 @count = count
34 @offset = offset
35 @run_id = run_id
36 @print_query = print_query ? "true" : "false"
37 @print_docs = print_docs ? "true" : "false"
38 end
29 39
30 def initialize(corpus,mem="1g",count="1000",offset="1",run_id="default",print_query=false,print_docs=false) 40 def to_s
31 @index_path = corpus 41 h = "<parameters>\n"
32 @memory = mem 42 h += "<memory>#{@memory}</memory>\n"
33 @count = count 43 h += "<index>#{@index_path}</index>\n"
34 @offset = offset 44 h += "<count>#{@count}</count>\n"
35 @run_id = run_id 45 unless @baseline.nil?
36 @print_query = print_query ? "true" : "false" 46 h += "<baseline>#{@baseline}</baseline>\n"
37 @print_docs = print_docs ? "true" : "false" 47 else
48 h += "<rule>#{@rule}</rule>\n"
38 end 49 end
50 h += "<queryOffset>#{@offset}</queryOffset>\n"
51 h += "<runID>#{@run_id}</runID>\n"
52 h += "<printQuery>#{@print_query}</printQuery>\n"
53 h += "<printDocuments>#{@print_docs}</printDocuments>\n"
39 54
40 def to_s 55 h
41 h = "<parameters>\n"
42 h += "<memory>#{@memory}</memory>\n"
43 h += "<index>#{@index_path}</index>\n"
44 h += "<count>#{@count}</count>\n"
45 unless @baseline.nil?
46 h += "<baseline>#{@baseline}</baseline>\n"
47 else
48 h += "<rule>#{@rule}</rule>\n"
49 end
50 h += "<queryOffset>#{@offset}</queryOffset>\n"
51 h += "<runID>#{@run_id}</runID>\n"
52 h += "<printQuery>#{@print_query}</printQuery>\n"
53 h += "<printDocuments>#{@print_docs}</printDocuments>\n"
54
55 h
56 end
57 end 56 end
58 57 end
59 class IndriQuery < Query 58
60 attr_accessor :id, :query, :params, :rule 59 class IndriQuery < Query
60 attr_accessor :id, :query, :params, :rule
61 61
62 def initialize(id,query,params) 62 def initialize(id,query,params)
63 @params = params 63 @params = params
64 # Here we set the default retrieval model as Language Modeling 64 # Here we set the default retrieval model as Language Modeling
65 # with a Dirichlet smoothing at 2500. 65 # with a Dirichlet smoothing at 2500.
66 # TODO: maybe a Rule class... 66 # TODO: maybe a Rule class...
67 @params.rule = 'method:dirichlet,mu:2500' if @params.rule.nil? 67 @params.rule = 'method:dirichlet,mu:2500' if @params.rule.nil?
68 68
69 @id = id 69 @id = id
70 @query = query 70 @query = query
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
19 21
20 class Regexp 22 class Regexp
21 23
22 def negated 24 def negated
23 /^((?!#{self}).)*$/ 25 /^((?!#{self}).)*$/
24 end 26 end
25 27
26 end 28 end
27 29
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
19 21
20 module RIR 22 module RIR
21 23
22 # These are the default stopwords provided by Lemur. 24 # These are the default stopwords provided by Lemur.
23 Stoplist = [ 25 Stoplist = [
24 "a", "anything", "anyway", "anywhere", "apart", "are", "around", "as", "at", "av", 26 "a", "anything", "anyway", "anywhere", "apart", "are", "around", "as", "at", "av",
25 "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", 27 "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand",
26 "behind", "being", "below", "beside", "besides", "between", "beyond", "both", "but", "by", 28 "behind", "being", "below", "beside", "besides", "between", "beyond", "both", "but", "by",
27 "can", "cannot", "canst", "certain", "cf", "choose", "contrariwise", "cos", "could", "cu", 29 "can", "cannot", "canst", "certain", "cf", "choose", "contrariwise", "cos", "could", "cu",
28 "day", "do", "does", "doesn't", "doing", "dost", "doth", "double", "down", "dual", "during", 30 "day", "do", "does", "doesn't", "doing", "dost", "doth", "double", "down", "dual", "during",
29 "each", "either", "else", "elsewhere", "enough", "et", "etc", "even", "ever", "every", 31 "each", "either", "else", "elsewhere", "enough", "et", "etc", "even", "ever", "every",
30 "everybody", "everyone", "everything", "everywhere", "except", "excepted", "excepting", 32 "everybody", "everyone", "everything", "everywhere", "except", "excepted", "excepting",
31 "exception", "exclude", "excluding", "exclusive", "far", "farther", "farthest", "few", "ff", 33 "exception", "exclude", "excluding", "exclusive", "far", "farther", "farthest", "few", "ff",
32 "first", "for", "formerly", "forth", "forward", "from", "front", "further", "furthermore", 34 "first", "for", "formerly", "forth", "forward", "from", "front", "further", "furthermore",
33 "furthest", "get", "go", "had", "halves", "hardly", "has", "hast", "hath", "have", "he", 35 "furthest", "get", "go", "had", "halves", "hardly", "has", "hast", "hath", "have", "he",
34 "hence", "henceforth", "her", "here", "hereabouts", "hereafter", "hereby", "herein", "hereto", 36 "hence", "henceforth", "her", "here", "hereabouts", "hereafter", "hereby", "herein", "hereto",
35 "hereupon", "hers", "herself", "him", "himself", "hindmost", "his", "hither", "hitherto", 37 "hereupon", "hers", "herself", "him", "himself", "hindmost", "his", "hither", "hitherto",
36 "how", "however", "howsoever", "i", "ie", "if", "in", "inasmuch", "inc", "include", 38 "how", "however", "howsoever", "i", "ie", "if", "in", "inasmuch", "inc", "include",
37 "included", "including", "indeed", "indoors", "inside", "insomuch", "instead", "into", 39 "included", "including", "indeed", "indoors", "inside", "insomuch", "instead", "into",
38 "inward", "inwards", "is", "it", "its", "itself", "just", "kind", "kg", "km", "last", 40 "inward", "inwards", "is", "it", "its", "itself", "just", "kind", "kg", "km", "last",
39 "latter", "latterly", "less", "lest", "let", "like", "little", "ltd", "many", "may", "maybe", 41 "latter", "latterly", "less", "lest", "let", "like", "little", "ltd", "many", "may", "maybe",
40 "me", "meantime", "meanwhile", "might", "moreover", "most", "mostly", "more", "mr", "mrs", 42 "me", "meantime", "meanwhile", "might", "moreover", "most", "mostly", "more", "mr", "mrs",
41 "ms", "much", "must", "my", "myself", "namely", "need", "neither", "never", "nevertheless", 43 "ms", "much", "must", "my", "myself", "namely", "need", "neither", "never", "nevertheless",
42 "next", "no", "nobody", "none", "nonetheless", "noone", "nope", "nor", "not", "nothing", 44 "next", "no", "nobody", "none", "nonetheless", "noone", "nope", "nor", "not", "nothing",
43 "notwithstanding", "now", "nowadays", "nowhere", "of", "off", "often", "ok", "on", "once", 45 "notwithstanding", "now", "nowadays", "nowhere", "of", "off", "often", "ok", "on", "once",
44 "one", "only", "onto", "or", "other", "others", "otherwise", "ought", "our", "ours", 46 "one", "only", "onto", "or", "other", "others", "otherwise", "ought", "our", "ours",
45 "ourselves", "out", "outside", "over", "own", "per", "perhaps", "plenty", "provide", "quite", 47 "ourselves", "out", "outside", "over", "own", "per", "perhaps", "plenty", "provide", "quite",
46 "rather", "really", "round", "said", "sake", "same", "sang", "save", "saw", "see", "seeing", 48 "rather", "really", "round", "said", "sake", "same", "sang", "save", "saw", "see", "seeing",
47 "seem", "seemed", "seeming", "seems", "seen", "seldom", "selves", "sent", "several", "shalt", 49 "seem", "seemed", "seeming", "seems", "seen", "seldom", "selves", "sent", "several", "shalt",
48 "she", "should", "shown", "sideways", "since", "slept", "slew", "slung", "slunk", "smote", 50 "she", "should", "shown", "sideways", "since", "slept", "slew", "slung", "slunk", "smote",
49 "so", "some", "somebody", "somehow", "someone", "something", "sometime", "sometimes", 51 "so", "some", "somebody", "somehow", "someone", "something", "sometime", "sometimes",
50 "somewhat", "somewhere", "spake", "spat", "spoke", "spoken", "sprang", "sprung", "stave", 52 "somewhat", "somewhere", "spake", "spat", "spoke", "spoken", "sprang", "sprung", "stave",
51 "staves", "still", "such", "supposing", "than", "that", "the", "thee", "their", "them", 53 "staves", "still", "such", "supposing", "than", "that", "the", "thee", "their", "them",
52 "themselves", "then", "thence", "thenceforth", "there", "thereabout", "thereabouts", 54 "themselves", "then", "thence", "thenceforth", "there", "thereabout", "thereabouts",
53 "thereafter", "thereby", "therefore", "therein", "thereof", "thereon", "thereto", "thereupon", 55 "thereafter", "thereby", "therefore", "therein", "thereof", "thereon", "thereto", "thereupon",
54 "these", "they", "this", "those", "thou", "though", "thrice", "through", "throughout", "thru", 56 "these", "they", "this", "those", "thou", "though", "thrice", "through", "throughout", "thru",
55 "thus", "thy", "thyself", "till", "to", "together", "too", "toward", "towards", "ugh", 57 "thus", "thy", "thyself", "till", "to", "together", "too", "toward", "towards", "ugh",
56 "unable", "under", "underneath", "unless", "unlike", "until", "up", "upon", "upward", 58 "unable", "under", "underneath", "unless", "unlike", "until", "up", "upon", "upward",
57 "upwards", "us", "use", "used", "using", "very", "via", "vs", "want", "was", "we", "week", 59 "upwards", "us", "use", "used", "using", "very", "via", "vs", "want", "was", "we", "week",
58 "well", "were", "what", "whatever", "whatsoever", "when", "whence", "whenever", "whensoever", 60 "well", "were", "what", "whatever", "whatsoever", "when", "whence", "whenever", "whensoever",
59 "where", "whereabouts", "whereafter", "whereas", "whereat", "whereby", "wherefore", 61 "where", "whereabouts", "whereafter", "whereas", "whereat", "whereby", "wherefore",
60 "wherefrom", "wherein", "whereinto", "whereof", "whereon", "wheresoever", "whereto", 62 "wherefrom", "wherein", "whereinto", "whereof", "whereon", "wheresoever", "whereto",
61 "whereunto", "whereupon", "wherever", "wherewith", "whether", "whew", "which", "whichever", 63 "whereunto", "whereupon", "wherever", "wherewith", "whether", "whew", "which", "whichever",
62 "whichsoever", "while", "whilst", "whither", "who", "whoa", "whoever", "whole", "whom", 64 "whichsoever", "while", "whilst", "whither", "who", "whoa", "whoever", "whole", "whom",
63 "whomever", "whomsoever", "whose", "whosoever", "why", "will", "wilt", "with", "within", 65 "whomever", "whomsoever", "whose", "whosoever", "why", "will", "wilt", "with", "within",
64 "without", "worse", "worst", "would", "wow", "ye", "yet", "year", "yippee", "you", "your", 66 "without", "worse", "worst", "would", "wow", "ye", "yet", "year", "yippee", "you", "your",
65 "yours", "yourself", "yourselves" 67 "yours", "yourself", "yourselves"
66 ] 68 ]
67 69
68 70
69 end 71 end
70 72
71 # Extention of the standard class String with useful function. 73 # Extention of the standard class String with useful function.
72 class String 74 class String
73 include RIR 75 include RIR
74 76
75 # Returns +true+ if +self+ belongs to Rir::Stoplist, +false+ otherwise. 77 # Returns +true+ if +self+ belongs to Rir::Stoplist, +false+ otherwise.
76 def is_stopword? 78 def is_stopword?
77 Stoplist.include?(self.downcase) 79 Stoplist.include?(self.downcase)
78 end 80 end
79 81
80 # Do not use. 82 # Do not use.
81 # TODO: rewamp. find why this function is here. 83 # TODO: rewamp. find why this function is here.
82 def remove_special_characters 84 def remove_special_characters
83 self.split.collect { |w| w.gsub(/\W/,' ').split.collect { |w| w.gsub(/\W/,' ').strip.sub(/\A.\z/, '')}.join(' ').strip.sub(/\A.\z/, '')}.join(' ') 85 self.split.collect { |w| w.gsub(/\W/,' ').split.collect { |w| w.gsub(/\W/,' ').strip.sub(/\A.\z/, '')}.join(' ').strip.sub(/\A.\z/, '')}.join(' ')
84 end 86 end
85 87
86 # Removes all XML-like tags from +self+. 88 # Removes all XML-like tags from +self+.
87 # 89 #
88 # s = "<html><body>test</body></html>" 90 # s = "<html><body>test</body></html>"
89 # s.strip_xml_tags! 91 # s.strip_xml_tags!
90 # s #=> "test" 92 # s #=> "test"
91 def strip_xml_tags! 93 def strip_xml_tags!
92 replace strip_with_pattern /<\/?[^>]*>/ 94 replace strip_with_pattern /<\/?[^>]*>/
93 end 95 end
94 96
95 # Removes all XML-like tags from +self+. 97 # Removes all XML-like tags from +self+.
96 # 98 #
97 # s = "<html><body>test</body></html>" 99 # s = "<html><body>test</body></html>"
98 # s.strip_xml_tags #=> "test" 100 # s.strip_xml_tags #=> "test"
99 # s #=> "<html><body>test</body></html>" 101 # s #=> "<html><body>test</body></html>"
100 def strip_xml_tags 102 def strip_xml_tags
101 dup.strip_xml_tags! 103 dup.strip_xml_tags!
102 end 104 end
103 105
104 # Removes all Javascript sources from +self+. 106 # Removes all Javascript sources from +self+.
105 # 107 #
106 # s = "<script type='text/javascript'> 108 # s = "<script type='text/javascript'>
107 # var skin='vector', 109 # var skin='vector',
108 # stylepath='http://bits.wikimedia.org/skins-1.5' 110 # stylepath='http://bits.wikimedia.org/skins-1.5'
109 # </script> 111 # </script>
110 # 112 #
111 # test" 113 # test"
112 # s.strip_javascripts! 114 # s.strip_javascripts!
113 # s #=> "test" 115 # s #=> "test"
114 def strip_javascripts! 116 def strip_javascripts!
115 replace strip_with_pattern /<script type="text\/javascript">(.+?)<\/script>/m 117 replace strip_with_pattern /<script type="text\/javascript">(.+?)<\/script>/m
116 end 118 end
117 119
118 # Removes all Javascript sources from +self+. 120 # Removes all Javascript sources from +self+.
119 # 121 #
120 # s = "<script type='text/javascript'> 122 # s = "<script type='text/javascript'>
121 # var skin='vector', 123 # var skin='vector',
122 # stylepath='http://bits.wikimedia.org/skins-1.5' 124 # stylepath='http://bits.wikimedia.org/skins-1.5'
123 # </script> 125 # </script>
124 # 126 #
125 # test" 127 # test"
126 # s.strip_javascripts #=> "test" 128 # s.strip_javascripts #=> "test"
127 def strip_javascripts 129 def strip_javascripts
128 dup.strip_javascripts! 130 dup.strip_javascripts!
129 end 131 end
130 132
131 def strip_stylesheets! 133 def strip_stylesheets!
132 # TODO: rewamp. dunno what is it. 134 # TODO: rewamp. dunno what is it.
133 replace strip_with_pattern /<style type="text\/css">(.+?)<\/style>/m 135 replace strip_with_pattern /<style type="text\/css">(.+?)<\/style>/m
134 end 136 end
135 137
136 def strip_stylesheets 138 def strip_stylesheets
137 dup.strip_stylesheets! 139 dup.strip_stylesheets!
138 end 140 end
139 141
140 # Removes punctuation from +self+. 142 # Removes punctuation from +self+.
141 # 143 #
142 # s = "hello, world. how are you?!" 144 # s = "hello, world. how are you?!"
143 # s.strip_punctuation! 145 # s.strip_punctuation!
144 # s # => "hello world how are you" 146 # s # => "hello world how are you"
145 def strip_punctuation! 147 def strip_punctuation!
146 replace strip_with_pattern /[^a-zA-Z0-9\-\s]/ 148 replace strip_with_pattern /[^a-zA-Z0-9\-\s]/
147 end 149 end
148 150
149 # Removes punctuation from +self+. 151 # Removes punctuation from +self+.
150 # 152 #
151 # s = "hello, world. how are you?!" 153 # s = "hello, world. how are you?!"
152 # s.strip_punctuation # => "hello world how are you" 154 # s.strip_punctuation # => "hello world how are you"
153 def strip_punctuation 155 def strip_punctuation
154 dup.strip_punctuation! 156 dup.strip_punctuation!
155 end 157 end
156 158
157 # Returns the text values inside all occurences of a XML tag in +self+ 159 # Returns the text values inside all occurences of a XML tag in +self+
158 # 160 #
159 # s = "four-piece in <a href='#'>Indianapolis</a>, <a href='#'>Indiana</a> at the Murat Theatre" 161 # s = "four-piece in <a href='#'>Indianapolis</a>, <a href='#'>Indiana</a> at the Murat Theatre"
160 # s.extract_xmltags_values 'a' #=> ["Indianapolis", "Indiana"] 162 # s.extract_xmltags_values 'a' #=> ["Indianapolis", "Indiana"]
161 def extract_xmltags_values(tag_name) 163 def extract_xmltags_values(tag_name)
162 self.scan(/<#{tag_name}.*?>(.+?)<\/#{tag_name}>/).flatten 164 self.scan(/<#{tag_name}.*?>(.+?)<\/#{tag_name}>/).flatten
163 end 165 end
164 166
165 def strip_with_pattern(pattern) 167 def strip_with_pattern(pattern)
166 require 'cgi' 168 require 'cgi'
167 require 'kconv' 169 require 'kconv'
168 CGI::unescapeHTML(self.gsub(pattern,"")).toutf8 170 CGI::unescapeHTML(self.gsub(pattern,"")).toutf8
169 end 171 end
170 172
171 private :strip_with_pattern 173 private :strip_with_pattern
172 end 174 end
173 175
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 2
3 #--
3 # This file is a part of an Information Retrieval oriented Ruby library 4 # This file is a part of an Information Retrieval oriented Ruby library
4 # 5 #
5 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 6 # Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
6 # 7 #
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
11 # 12 #
12 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 16 # GNU General Public License for more details.
16 # 17 #
17 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #++
19 21
20 module RIR
21 22
22 # TreeTagger-related stuff module. 23 # TreeTagger-related stuff module.
23 # 24 #
24 # See http://www.ims.uni-stuttgart.de/projekte/corplex/TreeTagger/DecisionTreeTagger.html 25 # See http://www.ims.uni-stuttgart.de/projekte/corplex/TreeTagger/DecisionTreeTagger.html
25 module TreeTagger 26 module TreeTagger
26 27
27 # This class handles generic parsing of tagger-chunker outputs. 28 # This class handles generic parsing of tagger-chunker outputs.
28 class TaggerChunker 29 class TaggerChunker
29 attr_reader :chunks, :file 30 attr_reader :chunks, :file
30 31
31 32
32 # Parses a tagger-chunker output and returns an Array of Chunk. 33 # Parses a tagger-chunker output and returns an Array of Chunk.
33 def self.parse chunk_lines 34 def self.parse chunk_lines
34 open = false 35 open = false
35 tag = nil 36 tag = nil
36 37
37 chunks = [] 38 chunks = []
38 words = [] 39 words = []
39 40
40 chunk_lines.each do |l| 41 chunk_lines.each do |l|
41 l.chomp! 42 l.chomp!
42 if l =~ /^<\w+>$/ 43 if l =~ /^<\w+>$/
43 open = true 44 open = true
44 tag = l 45 tag = l
45 elsif l =~ /^<\/\w+>$/ 46 elsif l =~ /^<\/\w+>$/
46 if !words.empty? && open && l == tag.sub(/</, '</') 47 if !words.empty? && open && l == tag.sub(/</, '</')
47 open = false 48 open = false
48 chunks.push Chunk.new(words.join(" "), tag) 49 chunks.push Chunk.new(words.join(" "), tag)
49 words.clear 50 words.clear
50 else
51 next
52 end
53 else 51 else
54 words.push(l.split.first) 52 next
55 end 53 end
54 else
55 words.push(l.split.first)
56 end 56 end
57
58 chunks
59 end 57 end
60 58
61 # Initializes parsing. +chunk_file+ is the output of +tagger-chunker-+ and must 59 chunks
62 # be a valid path to the file.
63 #
64 # TaggerChunker.new("ttout/2010020") #=> #<RIR::TreeTagger::TaggerChunker:0x92fd088 @chunks=[#<RIR::TreeTagger::Chunk:0x8ec5a10 @words=["robert", "schumann"], @tag="NC">, ...] ...>
65 def initialize chunk_file
66 @chunks = TaggerChunker.parse File.open(chunk_file).readlines
67 end
68
69 end 60 end
70 61
71 class TaggerChunkerEnglish < TaggerChunker 62 # Initializes parsing. +chunk_file+ is the output of +tagger-chunker-+ and must
63 # be a valid path to the file.
64 #
65 # TaggerChunker.new("ttout/2010020") #=> #<RIR::TreeTagger::TaggerChunker:0x92fd088 @chunks=[#<RIR::TreeTagger::Chunk:0x8ec5a10 @words=["robert", "schumann"], @tag="NC">, ...] ...>
66 def initialize chunk_file
67 @chunks = TaggerChunker.parse File.open(chunk_file).readlines
72 end 68 end
73 69
74 class TaggerChunkerFrench < TaggerChunker 70 end
75 end
76 71
77 class TaggerChunkerGerman < TaggerChunker 72 class TaggerChunkerEnglish < TaggerChunker
78 end 73 end
79 74
80 # Represents a Chunk extracted when parsing a TaggerChunker file. 75 class TaggerChunkerFrench < TaggerChunker
81 class Chunk 76 end
82 attr_reader :words, :tag
83 77
84 # +str+ are whitespace-separated terms. 78 class TaggerChunkerGerman < TaggerChunker
85 # +tag+ see : ftp://ftp.ims.uni-stuttgart.de/pub/corpora/chunker-tagset-english.txt 79 end
86 def initialize str,tag
87 @words = str.split