Commit 4b35d222779a7b1edae4fd7084213693be077430

Authored by Romain Deveaud
1 parent a79a228434
Exists in master

resolving documentation troubleshootings

Showing 87 changed files with 771 additions and 1263 deletions Inline Diff

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"> 56 <a href="../files/lib/rir/ttagger_rb.html">
57 57
58 lib/rir/ttagger.rb 58 lib/rir/ttagger.rb
59 59
60 </a> 60 </a>
61 61
62 62
63 <br /> 63 <br />
64 64
65 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
66 <a href="../files/lib/rir/query_rb.html"> 76 <a href="../files/lib/rir/query_rb.html">
67 77
68 lib/rir/query.rb 78 lib/rir/query.rb
69 79
70 </a> 80 </a>
71 81
72 82
73 <br /> 83 <br />
74 84
75 85
86 <a href="../files/lib/rir/string_rb.html">
87
88 lib/rir/string.rb
89
90 </a>
91
92
93 <br />
94
95
76 <a href="../files/lib/rir/document_rb.html"> 96 <a href="../files/lib/rir/document_rb.html">
77 97
78 lib/rir/document.rb 98 lib/rir/document.rb
79 99
80 </a> 100 </a>
81 101
82 102
83 <br /> 103 <br />
84 104
85 </td> 105 </td>
86 </tr> 106 </tr>
87 107
88 108
89 </table> 109 </table>
90 </div> 110 </div>
91 <!-- banner header --> 111 <!-- banner header -->
92 112
93 <div id="bodyContent"> 113 <div id="bodyContent">
94 114
95 <div id="contextContent"> 115 <div id="contextContent">
96 116
97 <div id="description"> 117 <div id="description">
98 <p> 118 <p>
99 This file is a part of an Information Retrieval oriented Ruby library 119 This file is a part of an Information Retrieval oriented Ruby library
100 </p> 120 </p>
101 <p> 121 <p>
102 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 122 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
103 </p> 123 </p>
104 <p> 124 <p>
105 This program is free software: you can redistribute it and/or modify it 125 This program is free software: you can redistribute it and/or modify it
106 under the terms of the GNU General Public License as published by the Free 126 under the terms of the GNU General Public License as published by the Free
107 Software Foundation, either version 3 of the License, or (at your option) 127 Software Foundation, either version 3 of the License, or (at your option)
108 any later version. 128 any later version.
109 </p> 129 </p>
110 <p> 130 <p>
111 This program is distributed in the hope that it will be useful, but WITHOUT 131 This program is distributed in the hope that it will be useful, but WITHOUT
112 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 132 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
113 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 133 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
114 more details. 134 more details.
115 </p> 135 </p>
116 <p> 136 <p>
117 You should have received a copy of the GNU General Public License along 137 You should have received a copy of the GNU General Public License along
118 with this program. If not, see <<a 138 with this program. If not, see <<a
119 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>. 139 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
120 </p> 140 </p>
121 <hr size="1"></hr><p> 141 <hr size="1"></hr><p>
122 This file is a part of an Information Retrieval oriented Ruby library 142 This file is a part of an Information Retrieval oriented Ruby library
123 </p> 143 </p>
124 <p> 144 <p>
125 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com> 145 Copyright (C) 2010-2011 Romain Deveaud <romain.deveaud@gmail.com>
126 </p> 146 </p>
127 <p> 147 <p>
128 This program is free software: you can redistribute it and/or modify it 148 This program is free software: you can redistribute it and/or modify it
129 under the terms of the GNU General Public License as published by the Free 149 under the terms of the GNU General Public License as published by the Free
130 Software Foundation, either version 3 of the License, or (at your option) 150 Software Foundation, either version 3 of the License, or (at your option)
131 any later version. 151 any later version.
132 </p> 152 </p>
133 <p> 153 <p>
134 This program is distributed in the hope that it will be useful, but WITHOUT 154 This program is distributed in the hope that it will be useful, but WITHOUT
135 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 155 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
136 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 156 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
137 more details. 157 more details.
138 </p> 158 </p>
139 <p> 159 <p>
140 You should have received a copy of the GNU General Public License along 160 You should have received a copy of the GNU General Public License along
141 with this program. If not, see <<a 161 with this program. If not, see <<a
142 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>. 162 href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>.
143 </p> 163 </p>
144 <hr size="1"></hr><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>
145 General module for many purposes related to Information Retrieval. 211 General module for many purposes related to Information Retrieval.
146 </p> 212 </p>
147 213
148 </div> 214 </div>
149 215
150 </div> 216 </div>
151 217
152 218
153 </div> 219 </div>
154 220
155 <!-- if includes --> 221 <!-- if includes -->
156 222
157 <div id="section"> 223 <div id="section">
158 224
159 <div id="class-list"> 225 <div id="class-list">
160 <h3 class="section-bar">Classes and Modules</h3> 226 <h3 class="section-bar">Classes and Modules</h3>
161 227
162 Module <a href="RIR/Indri.html" class="link">RIR::Indri</a><br /> 228 Module <a href="RIR/Indri.html" class="link">RIR::Indri</a><br />
163 Module <a href="RIR/TreeTagger.html" class="link">RIR::TreeTagger</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 />
164 Class <a href="RIR/Document.html" class="link">RIR::Document</a><br /> 231 Class <a href="RIR/Document.html" class="link">RIR::Document</a><br />
165 Class <a href="RIR/Query.html" class="link">RIR::Query</a><br /> 232 Class <a href="RIR/Query.html" class="link">RIR::Query</a><br />
166 Class <a href="RIR/WebDocument.html" class="link">RIR::WebDocument</a><br /> 233 Class <a href="RIR/WebDocument.html" class="link">RIR::WebDocument</a><br />
167 Class <a href="RIR/WikipediaPage.html" class="link">RIR::WikipediaPage</a><br /> 234 Class <a href="RIR/WikipediaPage.html" class="link">RIR::WikipediaPage</a><br />
168 235
236 </div>
237
238 <div id="constants-list">
239 <h3 class="section-bar">Constants</h3>
240
241 <div class="name-list">
242 <table summary="Constants">
243
244 <tr class="top-aligned-row context-row">
245 <td class="context-item-name">Stoplist</td>
246 <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>
248
249 <td>&nbsp;</td>
250 <td class="context-item-desc">
251 These are the default stopwords provided by Lemur.
252
253 </td>
254
255 </tr>
256
257 </table>
258 </div>
169 </div> 259 </div>
170 260
171 261
172 262
173 263
174 <!-- if method_list --> 264 <!-- if method_list -->
175 265
176 266
177 267
178 268
179 </div> 269 </div>
180 270
181 <div id="validator-badges"> 271 <div id="validator-badges">
182 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 272 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
183 </div> 273 </div>
184 274
185 </body> 275 </body>
186 </html> 276 </html>
187 277
doc/classes/RIR/Corpus.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: RIR::Corpus [RDoc Documentation]</title> 5 <title>Class: RIR::Corpus [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">RIR::Corpus</td> 49 <td class="class-name-in-header">RIR::Corpus</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/corpus_rb.html"> 56 <a href="../../files/lib/rir/corpus_rb.html">
57 57
58 lib/rir/corpus.rb 58 lib/rir/corpus.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> 86 </div>
87 87
88 88
89 <div id="method-list"> 89 <div id="method-list">
90 <h3 class="section-bar">Methods</h3> 90 <h3 class="section-bar">Methods</h3>
91 91
92 <div class="name-list"> 92 <div class="name-list">
93 93
94 <a href="#M000017">files</a>&nbsp;&nbsp; 94 <a href="#M000021">files</a>&nbsp;&nbsp;
95 95
96 <a href="#M000016">new</a>&nbsp;&nbsp; 96 <a href="#M000020">new</a>&nbsp;&nbsp;
97 97
98 </div> 98 </div>
99 </div> 99 </div>
100 100
101 </div> 101 </div>
102 102
103 <!-- if includes --> 103 <!-- if includes -->
104 104
105 <div id="section"> 105 <div id="section">
106 106
107 107
108 108
109 <div id="attribute-list"> 109 <div id="attribute-list">
110 <h3 class="section-bar">Attributes</h3> 110 <h3 class="section-bar">Attributes</h3>
111 111
112 <div class="name-list"> 112 <div class="name-list">
113 <table> 113 <table>
114 114
115 <tr class="top-aligned-row context-row"> 115 <tr class="top-aligned-row context-row">
116 <td class="context-item-name">path</td> 116 <td class="context-item-name">path</td>
117 117
118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
119 119
120 <td class="context-item-desc"></td> 120 <td class="context-item-desc"></td>
121 </tr> 121 </tr>
122 122
123 </table> 123 </table>
124 </div> 124 </div>
125 </div> 125 </div>
126 126
127 127
128 <!-- if method_list --> 128 <!-- if method_list -->
129 129
130 <div id="methods"> 130 <div id="methods">
131 131
132 <h3 class="section-bar">Public Class methods</h3> 132 <h3 class="section-bar">Public Class methods</h3>
133 133
134 134
135 <div id="method-M000016" class="method-detail"> 135 <div id="method-M000020" class="method-detail">
136 <a name="M000016"></a> 136 <a name="M000020"></a>
137 137
138 <div class="method-heading"> 138 <div class="method-heading">
139 139
140 <a href="Corpus.src/M000016.html" target="Code" class="method-signature" 140 <a href="Corpus.src/M000020.html" target="Code" class="method-signature"
141 onclick="popupCode('Corpus.src/M000016.html');return false;"> 141 onclick="popupCode('Corpus.src/M000020.html');return false;">
142 142
143 <span class="method-name">new</span><span class="method-args">(path)</span> 143 <span class="method-name">new</span><span class="method-args">(path)</span>
144 144
145 </a> 145 </a>
146 146
147 </div> 147 </div>
148 148
149 <div class="method-description"> 149 <div class="method-description">
150 150
151 </div> 151 </div>
152 </div> 152 </div>
153 153
154 154
155 <h3 class="section-bar">Public Instance methods</h3> 155 <h3 class="section-bar">Public Instance methods</h3>
156 156
157 157
158 <div id="method-M000017" class="method-detail"> 158 <div id="method-M000021" class="method-detail">
159 <a name="M000017"></a> 159 <a name="M000021"></a>
160 160
161 <div class="method-heading"> 161 <div class="method-heading">
162 162
163 <a href="Corpus.src/M000017.html" target="Code" class="method-signature" 163 <a href="Corpus.src/M000021.html" target="Code" class="method-signature"
164 onclick="popupCode('Corpus.src/M000017.html');return false;"> 164 onclick="popupCode('Corpus.src/M000021.html');return false;">
165 165
166 <span class="method-name">files</span><span class="method-args">()</span> 166 <span class="method-name">files</span><span class="method-args">()</span>
167 167
168 </a> 168 </a>
169 169
170 </div> 170 </div>
171 171
172 <div class="method-description"> 172 <div class="method-description">
173 173
174 <p> 174 <p>
175 Recursively outputs all files in <tt>self.path</tt>. WARNING ! This 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. 176 function may take a lot of time if many files are in subdirectories.
177 </p> 177 </p>
178 <pre> 178 <pre>
179 c = Corpus.new &quot;my/path&quot; 179 c = Corpus.new &quot;my/path&quot;
180 c.files # =&gt; [&quot;README.txt&quot;, &quot;lib/code.rb&quot;] 180 c.files # =&gt; [&quot;README.txt&quot;, &quot;lib/code.rb&quot;]
181 </pre> 181 </pre>
182 182
183 </div> 183 </div>
184 </div> 184 </div>
185 185
186 186
187 187
188 </div> 188 </div>
189 189
190 190
191 191
192 192
193 </div> 193 </div>
194 194
195 <div id="validator-badges"> 195 <div id="validator-badges">
196 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 196 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
197 </div> 197 </div>
198 198
199 </body> 199 </body>
200 </html> 200 </html>
201 201
doc/classes/RIR/Corpus.src/M000016.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Corpus.src/M000017.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Corpus.src/M000018.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 36</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Corpus.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 (RIR::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/RIR/Corpus.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>files (RIR::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/RIR/Document.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: RIR::Document [RDoc Documentation]</title> 5 <title>Class: RIR::Document [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">RIR::Document</td> 49 <td class="class-name-in-header">RIR::Document</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/document_rb.html"> 56 <a href="../../files/lib/rir/document_rb.html">
57 57
58 lib/rir/document.rb 58 lib/rir/document.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 A <a href="Document.html">Document</a> is a bag of words and is constructed 88 A <a href="Document.html">Document</a> is a bag of words and is constructed
89 from a string. 89 from a string.
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="#M000010">count_words</a>&nbsp;&nbsp; 102 <a href="#M000024">count_words</a>&nbsp;&nbsp;
103 103
104 <a href="#M000011">entropy</a>&nbsp;&nbsp; 104 <a href="#M000025">entropy</a>&nbsp;&nbsp;
105 105
106 <a href="#M000008">format_words</a>&nbsp;&nbsp; 106 <a href="#M000022">format_words</a>&nbsp;&nbsp;
107 107
108 <a href="#M000013">new</a>&nbsp;&nbsp; 108 <a href="#M000027">new</a>&nbsp;&nbsp;
109 109
110 <a href="#M000009">ngrams</a>&nbsp;&nbsp; 110 <a href="#M000023">ngrams</a>&nbsp;&nbsp;
111 111
112 <a href="#M000012">tf</a>&nbsp;&nbsp; 112 <a href="#M000026">tf</a>&nbsp;&nbsp;
113 113
114 </div> 114 </div>
115 </div> 115 </div>
116 116
117 </div> 117 </div>
118 118
119 <!-- if includes --> 119 <!-- if includes -->
120 120
121 <div id="section"> 121 <div id="section">
122 122
123 123
124 124
125 <div id="attribute-list"> 125 <div id="attribute-list">
126 <h3 class="section-bar">Attributes</h3> 126 <h3 class="section-bar">Attributes</h3>
127 127
128 <div class="name-list"> 128 <div class="name-list">
129 <table> 129 <table>
130 130
131 <tr class="top-aligned-row context-row"> 131 <tr class="top-aligned-row context-row">
132 <td class="context-item-name">doc_content</td> 132 <td class="context-item-name">doc_content</td>
133 133
134 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 134 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
135 135
136 <td class="context-item-desc"></td> 136 <td class="context-item-desc"></td>
137 </tr> 137 </tr>
138 138
139 <tr class="top-aligned-row context-row"> 139 <tr class="top-aligned-row context-row">
140 <td class="context-item-name">words</td> 140 <td class="context-item-name">words</td>
141 141
142 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 142 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
143 143
144 <td class="context-item-desc"></td> 144 <td class="context-item-desc"></td>
145 </tr> 145 </tr>
146 146
147 </table> 147 </table>
148 </div> 148 </div>
149 </div> 149 </div>
150 150
151 151
152 <!-- if method_list --> 152 <!-- if method_list -->
153 153
154 <div id="methods"> 154 <div id="methods">
155 155
156 <h3 class="section-bar">Public Class methods</h3> 156 <h3 class="section-bar">Public Class methods</h3>
157 157
158 158
159 <div id="method-M000013" class="method-detail"> 159 <div id="method-M000027" class="method-detail">
160 <a name="M000013"></a> 160 <a name="M000027"></a>
161 161
162 <div class="method-heading"> 162 <div class="method-heading">
163 163
164 <a href="Document.src/M000013.html" target="Code" class="method-signature" 164 <a href="Document.src/M000027.html" target="Code" class="method-signature"
165 onclick="popupCode('Document.src/M000013.html');return false;"> 165 onclick="popupCode('Document.src/M000027.html');return false;">
166 166
167 <span class="method-name">new</span><span class="method-args">(content)</span> 167 <span class="method-name">new</span><span class="method-args">(content)</span>
168 168
169 </a> 169 </a>
170 170
171 </div> 171 </div>
172 172
173 <div class="method-description"> 173 <div class="method-description">
174 174
175 </div> 175 </div>
176 </div> 176 </div>
177 177
178 178
179 <h3 class="section-bar">Public Instance methods</h3> 179 <h3 class="section-bar">Public Instance methods</h3>
180 180
181 181
182 <div id="method-M000010" class="method-detail"> 182 <div id="method-M000024" class="method-detail">
183 <a name="M000010"></a> 183 <a name="M000024"></a>
184 184
185 <div class="method-heading"> 185 <div class="method-heading">
186 186
187 <a href="Document.src/M000010.html" target="Code" class="method-signature" 187 <a href="Document.src/M000024.html" target="Code" class="method-signature"
188 onclick="popupCode('Document.src/M000010.html');return false;"> 188 onclick="popupCode('Document.src/M000024.html');return false;">
189 189
190 <span class="method-name">count_words</span><span class="method-args">()</span> 190 <span class="method-name">count_words</span><span class="method-args">()</span>
191 191
192 </a> 192 </a>
193 193
194 </div> 194 </div>
195 195
196 <div class="method-description"> 196 <div class="method-description">
197 197
198 <p> 198 <p>
199 Returns a Hash containing the words and their associated counts in the 199 Returns a Hash containing the words and their associated counts in the
200 current <a href="Document.html">Document</a>. 200 current <a href="Document.html">Document</a>.
201 </p> 201 </p>
202 <pre> 202 <pre>
203 count_words #=&gt; { &quot;guitar&quot;=&gt;1, &quot;bass&quot;=&gt;3, &quot;album&quot;=&gt;20, ... } 203 count_words #=&gt; { &quot;guitar&quot;=&gt;1, &quot;bass&quot;=&gt;3, &quot;album&quot;=&gt;20, ... }
204 </pre> 204 </pre>
205 205
206 </div> 206 </div>
207 </div> 207 </div>
208 208
209 209
210 <div id="method-M000011" class="method-detail"> 210 <div id="method-M000025" class="method-detail">
211 <a name="M000011"></a> 211 <a name="M000025"></a>
212 212
213 <div class="method-heading"> 213 <div class="method-heading">
214 214
215 <a href="Document.src/M000011.html" target="Code" class="method-signature" 215 <a href="Document.src/M000025.html" target="Code" class="method-signature"
216 onclick="popupCode('Document.src/M000011.html');return false;"> 216 onclick="popupCode('Document.src/M000025.html');return false;">
217 217
218 <span class="method-name">entropy</span><span class="method-args">(s)</span> 218 <span class="method-name">entropy</span><span class="method-args">(s)</span>
219 219
220 </a> 220 </a>
221 221
222 </div> 222 </div>
223 223
224 <div class="method-description"> 224 <div class="method-description">
225 225
226 <p> 226 <p>
227 Computes the entropy of a given string <tt>s</tt> inside the document. 227 Computes the entropy of a given string <tt>s</tt> inside the document.
228 </p> 228 </p>
229 <p> 229 <p>
230 If the string parameter is composed of many words (i.e. tokens separated by 230 If the string parameter is composed of many words (i.e. tokens separated by
231 whitespace(s)), it is considered as an ngram. 231 whitespace(s)), it is considered as an ngram.
232 </p> 232 </p>
233 <pre> 233 <pre>
234 entropy(&quot;guitar&quot;) #=&gt; 0.00432114812727959 234 entropy(&quot;guitar&quot;) #=&gt; 0.00432114812727959
235 entropy(&quot;dillinger escape plan&quot;) #=&gt; 0.265862076325102 235 entropy(&quot;dillinger escape plan&quot;) #=&gt; 0.265862076325102
236 </pre> 236 </pre>
237 237
238 </div> 238 </div>
239 </div> 239 </div>
240 240
241 241
242 <div id="method-M000009" class="method-detail"> 242 <div id="method-M000023" class="method-detail">
243 <a name="M000009"></a> 243 <a name="M000023"></a>
244 244
245 <div class="method-heading"> 245 <div class="method-heading">
246 246
247 <a href="Document.src/M000009.html" target="Code" class="method-signature" 247 <a href="Document.src/M000023.html" target="Code" class="method-signature"
248 onclick="popupCode('Document.src/M000009.html');return false;"> 248 onclick="popupCode('Document.src/M000023.html');return false;">
249 249
250 <span class="method-name">ngrams</span><span class="method-args">(n)</span> 250 <span class="method-name">ngrams</span><span class="method-args">(n)</span>
251 251
252 </a> 252 </a>
253 253
254 </div> 254 </div>
255 255
256 <div class="method-description"> 256 <div class="method-description">
257 257
258 <p> 258 <p>
259 Returns an Array containing the <tt>n</tt>-grams (words) from the current 259 Returns an Array containing the <tt>n</tt>-grams (words) from the current
260 <a href="Document.html">Document</a>. 260 <a href="Document.html">Document</a>.
261 </p> 261 </p>
262 <pre> 262 <pre>
263 ngrams(2) #=&gt; [&quot;the free&quot;, &quot;free encyclopedia&quot;, &quot;encyclopedia var&quot;, &quot;var skin&quot;, ...] 263 ngrams(2) #=&gt; [&quot;the free&quot;, &quot;free encyclopedia&quot;, &quot;encyclopedia var&quot;, &quot;var skin&quot;, ...]
264 </pre> 264 </pre>
265 265
266 </div> 266 </div>
267 </div> 267 </div>
268 268
269 269
270 <div id="method-M000012" class="method-detail"> 270 <div id="method-M000026" class="method-detail">
271 <a name="M000012"></a> 271 <a name="M000026"></a>
272 272
273 <div class="method-heading"> 273 <div class="method-heading">
274 274
275 <a href="Document.src/M000012.html" target="Code" class="method-signature" 275 <a href="Document.src/M000026.html" target="Code" class="method-signature"
276 onclick="popupCode('Document.src/M000012.html');return false;"> 276 onclick="popupCode('Document.src/M000026.html');return false;">
277 277
278 <span class="method-name">tf</span><span class="method-args">(s)</span> 278 <span class="method-name">tf</span><span class="method-args">(s)</span>
279 279
280 </a> 280 </a>
281 281
282 </div> 282 </div>
283 283
284 <div class="method-description"> 284 <div class="method-description">
285 285
286 <p> 286 <p>
287 Computes the term frequency of a given <b>word</b> <tt>s</tt>. 287 Computes the term frequency of a given <b>word</b> <tt>s</tt>.
288 </p> 288 </p>
289 <pre> 289 <pre>
290 tf(&quot;guitar&quot;) #=&gt; 0.000380372765310004 290 tf(&quot;guitar&quot;) #=&gt; 0.000380372765310004
291 </pre> 291 </pre>
292 292
293 </div> 293 </div>
294 </div> 294 </div>
295 295
296 296
297 <h3 class="section-bar">Protected Instance methods</h3> 297 <h3 class="section-bar">Protected Instance methods</h3>
298 298
299 299
300 <div id="method-M000008" class="method-detail"> 300 <div id="method-M000022" class="method-detail">
301 <a name="M000008"></a> 301 <a name="M000022"></a>
302 302
303 <div class="method-heading"> 303 <div class="method-heading">
304 304
305 <a href="Document.src/M000008.html" target="Code" class="method-signature" 305 <a href="Document.src/M000022.html" target="Code" class="method-signature"
306 onclick="popupCode('Document.src/M000008.html');return false;"> 306 onclick="popupCode('Document.src/M000022.html');return false;">
307 307
308 <span class="method-name">format_words</span><span class="method-args">()</span> 308 <span class="method-name">format_words</span><span class="method-args">()</span>
309 309
310 </a> 310 </a>
311 311
312 </div> 312 </div>
313 313
314 <div class="method-description"> 314 <div class="method-description">
315 315
316 <p> 316 <p>
317 Any non-word characters are removed from the words (see <a 317 Any non-word characters are removed from the words (see <a
318 href="http://perldoc.perl.org/perlre.html">perldoc.perl.org/perlre.html</a> 318 href="http://perldoc.perl.org/perlre.html">perldoc.perl.org/perlre.html</a>
319 and the W special escape). 319 and the W special escape).
320 </p> 320 </p>
321 <p> 321 <p>
322 Protected function, only meant to by called at the initialization. 322 Protected function, only meant to by called at the initialization.
323 </p> 323 </p>
324 324
325 </div> 325 </div>
326 </div> 326 </div>
327 327
328 328
329 329
330 </div> 330 </div>
331 331
332 332
333 333
334 334
335 </div> 335 </div>
336 336
337 <div id="validator-badges"> 337 <div id="validator-badges">
338 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 338 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
339 </div> 339 </div>
340 340
341 </body> 341 </body>
342 </html> 342 </html>
343 343
doc/classes/RIR/Document.src/M000008.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>format_words (RIR::Document)</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/document.rb, line 31</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_words</span>
12 <span class="ruby-identifier">wo</span> = []
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>
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>
17 <span class="ruby-keyword kw">end</span>
18 <span class="ruby-keyword kw">end</span>
19
20 <span class="ruby-identifier">wo</span>
21 <span class="ruby-keyword kw">end</span></pre>
22 </body>
23 </html>
24 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000009.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>ngrams (RIR::Document)</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/document.rb, line 46</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> = []
13 <span class="ruby-identifier">ngrams_array</span> = []
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>
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>
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>)
20 <span class="ruby-keyword kw">end</span>
21 <span class="ruby-keyword kw">end</span>
22
23 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">uniq</span>
24 <span class="ruby-keyword kw">end</span></pre>
25 </body>
26 </html>
27 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000010.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>count_words (RIR::Document)</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/document.rb, line 64</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> }
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
15 <span class="ruby-identifier">counts</span>
16 <span class="ruby-keyword kw">end</span></pre>
17 </body>
18 </html>
19 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000011.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>entropy (RIR::Document)</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/document.rb, line 78</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>
13 <span class="ruby-identifier">counts</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>
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>
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>)
18 <span class="ruby-keyword kw">end</span>
19
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>
22 <span class="ruby-keyword kw">end</span></pre>
23 </body>
24 </html>
25 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000012.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>tf (RIR::Document)</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/document.rb, line 94</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>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000013.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::Document)</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/document.rb, line 99</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>
13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span>
14 <span class="ruby-keyword kw">end</span></pre>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000014.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::Document)</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/document.rb, line 92</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>
13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span>
14 <span class="ruby-keyword kw">end</span></pre>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000019.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>format_words (RIR::Document)</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/document.rb, line 31</span>
11 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_words</span>
12 <span class="ruby-identifier">wo</span> = []
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>
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>
17 <span class="ruby-keyword kw">end</span>
18 <span class="ruby-keyword kw">end</span>
19
20 <span class="ruby-identifier">wo</span>
21 <span class="ruby-keyword kw">end</span></pre>
22 </body>
23 </html>
24 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000020.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>ngrams (RIR::Document)</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/document.rb, line 46</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> = []
13 <span class="ruby-identifier">ngrams_array</span> = []
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>
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>
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>)
20 <span class="ruby-keyword kw">end</span>
21 <span class="ruby-keyword kw">end</span>
22
23 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">uniq</span>
24 <span class="ruby-keyword kw">end</span></pre>
25 </body>
26 </html>
27 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Document.src/M000021.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>count_words (RIR::Document)</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/document.rb, line 64</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> }
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
15 <span class="ruby-identifier">counts</span>
16 <span class="ruby-keyword kw">end</span></pre>
17 </body>
18 </html>
19 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
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>entropy (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 77</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 31</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">format_words</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">wo</span> = []
13 <span class="ruby-identifier">counts</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>
14 13
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> 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>
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> 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>
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>) 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>
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">wo</span>
21 <span class="ruby-identifier">en</span>
22 <span class="ruby-keyword kw">end</span></pre> 21 <span class="ruby-keyword kw">end</span></pre>
23 </body> 22 </body>
24 </html> 23 </html>
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>new (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 92</span> 10 <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 46</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">ngrams</span>(<span class="ruby-identifier">n</span>)
12 <span class="ruby-ivar">@doc_content</span> = <span class="ruby-identifier">content</span> 12 <span class="ruby-identifier">window</span> = []
13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span> 13 <span class="ruby-identifier">ngrams_array</span> = []
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>
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>
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>)
20 <span class="ruby-keyword kw">end</span>
21 <span class="ruby-keyword kw">end</span>
22
23 <span class="ruby-identifier">ngrams_array</span>.<span class="ruby-identifier">uniq</span>
14 <span class="ruby-keyword kw">end</span></pre> 24 <span class="ruby-keyword kw">end</span></pre>
15 </body> 25 </body>
16 </html> 26 </html>
17 27
doc/classes/RIR/Document.src/M000024.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>count_words (RIR::Document)</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/document.rb, line 64</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> }
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
15 <span class="ruby-identifier">counts</span>
16 <span class="ruby-keyword kw">end</span></pre>
17 </body>
18 </html>
19
doc/classes/RIR/Document.src/M000025.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>entropy (RIR::Document)</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/document.rb, line 78</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>
13 <span class="ruby-identifier">counts</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">count_words</span>
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>
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>)
18 <span class="ruby-keyword kw">end</span>
19
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>
22 <span class="ruby-keyword kw">end</span></pre>
23 </body>
24 </html>
25
doc/classes/RIR/Document.src/M000026.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>tf (RIR::Document)</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/document.rb, line 94</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>
13 <span class="ruby-keyword kw">end</span></pre>
14 </body>
15 </html>
16
doc/classes/RIR/Document.src/M000027.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 (RIR::Document)</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/document.rb, line 99</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>
13 <span class="ruby-ivar">@words</span> = <span class="ruby-identifier">format_words</span>
14 <span class="ruby-keyword kw">end</span></pre>
15 </body>
16 </html>
17
doc/classes/RIR/Indri/IndriQuery.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: RIR::Indri::IndriQuery [RDoc Documentation]</title> 5 <title>Class: RIR::Indri::IndriQuery [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">RIR::Indri::IndriQuery</td> 49 <td class="class-name-in-header">RIR::Indri::IndriQuery</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/query_rb.html"> 56 <a href="../../../files/lib/rir/query_rb.html">
57 57
58 lib/rir/query.rb 58 lib/rir/query.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 <a href="../Query.html"> 73 <a href="../Query.html">
74 74
75 RIR::Query 75 RIR::Query
76 76
77 </a> 77 </a>
78 78
79 </td> 79 </td>
80 </tr> 80 </tr>
81 81
82 </table> 82 </table>
83 </div> 83 </div>
84 <!-- banner header --> 84 <!-- banner header -->
85 85
86 <div id="bodyContent"> 86 <div id="bodyContent">
87 87
88 <div id="contextContent"> 88 <div id="contextContent">
89 89
90 </div> 90 </div>
91 91
92 92
93 <div id="method-list"> 93 <div id="method-list">
94 <h3 class="section-bar">Methods</h3> 94 <h3 class="section-bar">Methods</h3>
95 95
96 <div class="name-list"> 96 <div class="name-list">
97 97
98 <a href="#M000006">new</a>&nbsp;&nbsp; 98 <a href="#M000018">new</a>&nbsp;&nbsp;
99 99
100 <a href="#M000007">to_s</a>&nbsp;&nbsp; 100 <a href="#M000019">to_s</a>&nbsp;&nbsp;
101 101
102 </div> 102 </div>
103 </div> 103 </div>
104 104
105 </div> 105 </div>
106 106
107 <!-- if includes --> 107 <!-- if includes -->
108 108
109 <div id="section"> 109 <div id="section">
110 110
111 111
112 112
113 <div id="attribute-list"> 113 <div id="attribute-list">
114 <h3 class="section-bar">Attributes</h3> 114 <h3 class="section-bar">Attributes</h3>
115 115
116 <div class="name-list"> 116 <div class="name-list">
117 <table> 117 <table>
118 118
119 <tr class="top-aligned-row context-row"> 119 <tr class="top-aligned-row context-row">
120 <td class="context-item-name">id</td> 120 <td class="context-item-name">id</td>
121 121
122 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 122 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
123 123
124 <td class="context-item-desc"></td> 124 <td class="context-item-desc"></td>
125 </tr> 125 </tr>
126 126
127 <tr class="top-aligned-row context-row"> 127 <tr class="top-aligned-row context-row">
128 <td class="context-item-name">params</td> 128 <td class="context-item-name">params</td>
129 129
130 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 130 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
131 131
132 <td class="context-item-desc"></td> 132 <td class="context-item-desc"></td>
133 </tr> 133 </tr>
134 134
135 <tr class="top-aligned-row context-row"> 135 <tr class="top-aligned-row context-row">
136 <td class="context-item-name">query</td> 136 <td class="context-item-name">query</td>
137 137
138 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 138 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
139 139
140 <td class="context-item-desc"></td> 140 <td class="context-item-desc"></td>
141 </tr> 141 </tr>
142 142
143 <tr class="top-aligned-row context-row"> 143 <tr class="top-aligned-row context-row">
144 <td class="context-item-name">rule</td> 144 <td class="context-item-name">rule</td>
145 145
146 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 146 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
147 147
148 <td class="context-item-desc"></td> 148 <td class="context-item-desc"></td>
149 </tr> 149 </tr>
150 150
151 </table> 151 </table>
152 </div> 152 </div>
153 </div> 153 </div>
154 154
155 155
156 <!-- if method_list --> 156 <!-- if method_list -->
157 157
158 <div id="methods"> 158 <div id="methods">
159 159
160 <h3 class="section-bar">Public Class methods</h3> 160 <h3 class="section-bar">Public Class methods</h3>
161 161
162 162
163 <div id="method-M000006" class="method-detail"> 163 <div id="method-M000018" class="method-detail">
164 <a name="M000006"></a> 164 <a name="M000018"></a>
165 165
166 <div class="method-heading"> 166 <div class="method-heading">
167 167
168 <a href="IndriQuery.src/M000006.html" target="Code" class="method-signature" 168 <a href="IndriQuery.src/M000018.html" target="Code" class="method-signature"
169 onclick="popupCode('IndriQuery.src/M000006.html');return false;"> 169 onclick="popupCode('IndriQuery.src/M000018.html');return false;">
170 170
171 <span class="method-name">new</span><span class="method-args">(id,query,params)</span> 171 <span class="method-name">new</span><span class="method-args">(id,query,params)</span>
172 172
173 </a> 173 </a>
174 174
175 </div> 175 </div>
176 176
177 <div class="method-description"> 177 <div class="method-description">
178 178
179 </div> 179 </div>
180 </div> 180 </div>
181 181
182 182
183 <h3 class="section-bar">Public Instance methods</h3> 183 <h3 class="section-bar">Public Instance methods</h3>
184 184
185 185
186 <div id="method-M000007" class="method-detail"> 186 <div id="method-M000019" class="method-detail">
187 <a name="M000007"></a> 187 <a name="M000019"></a>
188 188
189 <div class="method-heading"> 189 <div class="method-heading">
190 190
191 <a href="IndriQuery.src/M000007.html" target="Code" class="method-signature" 191 <a href="IndriQuery.src/M000019.html" target="Code" class="method-signature"
192 onclick="popupCode('IndriQuery.src/M000007.html');return false;"> 192 onclick="popupCode('IndriQuery.src/M000019.html');return false;">
193 193
194 <span class="method-name">to_s</span><span class="method-args">()</span> 194 <span class="method-name">to_s</span><span class="method-args">()</span>
195 195
196 </a> 196 </a>
197 197
198 </div> 198 </div>
199 199
200 <div class="method-description"> 200 <div class="method-description">
201 201
202 </div> 202 </div>
203 </div> 203 </div>
204 204
205 205
206 206
207 </div> 207 </div>
208 208
209 209
210 210
211 211
212 </div> 212 </div>
213 213
214 <div id="validator-badges"> 214 <div id="validator-badges">
215 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 215 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
216 </div> 216 </div>
217 217
218 </body> 218 </body>
219 </html> 219 </html>
220 220
doc/classes/RIR/Indri/IndriQuery.src/M000006.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/IndriQuery.src/M000007.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/IndriQuery.src/M000014.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/IndriQuery.src/M000015.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/IndriQuery.src/M000016.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 74</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/IndriQuery.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 (RIR::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/RIR/Indri/IndriQuery.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 (RIR::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/RIR/Indri/Parameters.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: RIR::Indri::Parameters [RDoc Documentation]</title> 5 <title>Class: RIR::Indri::Parameters [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">RIR::Indri::Parameters</td> 49 <td class="class-name-in-header">RIR::Indri::Parameters</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/query_rb.html"> 56 <a href="../../../files/lib/rir/query_rb.html">
57 57
58 lib/rir/query.rb 58 lib/rir/query.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> 86 </div>
87 87
88 88
89 <div id="method-list"> 89 <div id="method-list">
90 <h3 class="section-bar">Methods</h3> 90 <h3 class="section-bar">Methods</h3>
91 91
92 <div class="name-list"> 92 <div class="name-list">
93 93
94 <a href="#M000004">new</a>&nbsp;&nbsp; 94 <a href="#M000016">new</a>&nbsp;&nbsp;
95 95
96 <a href="#M000005">to_s</a>&nbsp;&nbsp; 96 <a href="#M000017">to_s</a>&nbsp;&nbsp;
97 97
98 </div> 98 </div>
99 </div> 99 </div>
100 100
101 </div> 101 </div>
102 102
103 <!-- if includes --> 103 <!-- if includes -->
104 104
105 <div id="section"> 105 <div id="section">
106 106
107 107
108 108
109 <div id="attribute-list"> 109 <div id="attribute-list">
110 <h3 class="section-bar">Attributes</h3> 110 <h3 class="section-bar">Attributes</h3>
111 111
112 <div class="name-list"> 112 <div class="name-list">
113 <table> 113 <table>
114 114
115 <tr class="top-aligned-row context-row"> 115 <tr class="top-aligned-row context-row">
116 <td class="context-item-name">baseline</td> 116 <td class="context-item-name">baseline</td>
117 117
118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 118 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
119 119
120 <td class="context-item-desc"></td> 120 <td class="context-item-desc"></td>
121 </tr> 121 </tr>
122 122
123 <tr class="top-aligned-row context-row"> 123 <tr class="top-aligned-row context-row">
124 <td class="context-item-name">count</td> 124 <td class="context-item-name">count</td>
125 125
126 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 126 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
127 127
128 <td class="context-item-desc"></td> 128 <td class="context-item-desc"></td>
129 </tr> 129 </tr>
130 130
131 <tr class="top-aligned-row context-row"> 131 <tr class="top-aligned-row context-row">
132 <td class="context-item-name">index_path</td> 132 <td class="context-item-name">index_path</td>
133 133
134 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 134 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
135 135
136 <td class="context-item-desc"></td> 136 <td class="context-item-desc"></td>
137 </tr> 137 </tr>
138 138
139 <tr class="top-aligned-row context-row"> 139 <tr class="top-aligned-row context-row">
140 <td class="context-item-name">memory</td> 140 <td class="context-item-name">memory</td>
141 141
142 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 142 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
143 143
144 <td class="context-item-desc"></td> 144 <td class="context-item-desc"></td>
145 </tr> 145 </tr>
146 146
147 <tr class="top-aligned-row context-row"> 147 <tr class="top-aligned-row context-row">
148 <td class="context-item-name">offset</td> 148 <td class="context-item-name">offset</td>
149 149
150 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 150 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
151 151
152 <td class="context-item-desc"></td> 152 <td class="context-item-desc"></td>
153 </tr> 153 </tr>
154 154
155 <tr class="top-aligned-row context-row"> 155 <tr class="top-aligned-row context-row">
156 <td class="context-item-name">print_docs</td> 156 <td class="context-item-name">print_docs</td>
157 157
158 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 158 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
159 159
160 <td class="context-item-desc"></td> 160 <td class="context-item-desc"></td>
161 </tr> 161 </tr>
162 162
163 <tr class="top-aligned-row context-row"> 163 <tr class="top-aligned-row context-row">
164 <td class="context-item-name">print_query</td> 164 <td class="context-item-name">print_query</td>
165 165
166 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 166 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
167 167
168 <td class="context-item-desc"></td> 168 <td class="context-item-desc"></td>
169 </tr> 169 </tr>
170 170
171 <tr class="top-aligned-row context-row"> 171 <tr class="top-aligned-row context-row">
172 <td class="context-item-name">rule</td> 172 <td class="context-item-name">rule</td>
173 173
174 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 174 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
175 175
176 <td class="context-item-desc"></td> 176 <td class="context-item-desc"></td>
177 </tr> 177 </tr>
178 178
179 <tr class="top-aligned-row context-row"> 179 <tr class="top-aligned-row context-row">
180 <td class="context-item-name">run_id</td> 180 <td class="context-item-name">run_id</td>
181 181
182 <td class="context-item-value">&nbsp;[RW]&nbsp;</td> 182 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
183 183
184 <td class="context-item-desc"></td> 184 <td class="context-item-desc"></td>
185 </tr> 185 </tr>
186 186
187 </table> 187 </table>
188 </div> 188 </div>
189 </div> 189 </div>
190 190
191 191
192 <!-- if method_list --> 192 <!-- if method_list -->
193 193
194 <div id="methods"> 194 <div id="methods">
195 195
196 <h3 class="section-bar">Public Class methods</h3> 196 <h3 class="section-bar">Public Class methods</h3>
197 197
198 198
199 <div id="method-M000004" class="method-detail"> 199 <div id="method-M000016" class="method-detail">
200 <a name="M000004"></a> 200 <a name="M000016"></a>
201 201
202 <div class="method-heading"> 202 <div class="method-heading">
203 203
204 <a href="Parameters.src/M000004.html" target="Code" class="method-signature" 204 <a href="Parameters.src/M000016.html" target="Code" class="method-signature"
205 onclick="popupCode('Parameters.src/M000004.html');return false;"> 205 onclick="popupCode('Parameters.src/M000016.html');return false;">
206 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> 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 208
209 </a> 209 </a>
210 210
211 </div> 211 </div>
212 212
213 <div class="method-description"> 213 <div class="method-description">
214 214
215 </div> 215 </div>
216 </div> 216 </div>
217 217
218 218
219 <h3 class="section-bar">Public Instance methods</h3> 219 <h3 class="section-bar">Public Instance methods</h3>
220 220
221 221
222 <div id="method-M000005" class="method-detail"> 222 <div id="method-M000017" class="method-detail">
223 <a name="M000005"></a> 223 <a name="M000017"></a>
224 224
225 <div class="method-heading"> 225 <div class="method-heading">
226 226
227 <a href="Parameters.src/M000005.html" target="Code" class="method-signature" 227 <a href="Parameters.src/M000017.html" target="Code" class="method-signature"
228 onclick="popupCode('Parameters.src/M000005.html');return false;"> 228 onclick="popupCode('Parameters.src/M000017.html');return false;">
229 229
230 <span class="method-name">to_s</span><span class="method-args">()</span> 230 <span class="method-name">to_s</span><span class="method-args">()</span>
231 231
232 </a> 232 </a>
233 233
234 </div> 234 </div>
235 235
236 <div class="method-description"> 236 <div class="method-description">
237 237
238 </div> 238 </div>
239 </div> 239 </div>
240 240
241 241
242 242
243 </div> 243 </div>
244 244
245 245
246 246
247 247
248 </div> 248 </div>
249 249
250 <div id="validator-badges"> 250 <div id="validator-badges">
251 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 251 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
252 </div> 252 </div>
253 253
254 </body> 254 </body>
255 </html> 255 </html>
256 256
doc/classes/RIR/Indri/Parameters.src/M000004.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/Parameters.src/M000005.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/Parameters.src/M000012.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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">@corpus</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/Parameters.src/M000013.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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;#{@corpus}&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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/Parameters.src/M000014.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 41</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;#{@corpus}&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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/Indri/Parameters.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 (RIR::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/RIR/Indri/Parameters.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>to_s (RIR::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/RIR/TreeTagger/Chunk.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: RIR::TreeTagger::Chunk [RDoc Documentation]</title> 5 <title>Class: RIR::TreeTagger::Chunk [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">RIR::TreeTagger::Chunk</td> 49 <td class="class-name-in-header">RIR::TreeTagger::Chunk</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"> 56 <a href="../../../files/lib/rir/ttagger_rb.html">
57 57
58 lib/rir/ttagger.rb 58 lib/rir/ttagger.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 Represents a <a href="Chunk.html">Chunk</a> extracted when parsing a <a 88 Represents a <a href="Chunk.html">Chunk</a> extracted when parsing a <a
89 href="TaggerChunker.html">TaggerChunker</a> file. 89 href="TaggerChunker.html">TaggerChunker</a> file.
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="#M000003">new</a>&nbsp;&nbsp; 102 <a href="#M000015">new</a>&nbsp;&nbsp;
103 103
104 </div> 104 </div>
105 </div> 105 </div>
106 106
107 </div> 107 </div>
108 108
109 <!-- if includes --> 109 <!-- if includes -->
110 110
111 <div id="section"> 111 <div id="section">
112 112
113 113
114 114
115 <div id="attribute-list"> 115 <div id="attribute-list">
116 <h3 class="section-bar">Attributes</h3> 116 <h3 class="section-bar">Attributes</h3>
117 117
118 <div class="name-list"> 118 <div class="name-list">
119 <table> 119 <table>
120 120
121 <tr class="top-aligned-row context-row"> 121 <tr class="top-aligned-row context-row">
122 <td class="context-item-name">tag</td> 122 <td class="context-item-name">tag</td>
123 123
124 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 124 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
125 125
126 <td class="context-item-desc"></td> 126 <td class="context-item-desc"></td>
127 </tr> 127 </tr>
128 128
129 <tr class="top-aligned-row context-row"> 129 <tr class="top-aligned-row context-row">
130 <td class="context-item-name">words</td> 130 <td class="context-item-name">words</td>
131 131
132 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 132 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
133 133
134 <td class="context-item-desc"></td> 134 <td class="context-item-desc"></td>
135 </tr> 135 </tr>
136 136
137 </table> 137 </table>
138 </div> 138 </div>
139 </div> 139 </div>
140 140
141 141
142 <!-- if method_list --> 142 <!-- if method_list -->
143 143
144 <div id="methods"> 144 <div id="methods">
145 145
146 <h3 class="section-bar">Public Class methods</h3> 146 <h3 class="section-bar">Public Class methods</h3>
147 147
148 148
149 <div id="method-M000003" class="method-detail"> 149 <div id="method-M000015" class="method-detail">
150 <a name="M000003"></a> 150 <a name="M000015"></a>
151 151
152 <div class="method-heading"> 152 <div class="method-heading">
153 153
154 <a href="Chunk.src/M000003.html" target="Code" class="method-signature" 154 <a href="Chunk.src/M000015.html" target="Code" class="method-signature"
155 onclick="popupCode('Chunk.src/M000003.html');return false;"> 155 onclick="popupCode('Chunk.src/M000015.html');return false;">
156 156
157 <span class="method-name">new</span><span class="method-args">(str,tag)</span> 157 <span class="method-name">new</span><span class="method-args">(str,tag)</span>
158 158
159 </a> 159 </a>
160 160
161 </div> 161 </div>
162 162
163 <div class="method-description"> 163 <div class="method-description">
164 164
165 <p> 165 <p>
166 <tt>str</tt> are whitespace-separated terms. <tt>tag</tt> see : <a 166 <tt>str</tt> are whitespace-separated terms. <tt>tag</tt> see : <a
167 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> 167 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>
168 </p> 168 </p>
169 169
170 </div> 170 </div>
171 </div> 171 </div>
172 172
173 173
174 174
175 </div> 175 </div>
176 176
177 177
178 178
179 179
180 </div> 180 </div>
181 181
182 <div id="validator-badges"> 182 <div id="validator-badges">
183 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 183 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
184 </div> 184 </div>
185 185
186 </body> 186 </body>
187 </html> 187 </html>
188 188
doc/classes/RIR/TreeTagger/Chunk.src/M000003.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 86</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/TreeTagger/Chunk.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>new (RIR::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 86</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/RIR/TreeTagger/TaggerChunker.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: RIR::TreeTagger::TaggerChunker [RDoc Documentation]</title> 5 <title>Class: RIR::TreeTagger::TaggerChunker [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">RIR::TreeTagger::TaggerChunker</td> 49 <td class="class-name-in-header">RIR::TreeTagger::TaggerChunker</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"> 56 <a href="../../../files/lib/rir/ttagger_rb.html">
57 57
58 lib/rir/ttagger.rb 58 lib/rir/ttagger.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 This class handles generic parsing of tagger-chunker outputs. 88 This class handles generic parsing of tagger-chunker outputs.
89 </p> 89 </p>
90 90
91 </div> 91 </div>
92 92
93 </div> 93 </div>
94 94
95 95
96 <div id="method-list"> 96 <div id="method-list">
97 <h3 class="section-bar">Methods</h3> 97 <h3 class="section-bar">Methods</h3>
98 98
99 <div class="name-list"> 99 <div class="name-list">
100 100
101 <a href="#M000002">new</a>&nbsp;&nbsp; 101 <a href="#M000014">new</a>&nbsp;&nbsp;
102 102
103 <a href="#M000001">parse</a>&nbsp;&nbsp; 103 <a href="#M000013">parse</a>&nbsp;&nbsp;
104 104
105 </div> 105 </div>
106 </div> 106 </div>
107 107
108 </div> 108 </div>
109 109
110 <!-- if includes --> 110 <!-- if includes -->
111 111
112 <div id="section"> 112 <div id="section">
113 113
114 114
115 115
116 <div id="attribute-list"> 116 <div id="attribute-list">
117 <h3 class="section-bar">Attributes</h3> 117 <h3 class="section-bar">Attributes</h3>
118 118
119 <div class="name-list"> 119 <div class="name-list">
120 <table> 120 <table>
121 121
122 <tr class="top-aligned-row context-row"> 122 <tr class="top-aligned-row context-row">
123 <td class="context-item-name">chunks</td> 123 <td class="context-item-name">chunks</td>
124 124
125 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 125 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
126 126
127 <td class="context-item-desc"></td> 127 <td class="context-item-desc"></td>
128 </tr> 128 </tr>
129 129
130 <tr class="top-aligned-row context-row"> 130 <tr class="top-aligned-row context-row">
131 <td class="context-item-name">file</td> 131 <td class="context-item-name">file</td>
132 132
133 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 133 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
134 134
135 <td class="context-item-desc"></td> 135 <td class="context-item-desc"></td>
136 </tr> 136 </tr>
137 137
138 </table> 138 </table>
139 </div> 139 </div>
140 </div> 140 </div>
141 141
142 142
143 <!-- if method_list --> 143 <!-- if method_list -->
144 144
145 <div id="methods"> 145 <div id="methods">
146 146
147 <h3 class="section-bar">Public Class methods</h3> 147 <h3 class="section-bar">Public Class methods</h3>
148 148
149 149
150 <div id="method-M000002" class="method-detail"> 150 <div id="method-M000014" class="method-detail">
151 <a name="M000002"></a> 151 <a name="M000014"></a>
152 152
153 <div class="method-heading"> 153 <div class="method-heading">
154 154
155 <a href="TaggerChunker.src/M000002.html" target="Code" class="method-signature" 155 <a href="TaggerChunker.src/M000014.html" target="Code" class="method-signature"
156 onclick="popupCode('TaggerChunker.src/M000002.html');return false;"> 156 onclick="popupCode('TaggerChunker.src/M000014.html');return false;">
157 157
158 <span class="method-name">new</span><span class="method-args">(chunk_file)</span> 158 <span class="method-name">new</span><span class="method-args">(chunk_file)</span>
159 159
160 </a> 160 </a>
161 161
162 </div> 162 </div>
163 163
164 <div class="method-description"> 164 <div class="method-description">
165 165
166 <p> 166 <p>
167 Initializes parsing. <tt>chunk_file</tt> is the output of 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. 168 <tt>tagger-chunker-</tt> and must be a valid path to the file.
169 </p> 169 </p>
170 <pre> 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; 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> 172 </pre>
173 173
174 </div> 174 </div>
175 </div> 175 </div>
176 176
177 177
178 <div id="method-M000001" class="method-detail"> 178 <div id="method-M000013" class="method-detail">
179 <a name="M000001"></a> 179 <a name="M000013"></a>
180 180
181 <div class="method-heading"> 181 <div class="method-heading">
182 182
183 <a href="TaggerChunker.src/M000001.html" target="Code" class="method-signature" 183 <a href="TaggerChunker.src/M000013.html" target="Code" class="method-signature"
184 onclick="popupCode('TaggerChunker.src/M000001.html');return false;"> 184 onclick="popupCode('TaggerChunker.src/M000013.html');return false;">
185 185
186 <span class="method-name">parse</span><span class="method-args">(chunk_lines)</span> 186 <span class="method-name">parse</span><span class="method-args">(chunk_lines)</span>
187 187
188 </a> 188 </a>
189 189
190 </div> 190 </div>
191 191
192 <div class="method-description"> 192 <div class="method-description">
193 193
194 <p> 194 <p>
195 Parses a tagger-chunker output and returns an Array of <a 195 Parses a tagger-chunker output and returns an Array of <a
196 href="Chunk.html">Chunk</a>. 196 href="Chunk.html">Chunk</a>.
197 </p> 197 </p>
198 198
199 </div> 199 </div>
200 </div> 200 </div>
201 201
202 202
203 203
204 </div> 204 </div>
205 205
206 206
207 207
208 208
209 </div> 209 </div>
210 210
211 <div id="validator-badges"> 211 <div id="validator-badges">
212 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 212 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
213 </div> 213 </div>
214 214
215 </body> 215 </body>
216 </html> 216 </html>
217 217
doc/classes/RIR/TreeTagger/TaggerChunker.src/M000001.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 33</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/TreeTagger/TaggerChunker.src/M000002.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::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 65</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 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/TreeTagger/TaggerChunker.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>parse (RIR::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 33</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/RIR/TreeTagger/TaggerChunker.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>new (RIR::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 65</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/RIR/WebDocument.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: RIR::WebDocument [RDoc Documentation]</title> 5 <title>Class: RIR::WebDocument [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">RIR::WebDocument</td> 49 <td class="class-name-in-header">RIR::WebDocument</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/document_rb.html"> 56 <a href="../../files/lib/rir/document_rb.html">
57 57
58 lib/rir/document.rb 58 lib/rir/document.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 <a href="Document.html"> 73 <a href="Document.html">
74 74
75 RIR::Document 75 RIR::Document
76 76
77 </a> 77 </a>
78 78
79 </td> 79 </td>
80 </tr> 80 </tr>
81 81
82 </table> 82 </table>
83 </div> 83 </div>
84 <!-- banner header --> 84 <!-- banner header -->
85 85
86 <div id="bodyContent"> 86 <div id="bodyContent">
87 87
88 <div id="contextContent"> 88 <div id="contextContent">
89 89
90 <div id="description"> 90 <div id="description">
91 <p> 91 <p>
92 A <a href="WebDocument.html">WebDocument</a> is a <a 92 A <a href="WebDocument.html">WebDocument</a> is a <a
93 href="Document.html">Document</a> with a <tt>url</tt>. 93 href="Document.html">Document</a> with a <tt>url</tt>.
94 </p> 94 </p>
95 95
96 </div> 96 </div>
97 97
98 </div> 98 </div>
99 99
100 100
101 <div id="method-list"> 101 <div id="method-list">
102 <h3 class="section-bar">Methods</h3> 102 <h3 class="section-bar">Methods</h3>
103 103
104 <div class="name-list"> 104 <div class="name-list">
105 105
106 <a href="#M000014">get_content</a>&nbsp;&nbsp; 106 <a href="#M000028">get_content</a>&nbsp;&nbsp;
107 107
108 <a href="#M000015">new</a>&nbsp;&nbsp; 108 <a href="#M000029">new</a>&nbsp;&nbsp;
109 109
110 </div> 110 </div>
111 </div> 111 </div>
112 112
113 </div> 113 </div>
114 114
115 <!-- if includes --> 115 <!-- if includes -->
116 116
117 <div id="section"> 117 <div id="section">
118 118
119 119
120 120
121 <div id="attribute-list"> 121 <div id="attribute-list">
122 <h3 class="section-bar">Attributes</h3> 122 <h3 class="section-bar">Attributes</h3>
123 123
124 <div class="name-list"> 124 <div class="name-list">
125 <table> 125 <table>
126 126
127 <tr class="top-aligned-row context-row"> 127 <tr class="top-aligned-row context-row">
128 <td class="context-item-name">url</td> 128 <td class="context-item-name">url</td>
129 129
130 <td class="context-item-value">&nbsp;[R]&nbsp;</td> 130 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
131 131
132 <td class="context-item-desc"></td> 132 <td class="context-item-desc"></td>
133 </tr> 133 </tr>
134 134
135 </table> 135 </table>
136 </div> 136 </div>
137 </div> 137 </div>
138 138
139 139
140 <!-- if method_list --> 140 <!-- if method_list -->
141 141
142 <div id="methods"> 142 <div id="methods">
143 143
144 <h3 class="section-bar">Public Class methods</h3> 144 <h3 class="section-bar">Public Class methods</h3>
145 145
146 146
147 <div id="method-M000014" class="method-detail"> 147 <div id="method-M000028" class="method-detail">
148 <a name="M000014"></a> 148 <a name="M000028"></a>
149 149
150 <div class="method-heading"> 150 <div class="method-heading">
151 151
152 <a href="WebDocument.src/M000014.html" target="Code" class="method-signature" 152 <a href="WebDocument.src/M000028.html" target="Code" class="method-signature"
153 onclick="popupCode('WebDocument.src/M000014.html');return false;"> 153 onclick="popupCode('WebDocument.src/M000028.html');return false;">
154 154
155 <span class="method-name">get_content</span><span class="method-args">(url)</span> 155 <span class="method-name">get_content</span><span class="method-args">(url)</span>
156 156
157 </a> 157 </a>
158 158
159 </div> 159 </div>
160 160
161 <div class="method-description"> 161 <div class="method-description">
162 162
163 <p> 163 <p>
164 Returns the HTML text from the page of a given <tt>url</tt>. 164 Returns the HTML text from the page of a given <tt>url</tt>.
165 </p> 165 </p>
166 166
167 </div> 167 </div>
168 </div> 168 </div>
169 169
170 170
171 <div id="method-M000015" class="method-detail"> 171 <div id="method-M000029" class="method-detail">
172 <a name="M000015"></a> 172 <a name="M000029"></a>
173 173
174 <div class="method-heading"> 174 <div class="method-heading">
175 175
176 <a href="WebDocument.src/M000015.html" target="Code" class="method-signature" 176 <a href="WebDocument.src/M000029.html" target="Code" class="method-signature"
177 onclick="popupCode('WebDocument.src/M000015.html');return false;"> 177 onclick="popupCode('WebDocument.src/M000029.html');return false;">
178 178
179 <span class="method-name">new</span><span class="method-args">(url)</span> 179 <span class="method-name">new</span><span class="method-args">(url)</span>
180 180
181 </a> 181 </a>
182 182
183 </div> 183 </div>
184 184
185 <div class="method-description"> 185 <div class="method-description">
186 186
187 <p> 187 <p>
188 <a href="WebDocument.html">WebDocument</a> constructor, the content of the 188 <a href="WebDocument.html">WebDocument</a> constructor, the content of the
189 <a href="Document.html">Document</a> is the HTML page without the tags. 189 <a href="Document.html">Document</a> is the HTML page without the tags.
190 </p> 190 </p>
191 191
192 </div> 192 </div>
193 </div> 193 </div>
194 194
195 195
196 196
197 </div> 197 </div>
198 198
199 199
200 200
201 201
202 </div> 202 </div>
203 203
204 <div id="validator-badges"> 204 <div id="validator-badges">
205 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 205 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
206 </div> 206 </div>
207 207
208 </body> 208 </body>
209 </html> 209 </html>
210 210
doc/classes/RIR/WebDocument.src/M000014.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>get_content (RIR::WebDocument)</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/document.rb, line 112</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>
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>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WebDocument.src/M000015.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::WebDocument)</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/document.rb, line 119</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>
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>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WebDocument.src/M000016.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::WebDocument)</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/document.rb, line 112</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>
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>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WebDocument.src/M000024.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>get_content (RIR::WebDocument)</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/document.rb, line 105</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>
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>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WebDocument.src/M000025.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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 (RIR::WebDocument)</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/document.rb, line 112</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>
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>
15 </body>
16 </html>
17 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WebDocument.src/M000028.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>get_content (RIR::WebDocument)</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/document.rb, line 112</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>
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>
15 </body>
16 </html>
17
doc/classes/RIR/WebDocument.src/M000029.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 (RIR::WebDocument)</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/document.rb, line 119</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>
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>
15 </body>
16 </html>
17
doc/classes/RIR/WikipediaPage.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: RIR::WikipediaPage [RDoc Documentation]</title> 5 <title>Class: RIR::WikipediaPage [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">RIR::WikipediaPage</td> 49 <td class="class-name-in-header">RIR::WikipediaPage</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/document_rb.html"> 56 <a href="../../files/lib/rir/document_rb.html">
57 57
58 lib/rir/document.rb 58 lib/rir/document.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 <a href="WebDocument.html"> 73 <a href="WebDocument.html">
74 74
75 RIR::WebDocument 75 RIR::WebDocument
76 76
77 </a> 77 </a>
78 78
79 </td> 79 </td>
80 </tr> 80 </tr>
81 81
82 </table> 82 </table>
83 </div> 83 </div>
84 <!-- banner header --> 84 <!-- banner header -->
85 85
86 <div id="bodyContent"> 86 <div id="bodyContent">
87 87
88 <div id="contextContent"> 88 <div id="contextContent">
89 89
90 <div id="description"> 90 <div id="description">
91 <p> 91 <p>
92 A <a href="WikipediaPage.html">WikipediaPage</a> is a <a 92 A <a href="WikipediaPage.html">WikipediaPage</a> is a <a
93 href="WebDocument.html">WebDocument</a>. 93 href="WebDocument.html">WebDocument</a>.
94 </p> 94 </p>
95 95
96 </div> 96 </div>
97 97
98 </div> 98 </div>
99 99
100 100
101 <div id="method-list"> 101 <div id="method-list">
102 <h3 class="section-bar">Methods</h3> 102 <h3 class="section-bar">Methods</h3>
103 103
104 <div class="name-list"> 104 <div class="name-list">
105 105
106 <a href="#M000017">get_url</a>&nbsp;&nbsp; 106 <a href="#M000031">get_url</a>&nbsp;&nbsp;
107 107
108 <a href="#M000018">search_homepage</a>&nbsp;&nbsp; 108 <a href="#M000032">search_homepage</a>&nbsp;&nbsp;
109 109
110 <a href="#M000016">search_wikipedia_titles</a>&nbsp;&nbsp; 110 <a href="#M000030">search_wikipedia_titles</a>&nbsp;&nbsp;
111 111
112 </div> 112 </div>
113 </div> 113 </div>
114 114
115 </div> 115 </div>
116 116
117 <!-- if includes --> 117 <!-- if includes -->
118 118
119 <div id="section"> 119 <div id="section">
120 120
121 121
122 122
123 123
124 <!-- if method_list --> 124 <!-- if method_list -->
125 125
126 <div id="methods"> 126 <div id="methods">
127 127
128 <h3 class="section-bar">Public Class methods</h3> 128 <h3 class="section-bar">Public Class methods</h3>
129 129
130 130
131 <div id="method-M000017" class="method-detail"> 131 <div id="method-M000031" class="method-detail">
132 <a name="M000017"></a> 132 <a name="M000031"></a>
133 133
134 <div class="method-heading"> 134 <div class="method-heading">
135 135
136 <a href="WikipediaPage.src/M000017.html" target="Code" class="method-signature" 136 <a href="WikipediaPage.src/M000031.html" target="Code" class="method-signature"
137 onclick="popupCode('WikipediaPage.src/M000017.html');return false;"> 137 onclick="popupCode('WikipediaPage.src/M000031.html');return false;">
138 138
139 <span class="method-name">get_url</span><span class="method-args">(name)</span> 139 <span class="method-name">get_url</span><span class="method-args">(name)</span>
140 140
141 </a> 141 </a>
142 142
143 </div> 143 </div>
144 144
145 <div class="method-description"> 145 <div class="method-description">
146 146
147 </div> 147 </div>
148 </div> 148 </div>
149 149
150 150
151 <div id="method-M000018" class="method-detail"> 151 <div id="method-M000032" class="method-detail">
152 <a name="M000018"></a> 152 <a name="M000032"></a>
153 153
154 <div class="method-heading"> 154 <div class="method-heading">
155 155
156 <a href="WikipediaPage.src/M000018.html" target="Code" class="method-signature" 156 <a href="WikipediaPage.src/M000032.html" target="Code" class="method-signature"
157 onclick="popupCode('WikipediaPage.src/M000018.html');return false;"> 157 onclick="popupCode('WikipediaPage.src/M000032.html');return false;">
158 158
159 <span class="method-name">search_homepage</span><span class="method-args">(name)</span> 159 <span class="method-name">search_homepage</span><span class="method-args">(name)</span>
160 160
161 </a> 161 </a>
162 162
163 </div> 163 </div>
164 164
165 <div class="method-description"> 165 <div class="method-description">
166 166
167 </div> 167 </div>
168 </div> 168 </div>
169 169
170 170
171 <div id="method-M000016" class="method-detail"> 171 <div id="method-M000030" class="method-detail">
172 <a name="M000016"></a> 172 <a name="M000030"></a>
173 173
174 <div class="method-heading"> 174 <div class="method-heading">
175 175
176 <a href="WikipediaPage.src/M000016.html" target="Code" class="method-signature" 176 <a href="WikipediaPage.src/M000030.html" target="Code" class="method-signature"
177 onclick="popupCode('WikipediaPage.src/M000016.html');return false;"> 177 onclick="popupCode('WikipediaPage.src/M000030.html');return false;">
178 178
179 <span class="method-name">search_wikipedia_titles</span><span class="method-args">(name)</span> 179 <span class="method-name">search_wikipedia_titles</span><span class="method-args">(name)</span>
180 180
181 </a> 181 </a>
182 182
183 </div> 183 </div>
184 184
185 <div class="method-description"> 185 <div class="method-description">
186 186
187 </div> 187 </div>
188 </div> 188 </div>
189 189
190 190
191 191
192 </div> 192 </div>
193 193
194 194
195 195
196 196
197 </div> 197 </div>
198 198
199 <div id="validator-badges"> 199 <div id="validator-badges">
200 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> 200 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
201 </div> 201 </div>
202 202
203 </body> 203 </body>
204 </html> 204 </html>
205 205
doc/classes/RIR/WikipediaPage.src/M000016.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>search_wikipedia_titles (RIR::WikipediaPage)</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/document.rb, line 132</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>
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>]
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>
17 <span class="ruby-keyword kw">end</span></pre>
18 </body>
19 </html>
20 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WikipediaPage.src/M000017.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted
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>get_url (RIR::WikipediaPage)</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/document.rb, line 140</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>
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>
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>
17 <span class="ruby-keyword kw">end</span></pre>
18 </body>
19 </html>
20 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
doc/classes/RIR/WikipediaPage.src/M000018.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" File was deleted