Commit 4b35d222779a7b1edae4fd7084213693be077430
1 parent
a79a228434
Exists in
master
resolving documentation troubleshootings
Showing 87 changed files with 771 additions and 1263 deletions Side-by-side Diff
- doc/classes/RIR.html
- doc/classes/RIR/Corpus.html
- doc/classes/RIR/Corpus.src/M000016.html
- doc/classes/RIR/Corpus.src/M000017.html
- doc/classes/RIR/Corpus.src/M000018.html
- doc/classes/RIR/Corpus.src/M000020.html
- doc/classes/RIR/Corpus.src/M000021.html
- doc/classes/RIR/Document.html
- doc/classes/RIR/Document.src/M000008.html
- doc/classes/RIR/Document.src/M000009.html
- doc/classes/RIR/Document.src/M000010.html
- doc/classes/RIR/Document.src/M000011.html
- doc/classes/RIR/Document.src/M000012.html
- doc/classes/RIR/Document.src/M000013.html
- doc/classes/RIR/Document.src/M000014.html
- doc/classes/RIR/Document.src/M000019.html
- doc/classes/RIR/Document.src/M000020.html
- doc/classes/RIR/Document.src/M000021.html
- doc/classes/RIR/Document.src/M000022.html
- doc/classes/RIR/Document.src/M000023.html
- doc/classes/RIR/Document.src/M000024.html
- doc/classes/RIR/Document.src/M000025.html
- doc/classes/RIR/Document.src/M000026.html
- doc/classes/RIR/Document.src/M000027.html
- doc/classes/RIR/Indri/IndriQuery.html
- doc/classes/RIR/Indri/IndriQuery.src/M000006.html
- doc/classes/RIR/Indri/IndriQuery.src/M000007.html
- doc/classes/RIR/Indri/IndriQuery.src/M000014.html
- doc/classes/RIR/Indri/IndriQuery.src/M000015.html
- doc/classes/RIR/Indri/IndriQuery.src/M000016.html
- doc/classes/RIR/Indri/IndriQuery.src/M000018.html
- doc/classes/RIR/Indri/IndriQuery.src/M000019.html
- doc/classes/RIR/Indri/Parameters.html
- doc/classes/RIR/Indri/Parameters.src/M000004.html
- doc/classes/RIR/Indri/Parameters.src/M000005.html
- doc/classes/RIR/Indri/Parameters.src/M000012.html
- doc/classes/RIR/Indri/Parameters.src/M000013.html
- doc/classes/RIR/Indri/Parameters.src/M000014.html
- doc/classes/RIR/Indri/Parameters.src/M000016.html
- doc/classes/RIR/Indri/Parameters.src/M000017.html
- doc/classes/RIR/TreeTagger/Chunk.html
- doc/classes/RIR/TreeTagger/Chunk.src/M000003.html
- doc/classes/RIR/TreeTagger/Chunk.src/M000015.html
- doc/classes/RIR/TreeTagger/TaggerChunker.html
- doc/classes/RIR/TreeTagger/TaggerChunker.src/M000001.html
- doc/classes/RIR/TreeTagger/TaggerChunker.src/M000002.html
- doc/classes/RIR/TreeTagger/TaggerChunker.src/M000013.html
- doc/classes/RIR/TreeTagger/TaggerChunker.src/M000014.html
- doc/classes/RIR/WebDocument.html
- doc/classes/RIR/WebDocument.src/M000014.html
- doc/classes/RIR/WebDocument.src/M000015.html
- doc/classes/RIR/WebDocument.src/M000016.html
- doc/classes/RIR/WebDocument.src/M000024.html
- doc/classes/RIR/WebDocument.src/M000025.html
- doc/classes/RIR/WebDocument.src/M000028.html
- doc/classes/RIR/WebDocument.src/M000029.html
- doc/classes/RIR/WikipediaPage.html
- doc/classes/RIR/WikipediaPage.src/M000016.html
- doc/classes/RIR/WikipediaPage.src/M000017.html
- doc/classes/RIR/WikipediaPage.src/M000018.html
- doc/classes/RIR/WikipediaPage.src/M000026.html
- doc/classes/RIR/WikipediaPage.src/M000027.html
- doc/classes/RIR/WikipediaPage.src/M000028.html
- doc/classes/RIR/WikipediaPage.src/M000030.html
- doc/classes/RIR/WikipediaPage.src/M000031.html
- doc/classes/RIR/WikipediaPage.src/M000032.html
- doc/classes/String.html
- doc/classes/String.src/M000001.html
- doc/classes/String.src/M000002.html
- doc/classes/String.src/M000003.html
- doc/classes/String.src/M000004.html
- doc/classes/String.src/M000005.html
- doc/classes/String.src/M000006.html
- doc/classes/String.src/M000007.html
- doc/classes/String.src/M000008.html
- doc/classes/String.src/M000009.html
- doc/classes/String.src/M000010.html
- doc/classes/String.src/M000011.html
- doc/classes/String.src/M000012.html
- doc/created.rid
- doc/files/README_markdown.html
- doc/files/lib/rir/corpus_rb.html
- doc/files/lib/rir/ttagger_rb.html
- doc/files/main_rb.html
- doc/fr_class_index.html
- doc/fr_file_index.html
- doc/fr_method_index.html
doc/classes/RIR.html
... | ... | @@ -63,6 +63,16 @@ |
63 | 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 | 76 | <a href="../files/lib/rir/query_rb.html"> |
67 | 77 | |
68 | 78 | lib/rir/query.rb |
... | ... | @@ -73,6 +83,16 @@ |
73 | 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 | 96 | <a href="../files/lib/rir/document_rb.html"> |
77 | 97 | |
78 | 98 | lib/rir/document.rb |
... | ... | @@ -142,6 +162,52 @@ |
142 | 162 | href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>>. |
143 | 163 | </p> |
144 | 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 | 211 | General module for many purposes related to Information Retrieval. |
146 | 212 | </p> |
147 | 213 | |
148 | 214 | |
... | ... | @@ -161,11 +227,35 @@ |
161 | 227 | |
162 | 228 | Module <a href="RIR/Indri.html" class="link">RIR::Indri</a><br /> |
163 | 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 | 231 | Class <a href="RIR/Document.html" class="link">RIR::Document</a><br /> |
165 | 232 | Class <a href="RIR/Query.html" class="link">RIR::Query</a><br /> |
166 | 233 | Class <a href="RIR/WebDocument.html" class="link">RIR::WebDocument</a><br /> |
167 | 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">[ "a", "anything", "anyway", "anywhere", "apart", "are", "around", "as", "at", "av", "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", "behind", "being", "below", "beside", "besides", "between", "beyond", "both", "but", "by", "can", "cannot", "canst", "certain", "cf", "choose", "contrariwise", "cos", "could", "cu", "day", "do", "does", "doesn't", "doing", "dost", "doth", "double", "down", "dual", "during", "each", "either", "else", "elsewhere", "enough", "et", "etc", "even", "ever", "every", "everybody", "everyone", "everything", "everywhere", "except", "excepted", "excepting", "exception", "exclude", "excluding", "exclusive", "far", "farther", "farthest", "few", "ff", "first", "for", "formerly", "forth", "forward", "from", "front", "further", "furthermore", "furthest", "get", "go", "had", "halves", "hardly", "has", "hast", "hath", "have", "he", "hence", "henceforth", "her", "here", "hereabouts", "hereafter", "hereby", "herein", "hereto", "hereupon", "hers", "herself", "him", "himself", "hindmost", "his", "hither", "hitherto", "how", "however", "howsoever", "i", "ie", "if", "in", "inasmuch", "inc", "include", "included", "including", "indeed", "indoors", "inside", "insomuch", "instead", "into", "inward", "inwards", "is", "it", "its", "itself", "just", "kind", "kg", "km", "last", "latter", "latterly", "less", "lest", "let", "like", "little", "ltd", "many", "may", "maybe", "me", "meantime", "meanwhile", "might", "moreover", "most", "mostly", "more", "mr", "mrs", "ms", "much", "must", "my", "myself", "namely", "need", "neither", "never", "nevertheless", "next", "no", "nobody", "none", "nonetheless", "noone", "nope", "nor", "not", "nothing", "notwithstanding", "now", "nowadays", "nowhere", "of", "off", "often", "ok", "on", "once", "one", "only", "onto", "or", "other", "others", "otherwise", "ought", "our", "ours", "ourselves", "out", "outside", "over", "own", "per", "perhaps", "plenty", "provide", "quite", "rather", "really", "round", "said", "sake", "same", "sang", "save", "saw", "see", "seeing", "seem", "seemed", "seeming", "seems", "seen", "seldom", "selves", "sent", "several", "shalt", "she", "should", "shown", "sideways", "since", "slept", "slew", "slung", "slunk", "smote", "so", "some", "somebody", "somehow", "someone", "something", "sometime", "sometimes", "somewhat", "somewhere", "spake", "spat", "spoke", "spoken", "sprang", "sprung", "stave", "staves", "still", "such", "supposing", "than", "that", "the", "thee", "their", "them", "themselves", "then", "thence", "thenceforth", "there", "thereabout", "thereabouts", "thereafter", "thereby", "therefore", "therein", "thereof", "thereon", "thereto", "thereupon", "these", "they", "this", "those", "thou", "though", "thrice", "through", "throughout", "thru", "thus", "thy", "thyself", "till", "to", "together", "too", "toward", "towards", "ugh", "unable", "under", "underneath", "unless", "unlike", "until", "up", "upon", "upward", "upwards", "us", "use", "used", "using", "very", "via", "vs", "want", "was", "we", "week", "well", "were", "what", "whatever", "whatsoever", "when", "whence", "whenever", "whensoever", "where", "whereabouts", "whereafter", "whereas", "whereat", "whereby", "wherefore", "wherefrom", "wherein", "whereinto", "whereof", "whereon", "wheresoever", "whereto", "whereunto", "whereupon", "wherever", "wherewith", "whether", "whew", "which", "whichever", "whichsoever", "while", "whilst", "whither", "who", "whoa", "whoever", "whole", "whom", "whomever", "whomsoever", "whose", "whosoever", "why", "will", "wilt", "with", "within", "without", "worse", "worst", "would", "wow", "ye", "yet", "year", "yippee", "you", "your", "yours", "yourself", "yourselves" ]</td> | |
248 | + | |
249 | + <td> </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 | 259 | </div> |
170 | 260 | |
171 | 261 |
doc/classes/RIR/Corpus.html
... | ... | @@ -91,9 +91,9 @@ |
91 | 91 | |
92 | 92 | <div class="name-list"> |
93 | 93 | |
94 | - <a href="#M000017">files</a> | |
94 | + <a href="#M000021">files</a> | |
95 | 95 | |
96 | - <a href="#M000016">new</a> | |
96 | + <a href="#M000020">new</a> | |
97 | 97 | |
98 | 98 | </div> |
99 | 99 | </div> |
100 | 100 | |
... | ... | @@ -132,13 +132,13 @@ |
132 | 132 | <h3 class="section-bar">Public Class methods</h3> |
133 | 133 | |
134 | 134 | |
135 | - <div id="method-M000016" class="method-detail"> | |
136 | - <a name="M000016"></a> | |
135 | + <div id="method-M000020" class="method-detail"> | |
136 | + <a name="M000020"></a> | |
137 | 137 | |
138 | 138 | <div class="method-heading"> |
139 | 139 | |
140 | - <a href="Corpus.src/M000016.html" target="Code" class="method-signature" | |
141 | - onclick="popupCode('Corpus.src/M000016.html');return false;"> | |
140 | + <a href="Corpus.src/M000020.html" target="Code" class="method-signature" | |
141 | + onclick="popupCode('Corpus.src/M000020.html');return false;"> | |
142 | 142 | |
143 | 143 | <span class="method-name">new</span><span class="method-args">(path)</span> |
144 | 144 | |
145 | 145 | |
... | ... | @@ -155,13 +155,13 @@ |
155 | 155 | <h3 class="section-bar">Public Instance methods</h3> |
156 | 156 | |
157 | 157 | |
158 | - <div id="method-M000017" class="method-detail"> | |
159 | - <a name="M000017"></a> | |
158 | + <div id="method-M000021" class="method-detail"> | |
159 | + <a name="M000021"></a> | |
160 | 160 | |
161 | 161 | <div class="method-heading"> |
162 | 162 | |
163 | - <a href="Corpus.src/M000017.html" target="Code" class="method-signature" | |
164 | - onclick="popupCode('Corpus.src/M000017.html');return false;"> | |
163 | + <a href="Corpus.src/M000021.html" target="Code" class="method-signature" | |
164 | + onclick="popupCode('Corpus.src/M000021.html');return false;"> | |
165 | 165 | |
166 | 166 | <span class="method-name">files</span><span class="method-args">()</span> |
167 | 167 |
doc/classes/RIR/Corpus.src/M000016.html
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">"/"</span> | |
13 | - <span class="ruby-keyword kw">end</span></pre> | |
14 | -</body> | |
15 | -</html> |
doc/classes/RIR/Corpus.src/M000017.html
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">"#{@path}/**/*.*"</span>] | |
13 | - <span class="ruby-keyword kw">end</span></pre> | |
14 | -</body> | |
15 | -</html> |
doc/classes/RIR/Corpus.src/M000018.html
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 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">"#{@path}/**/*.*"</span>] | |
13 | - <span class="ruby-keyword kw">end</span></pre> | |
14 | -</body> | |
15 | -</html> |
doc/classes/RIR/Corpus.src/M000020.html
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">"/"</span> | |
13 | + <span class="ruby-keyword kw">end</span></pre> | |
14 | +</body> | |
15 | +</html> |
doc/classes/RIR/Corpus.src/M000021.html
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">"#{@path}/**/*.*"</span>] | |
13 | + <span class="ruby-keyword kw">end</span></pre> | |
14 | +</body> | |
15 | +</html> |
doc/classes/RIR/Document.html
... | ... | @@ -99,17 +99,17 @@ |
99 | 99 | |
100 | 100 | <div class="name-list"> |
101 | 101 | |
102 | - <a href="#M000010">count_words</a> | |
102 | + <a href="#M000024">count_words</a> | |
103 | 103 | |
104 | - <a href="#M000011">entropy</a> | |
104 | + <a href="#M000025">entropy</a> | |
105 | 105 | |
106 | - <a href="#M000008">format_words</a> | |
106 | + <a href="#M000022">format_words</a> | |
107 | 107 | |
108 | - <a href="#M000013">new</a> | |
108 | + <a href="#M000027">new</a> | |
109 | 109 | |
110 | - <a href="#M000009">ngrams</a> | |
110 | + <a href="#M000023">ngrams</a> | |
111 | 111 | |
112 | - <a href="#M000012">tf</a> | |
112 | + <a href="#M000026">tf</a> | |
113 | 113 | |
114 | 114 | </div> |
115 | 115 | </div> |
116 | 116 | |
... | ... | @@ -156,13 +156,13 @@ |
156 | 156 | <h3 class="section-bar">Public Class methods</h3> |
157 | 157 | |
158 | 158 | |
159 | - <div id="method-M000013" class="method-detail"> | |
160 | - <a name="M000013"></a> | |
159 | + <div id="method-M000027" class="method-detail"> | |
160 | + <a name="M000027"></a> | |
161 | 161 | |
162 | 162 | <div class="method-heading"> |
163 | 163 | |
164 | - <a href="Document.src/M000013.html" target="Code" class="method-signature" | |
165 | - onclick="popupCode('Document.src/M000013.html');return false;"> | |
164 | + <a href="Document.src/M000027.html" target="Code" class="method-signature" | |
165 | + onclick="popupCode('Document.src/M000027.html');return false;"> | |
166 | 166 | |
167 | 167 | <span class="method-name">new</span><span class="method-args">(content)</span> |
168 | 168 | |
169 | 169 | |
... | ... | @@ -179,13 +179,13 @@ |
179 | 179 | <h3 class="section-bar">Public Instance methods</h3> |
180 | 180 | |
181 | 181 | |
182 | - <div id="method-M000010" class="method-detail"> | |
183 | - <a name="M000010"></a> | |
182 | + <div id="method-M000024" class="method-detail"> | |
183 | + <a name="M000024"></a> | |
184 | 184 | |
185 | 185 | <div class="method-heading"> |
186 | 186 | |
187 | - <a href="Document.src/M000010.html" target="Code" class="method-signature" | |
188 | - onclick="popupCode('Document.src/M000010.html');return false;"> | |
187 | + <a href="Document.src/M000024.html" target="Code" class="method-signature" | |
188 | + onclick="popupCode('Document.src/M000024.html');return false;"> | |
189 | 189 | |
190 | 190 | <span class="method-name">count_words</span><span class="method-args">()</span> |
191 | 191 | |
192 | 192 | |
... | ... | @@ -207,13 +207,13 @@ |
207 | 207 | </div> |
208 | 208 | |
209 | 209 | |
210 | - <div id="method-M000011" class="method-detail"> | |
211 | - <a name="M000011"></a> | |
210 | + <div id="method-M000025" class="method-detail"> | |
211 | + <a name="M000025"></a> | |
212 | 212 | |
213 | 213 | <div class="method-heading"> |
214 | 214 | |
215 | - <a href="Document.src/M000011.html" target="Code" class="method-signature" | |
216 | - onclick="popupCode('Document.src/M000011.html');return false;"> | |
215 | + <a href="Document.src/M000025.html" target="Code" class="method-signature" | |
216 | + onclick="popupCode('Document.src/M000025.html');return false;"> | |
217 | 217 | |
218 | 218 | <span class="method-name">entropy</span><span class="method-args">(s)</span> |
219 | 219 | |
220 | 220 | |
... | ... | @@ -239,13 +239,13 @@ |
239 | 239 | </div> |
240 | 240 | |
241 | 241 | |
242 | - <div id="method-M000009" class="method-detail"> | |
243 | - <a name="M000009"></a> | |
242 | + <div id="method-M000023" class="method-detail"> | |
243 | + <a name="M000023"></a> | |
244 | 244 | |
245 | 245 | <div class="method-heading"> |
246 | 246 | |
247 | - <a href="Document.src/M000009.html" target="Code" class="method-signature" | |
248 | - onclick="popupCode('Document.src/M000009.html');return false;"> | |
247 | + <a href="Document.src/M000023.html" target="Code" class="method-signature" | |
248 | + onclick="popupCode('Document.src/M000023.html');return false;"> | |
249 | 249 | |
250 | 250 | <span class="method-name">ngrams</span><span class="method-args">(n)</span> |
251 | 251 | |
252 | 252 | |
... | ... | @@ -267,13 +267,13 @@ |
267 | 267 | </div> |
268 | 268 | |
269 | 269 | |
270 | - <div id="method-M000012" class="method-detail"> | |
271 | - <a name="M000012"></a> | |
270 | + <div id="method-M000026" class="method-detail"> | |
271 | + <a name="M000026"></a> | |
272 | 272 | |
273 | 273 | <div class="method-heading"> |
274 | 274 | |
275 | - <a href="Document.src/M000012.html" target="Code" class="method-signature" | |
276 | - onclick="popupCode('Document.src/M000012.html');return false;"> | |
275 | + <a href="Document.src/M000026.html" target="Code" class="method-signature" | |
276 | + onclick="popupCode('Document.src/M000026.html');return false;"> | |
277 | 277 | |
278 | 278 | <span class="method-name">tf</span><span class="method-args">(s)</span> |
279 | 279 | |
280 | 280 | |
... | ... | @@ -297,13 +297,13 @@ |
297 | 297 | <h3 class="section-bar">Protected Instance methods</h3> |
298 | 298 | |
299 | 299 | |
300 | - <div id="method-M000008" class="method-detail"> | |
301 | - <a name="M000008"></a> | |
300 | + <div id="method-M000022" class="method-detail"> | |
301 | + <a name="M000022"></a> | |
302 | 302 | |
303 | 303 | <div class="method-heading"> |
304 | 304 | |
305 | - <a href="Document.src/M000008.html" target="Code" class="method-signature" | |
306 | - onclick="popupCode('Document.src/M000008.html');return false;"> | |
305 | + <a href="Document.src/M000022.html" target="Code" class="method-signature" | |
306 | + onclick="popupCode('Document.src/M000022.html');return false;"> | |
307 | 307 | |
308 | 308 | <span class="method-name">format_words</span><span class="method-args">()</span> |
309 | 309 |
doc/classes/RIR/Document.src/M000008.html
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>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> |
doc/classes/RIR/Document.src/M000009.html
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>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">" "</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> |
doc/classes/RIR/Document.src/M000010.html
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> |
doc/classes/RIR/Document.src/M000011.html
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> |
doc/classes/RIR/Document.src/M000012.html
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> |
doc/classes/RIR/Document.src/M000013.html
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> |
doc/classes/RIR/Document.src/M000014.html
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 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> |
doc/classes/RIR/Document.src/M000019.html
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>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> |
doc/classes/RIR/Document.src/M000020.html
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>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">" "</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> |
doc/classes/RIR/Document.src/M000021.html
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> |
doc/classes/RIR/Document.src/M000022.html
... | ... | @@ -2,23 +2,22 @@ |
2 | 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
4 | 4 | <head> |
5 | - <title>entropy (RIR::Document)</title> | |
5 | + <title>format_words (RIR::Document)</title> | |
6 | 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 | 7 | <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> |
8 | 8 | </head> |
9 | 9 | <body class="standalone-code"> |
10 | - <pre><span class="ruby-comment cmt"># File lib/rir/document.rb, line 77</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> | |
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> = [] | |
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> | |
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>) | |
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 | 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> | |
19 | + | |
20 | + <span class="ruby-identifier">wo</span> | |
22 | 21 | <span class="ruby-keyword kw">end</span></pre> |
23 | 22 | </body> |
24 | 23 | </html> |
doc/classes/RIR/Document.src/M000023.html
... | ... | @@ -2,15 +2,25 @@ |
2 | 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
4 | 4 | <head> |
5 | - <title>new (RIR::Document)</title> | |
5 | + <title>ngrams (RIR::Document)</title> | |
6 | 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 | 7 | <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> |
8 | 8 | </head> |
9 | 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> | |
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">" "</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 | 24 | <span class="ruby-keyword kw">end</span></pre> |
15 | 25 | </body> |
16 | 26 | </html> |
doc/classes/RIR/Document.src/M000024.html
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> |
doc/classes/RIR/Document.src/M000025.html
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> |
doc/classes/RIR/Document.src/M000026.html
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> |
doc/classes/RIR/Document.src/M000027.html
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> |
doc/classes/RIR/Indri/IndriQuery.html
... | ... | @@ -95,9 +95,9 @@ |
95 | 95 | |
96 | 96 | <div class="name-list"> |
97 | 97 | |
98 | - <a href="#M000006">new</a> | |
98 | + <a href="#M000018">new</a> | |
99 | 99 | |
100 | - <a href="#M000007">to_s</a> | |
100 | + <a href="#M000019">to_s</a> | |
101 | 101 | |
102 | 102 | </div> |
103 | 103 | </div> |
104 | 104 | |
... | ... | @@ -160,13 +160,13 @@ |
160 | 160 | <h3 class="section-bar">Public Class methods</h3> |
161 | 161 | |
162 | 162 | |
163 | - <div id="method-M000006" class="method-detail"> | |
164 | - <a name="M000006"></a> | |
163 | + <div id="method-M000018" class="method-detail"> | |
164 | + <a name="M000018"></a> | |
165 | 165 | |
166 | 166 | <div class="method-heading"> |
167 | 167 | |
168 | - <a href="IndriQuery.src/M000006.html" target="Code" class="method-signature" | |
169 | - onclick="popupCode('IndriQuery.src/M000006.html');return false;"> | |
168 | + <a href="IndriQuery.src/M000018.html" target="Code" class="method-signature" | |
169 | + onclick="popupCode('IndriQuery.src/M000018.html');return false;"> | |
170 | 170 | |
171 | 171 | <span class="method-name">new</span><span class="method-args">(id,query,params)</span> |
172 | 172 | |
173 | 173 | |
... | ... | @@ -183,13 +183,13 @@ |
183 | 183 | <h3 class="section-bar">Public Instance methods</h3> |
184 | 184 | |
185 | 185 | |
186 | - <div id="method-M000007" class="method-detail"> | |
187 | - <a name="M000007"></a> | |
186 | + <div id="method-M000019" class="method-detail"> | |
187 | + <a name="M000019"></a> | |
188 | 188 | |
189 | 189 | <div class="method-heading"> |
190 | 190 | |
191 | - <a href="IndriQuery.src/M000007.html" target="Code" class="method-signature" | |
192 | - onclick="popupCode('IndriQuery.src/M000007.html');return false;"> | |
191 | + <a href="IndriQuery.src/M000019.html" target="Code" class="method-signature" | |
192 | + onclick="popupCode('IndriQuery.src/M000019.html');return false;"> | |
193 | 193 | |
194 | 194 | <span class="method-name">to_s</span><span class="method-args">()</span> |
195 | 195 |
doc/classes/RIR/Indri/IndriQuery.src/M000006.html
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> |
doc/classes/RIR/Indri/IndriQuery.src/M000007.html
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">"<query>\n"</span> | |
14 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<number>#{@id}</number>\n"</span> | |
15 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<text>#{@query}</text>\n"</span> | |
16 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</query>\n"</span> | |
17 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</parameters>"</span> | |
18 | - | |
19 | - <span class="ruby-identifier">h</span> | |
20 | - <span class="ruby-keyword kw">end</span></pre> | |
21 | -</body> | |
22 | -</html> |
doc/classes/RIR/Indri/IndriQuery.src/M000014.html
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> |
doc/classes/RIR/Indri/IndriQuery.src/M000015.html
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">"<query>\n"</span> | |
14 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<number>#{@id}</number>\n"</span> | |
15 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<text>#{@query}</text>\n"</span> | |
16 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</query>\n"</span> | |
17 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</parameters>"</span> | |
18 | - | |
19 | - <span class="ruby-identifier">h</span> | |
20 | - <span class="ruby-keyword kw">end</span></pre> | |
21 | -</body> | |
22 | -</html> |
doc/classes/RIR/Indri/IndriQuery.src/M000016.html
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 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">"<query>\n"</span> | |
14 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<number>#{@id}</number>\n"</span> | |
15 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<text>#{@query}</text>\n"</span> | |
16 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</query>\n"</span> | |
17 | - <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</parameters>"</span> | |
18 | - | |
19 | - <span class="ruby-identifier">h</span> | |
20 | - <span class="ruby-keyword kw">end</span></pre> | |
21 | -</body> | |
22 | -</html> |
doc/classes/RIR/Indri/IndriQuery.src/M000018.html
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> |
doc/classes/RIR/Indri/IndriQuery.src/M000019.html
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">"<query>\n"</span> | |
14 | + <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<number>#{@id}</number>\n"</span> | |
15 | + <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"<text>#{@query}</text>\n"</span> | |
16 | + <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</query>\n"</span> | |
17 | + <span class="ruby-identifier">h</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"</parameters>"</span> | |
18 | + | |
19 | + <span class="ruby-identifier">h</span> | |
20 | + <span class="ruby-keyword kw">end</span></pre> | |
21 | +</body> | |
22 | +</html> |
doc/classes/RIR/Indri/Parameters.html
... | ... | @@ -91,9 +91,9 @@ |
91 | 91 | |
92 | 92 | <div class="name-list"> |
93 | 93 | |
94 | - <a href="#M000004">new</a> | |
94 | + <a href="#M000016">new</a> | |
95 | 95 | |
96 | - <a href="#M000005">to_s</a> | |
96 | + <a href="#M000017">to_s</a> | |
97 | 97 | |
98 | 98 | </div> |
99 | 99 | </div> |
100 | 100 | |
... | ... | @@ -196,13 +196,13 @@ |
196 | 196 | <h3 class="section-bar">Public Class methods</h3> |
197 | 197 | |
198 | 198 | |
199 | - <div id="method-M000004" class="method-detail"> | |
200 | - <a name="M000004"></a> | |
199 | + <div id="method-M000016" class="method-detail"> | |
200 | + <a name="M000016"></a> | |
201 | 201 | |
202 | 202 | <div class="method-heading"> |
203 | 203 | |
204 | - <a href="Parameters.src/M000004.html" target="Code" class="method-signature" | |
205 | - onclick="popupCode('Parameters.src/M000004.html');return false;"> | |
204 | + <a href="Parameters.src/M000016.html" target="Code" class="method-signature" | |
205 | + onclick="popupCode('Parameters.src/M000016.html');return false;"> | |
206 | 206 | |
207 | 207 | <span class="method-name">new</span><span class="method-args">(corpus,mem="1g",count="1000",offset="1",run_id="default",print_query=false,print_docs=false)</span> |
208 | 208 | |
209 | 209 | |
... | ... | @@ -219,13 +219,13 @@ |
219 | 219 | <h3 class="section-bar">Public Instance methods</h3> |
220 | 220 | |
221 | 221 | |
222 | - <div id="method-M000005" class="method-detail"> | |
223 | - <a name="M000005"></a> | |
222 | + <div id="method-M000017" class="method-detail"> | |
223 | + <a name="M000017"></a> | |
224 | 224 | |
225 | 225 | <div class="method-heading"> |
226 | 226 | |
227 | - <a href="Parameters.src/M000005.html" target="Code" class="method-signature" | |
228 | - onclick="popupCode('Parameters.src/M000005.html');return false;"> | |
227 | + <a href="Parameters.src/M000017.html" target="Code" class="method-signature" | |
228 | + onclick="popupCode('Parameters.src/M000017.html');return false;"> | |
229 | 229 | |
230 | 230 | <span class="method-name">to_s</span><span class="method-args">()</span> |
231 | 231 |
doc/classes/RIR/Indri/Parameters.src/M000004.html
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 |