retreval 0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,278 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Retreval::UnrankedQueryResult</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../lib/retreval/query_result_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/retreval/query_result.rb">lib/retreval/query_result.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link"><a href="QueryResult.html">Retreval::QueryResult</a></p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#method-c-new">::new</a></li>
73
+
74
+ <li><a href="#method-i-statistics">#statistics</a></li>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+
80
+ <!-- Included Modules -->
81
+
82
+ </div>
83
+
84
+ <div id="project-metadata">
85
+
86
+
87
+ <div id="fileindex-section" class="section project-section">
88
+ <h3 class="section-header">Files</h3>
89
+ <ul>
90
+
91
+ <li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
92
+
93
+ <li class="file"><a href="../TODO.html">TODO</a></li>
94
+
95
+ </ul>
96
+ </div>
97
+
98
+
99
+ <div id="classindex-section" class="section project-section">
100
+ <h3 class="section-header">Class Index
101
+ <span class="search-toggle"><img src="../images/find.png"
102
+ height="16" width="16" alt="[+]"
103
+ title="show/hide quicksearch" /></span></h3>
104
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
105
+ <fieldset>
106
+ <legend>Quicksearch</legend>
107
+ <input type="text" name="quicksearch" value=""
108
+ class="quicksearch-field" />
109
+ </fieldset>
110
+ </form>
111
+
112
+ <ul class="link-list">
113
+
114
+ <li><a href="../Retreval.html">Retreval</a></li>
115
+
116
+ <li><a href="../Retreval/Document.html">Retreval::Document</a></li>
117
+
118
+ <li><a href="../Retreval/GoldStandard.html">Retreval::GoldStandard</a></li>
119
+
120
+ <li><a href="../Retreval/Judgement.html">Retreval::Judgement</a></li>
121
+
122
+ <li><a href="../Retreval/Options.html">Retreval::Options</a></li>
123
+
124
+ <li><a href="../Retreval/Query.html">Retreval::Query</a></li>
125
+
126
+ <li><a href="../Retreval/QueryResult.html">Retreval::QueryResult</a></li>
127
+
128
+ <li><a href="../Retreval/QueryResultSet.html">Retreval::QueryResultSet</a></li>
129
+
130
+ <li><a href="../Retreval/RankedQueryResult.html">Retreval::RankedQueryResult</a></li>
131
+
132
+ <li><a href="../Retreval/ResultDocument.html">Retreval::ResultDocument</a></li>
133
+
134
+ <li><a href="../Retreval/Runner.html">Retreval::Runner</a></li>
135
+
136
+ <li><a href="../Retreval/UnrankedQueryResult.html">Retreval::UnrankedQueryResult</a></li>
137
+
138
+ <li><a href="../Retreval/User.html">Retreval::User</a></li>
139
+
140
+ <li><a href="../TestGoldStandard.html">TestGoldStandard</a></li>
141
+
142
+ <li><a href="../TestQueryResult.html">TestQueryResult</a></li>
143
+
144
+ </ul>
145
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
146
+ </div>
147
+
148
+
149
+ </div>
150
+ </div>
151
+
152
+ <div id="documentation">
153
+ <h1 class="class">Retreval::UnrankedQueryResult</h1>
154
+
155
+ <div id="description">
156
+ <p>
157
+ An <a href="UnrankedQueryResult.html">UnrankedQueryResult</a> is a <a
158
+ href="QueryResult.html">QueryResult</a> with no special functions.
159
+ </p>
160
+
161
+ </div>
162
+
163
+ <!-- Constants -->
164
+
165
+
166
+ <!-- Attributes -->
167
+
168
+
169
+ <!-- Methods -->
170
+
171
+ <div id="public-class-method-details" class="method-section section">
172
+ <h3 class="section-header">Public Class Methods</h3>
173
+
174
+
175
+ <div id="new-method" class="method-detail ">
176
+ <a name="method-c-new"></a>
177
+
178
+ <div class="method-heading">
179
+
180
+ <span class="method-name">new</span><span
181
+ class="method-args">(args)</span>
182
+ <span class="method-click-advice">click to toggle source</span>
183
+
184
+ </div>
185
+
186
+ <div class="method-description">
187
+
188
+ <p>
189
+ Creates a new <a href="RankedQueryResult.html">RankedQueryResult</a>. One
190
+ has to specify the query string and can optionally pass a <a
191
+ href="Document.html">Document</a> array too. Called by:
192
+ </p>
193
+ <pre>
194
+ QueryResult.new :documents =&gt; array_of_document_ids, :query =&gt; &quot;my query&quot;
195
+ QueryResult.new :query =&gt; &quot;my query&quot;</pre>
196
+
197
+
198
+
199
+ <div class="method-source-code"
200
+ id="new-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/retreval/query_result.rb, line 487</span>
203
+ 487: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
204
+ 488: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">args</span>)
205
+ 489: <span class="ruby-keyword kw">end</span></pre>
206
+ </div>
207
+
208
+ </div>
209
+
210
+
211
+
212
+
213
+ </div>
214
+
215
+
216
+ </div>
217
+
218
+ <div id="public-instance-method-details" class="method-section section">
219
+ <h3 class="section-header">Public Instance Methods</h3>
220
+
221
+
222
+ <div id="statistics-method" class="method-detail ">
223
+ <a name="method-i-statistics"></a>
224
+
225
+ <div class="method-heading">
226
+
227
+ <span class="method-name">statistics</span><span
228
+ class="method-args">()</span>
229
+ <span class="method-click-advice">click to toggle source</span>
230
+
231
+ </div>
232
+
233
+ <div class="method-description">
234
+
235
+ <p>
236
+ Calculates precision and recall and returns them in a Hash
237
+ </p>
238
+
239
+
240
+
241
+ <div class="method-source-code"
242
+ id="statistics-source">
243
+ <pre>
244
+ <span class="ruby-comment cmt"># File lib/retreval/query_result.rb, line 492</span>
245
+ 492: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">statistics</span>
246
+ 493: <span class="ruby-ivar">@calculated</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@results</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">calculate</span>
247
+ 494: <span class="ruby-keyword kw">end</span></pre>
248
+ </div>
249
+
250
+ </div>
251
+
252
+
253
+
254
+
255
+ </div>
256
+
257
+
258
+ </div>
259
+
260
+
261
+ </div>
262
+
263
+
264
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
265
+
266
+ <p>Disabled; run with --debug to generate this.</p>
267
+
268
+ </div>
269
+
270
+ <div id="validator-badges">
271
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
272
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
273
+ Rdoc Generator</a> 1.1.6</small>.</p>
274
+ </div>
275
+
276
+ </body>
277
+ </html>
278
+
@@ -0,0 +1,354 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Retreval::User</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../lib/retreval/gold_standard_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/retreval/gold_standard.rb">lib/retreval/gold_standard.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">Object</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#method-c-new">::new</a></li>
73
+
74
+ <li><a href="#method-i-%3D%3D">#==</a></li>
75
+
76
+ <li><a href="#method-i-add_judgement">#add_judgement</a></li>
77
+
78
+ </ul>
79
+ </div>
80
+
81
+
82
+ <!-- Included Modules -->
83
+
84
+ </div>
85
+
86
+ <div id="project-metadata">
87
+
88
+
89
+ <div id="fileindex-section" class="section project-section">
90
+ <h3 class="section-header">Files</h3>
91
+ <ul>
92
+
93
+ <li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
94
+
95
+ <li class="file"><a href="../TODO.html">TODO</a></li>
96
+
97
+ </ul>
98
+ </div>
99
+
100
+
101
+ <div id="classindex-section" class="section project-section">
102
+ <h3 class="section-header">Class Index
103
+ <span class="search-toggle"><img src="../images/find.png"
104
+ height="16" width="16" alt="[+]"
105
+ title="show/hide quicksearch" /></span></h3>
106
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
107
+ <fieldset>
108
+ <legend>Quicksearch</legend>
109
+ <input type="text" name="quicksearch" value=""
110
+ class="quicksearch-field" />
111
+ </fieldset>
112
+ </form>
113
+
114
+ <ul class="link-list">
115
+
116
+ <li><a href="../Retreval.html">Retreval</a></li>
117
+
118
+ <li><a href="../Retreval/Document.html">Retreval::Document</a></li>
119
+
120
+ <li><a href="../Retreval/GoldStandard.html">Retreval::GoldStandard</a></li>
121
+
122
+ <li><a href="../Retreval/Judgement.html">Retreval::Judgement</a></li>
123
+
124
+ <li><a href="../Retreval/Options.html">Retreval::Options</a></li>
125
+
126
+ <li><a href="../Retreval/Query.html">Retreval::Query</a></li>
127
+
128
+ <li><a href="../Retreval/QueryResult.html">Retreval::QueryResult</a></li>
129
+
130
+ <li><a href="../Retreval/QueryResultSet.html">Retreval::QueryResultSet</a></li>
131
+
132
+ <li><a href="../Retreval/RankedQueryResult.html">Retreval::RankedQueryResult</a></li>
133
+
134
+ <li><a href="../Retreval/ResultDocument.html">Retreval::ResultDocument</a></li>
135
+
136
+ <li><a href="../Retreval/Runner.html">Retreval::Runner</a></li>
137
+
138
+ <li><a href="../Retreval/UnrankedQueryResult.html">Retreval::UnrankedQueryResult</a></li>
139
+
140
+ <li><a href="../Retreval/User.html">Retreval::User</a></li>
141
+
142
+ <li><a href="../TestGoldStandard.html">TestGoldStandard</a></li>
143
+
144
+ <li><a href="../TestQueryResult.html">TestQueryResult</a></li>
145
+
146
+ </ul>
147
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
148
+ </div>
149
+
150
+
151
+ </div>
152
+ </div>
153
+
154
+ <div id="documentation">
155
+ <h1 class="class">Retreval::User</h1>
156
+
157
+ <div id="description">
158
+ <p>
159
+ A <a href="User.html">User</a> is optional for a <a
160
+ href="Judgement.html">Judgement</a>, they are identified by their ID, which
161
+ could be anything.
162
+ </p>
163
+
164
+ </div>
165
+
166
+ <!-- Constants -->
167
+
168
+
169
+ <!-- Attributes -->
170
+
171
+ <div id="attribute-method-details" class="method-section section">
172
+ <h3 class="section-header">Attributes</h3>
173
+
174
+
175
+ <div id="id-attribute-method" class="method-detail">
176
+ <a name="id"></a>
177
+
178
+ <div class="method-heading attribute-method-heading">
179
+ <span class="method-name">id</span><span
180
+ class="attribute-access-type">[R]</span>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+
185
+
186
+
187
+ </div>
188
+ </div>
189
+
190
+ <div id="judgements-attribute-method" class="method-detail">
191
+ <a name="judgements"></a>
192
+
193
+ <div class="method-heading attribute-method-heading">
194
+ <span class="method-name">judgements</span><span
195
+ class="attribute-access-type">[R]</span>
196
+ </div>
197
+
198
+ <div class="method-description">
199
+
200
+
201
+
202
+ </div>
203
+ </div>
204
+
205
+ </div>
206
+
207
+
208
+ <!-- Methods -->
209
+
210
+ <div id="public-class-method-details" class="method-section section">
211
+ <h3 class="section-header">Public Class Methods</h3>
212
+
213
+
214
+ <div id="new-method" class="method-detail ">
215
+ <a name="method-c-new"></a>
216
+
217
+ <div class="method-heading">
218
+
219
+ <span class="method-name">new</span><span
220
+ class="method-args">(args)</span>
221
+ <span class="method-click-advice">click to toggle source</span>
222
+
223
+ </div>
224
+
225
+ <div class="method-description">
226
+
227
+ <p>
228
+ Creates a new <a href="User.html">User</a> object with a specified id
229
+ </p>
230
+
231
+
232
+
233
+ <div class="method-source-code"
234
+ id="new-source">
235
+ <pre>
236
+ <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 405</span>
237
+ 405: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
238
+ 406: <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:id</span>]
239
+ 407: <span class="ruby-ivar">@judgements</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
240
+ 408: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Can not construct a User with an empty identifier&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@id</span>.<span class="ruby-identifier">nil?</span>
241
+ 409: <span class="ruby-keyword kw">end</span></pre>
242
+ </div>
243
+
244
+ </div>
245
+
246
+
247
+
248
+
249
+ </div>
250
+
251
+
252
+ </div>
253
+
254
+ <div id="public-instance-method-details" class="method-section section">
255
+ <h3 class="section-header">Public Instance Methods</h3>
256
+
257
+
258
+ <div id="--method" class="method-detail ">
259
+ <a name="method-i-%3D%3D"></a>
260
+
261
+ <div class="method-heading">
262
+
263
+ <span class="method-name">==</span><span
264
+ class="method-args">(user)</span>
265
+ <span class="method-click-advice">click to toggle source</span>
266
+
267
+ </div>
268
+
269
+ <div class="method-description">
270
+
271
+ <p>
272
+ Compares two <a href="User.html">User</a> objects according to their id
273
+ </p>
274
+
275
+
276
+
277
+ <div class="method-source-code"
278
+ id="--source">
279
+ <pre>
280
+ <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 399</span>
281
+ 399: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">user</span>)
282
+ 400: <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
283
+ 401: <span class="ruby-keyword kw">end</span></pre>
284
+ </div>
285
+
286
+ </div>
287
+
288
+
289
+
290
+
291
+ </div>
292
+
293
+
294
+ <div id="add-judgement-method" class="method-detail ">
295
+ <a name="method-i-add_judgement"></a>
296
+
297
+ <div class="method-heading">
298
+
299
+ <span class="method-name">add_judgement</span><span
300
+ class="method-args">(judgement)</span>
301
+ <span class="method-click-advice">click to toggle source</span>
302
+
303
+ </div>
304
+
305
+ <div class="method-description">
306
+
307
+ <p>
308
+ Adds a reference to a <a href="Judgement.html">Judgement</a> to this <a
309
+ href="User.html">User</a> object, since this makes it easier to calculate
310
+ kappa later. Some users have multiple judgements for the same <a
311
+ href="Document.html">Document</a> <a href="Query.html">Query</a> pair,
312
+ which isn&#8217;t really helpful. We therefore eliminate duplicates.
313
+ </p>
314
+
315
+
316
+
317
+ <div class="method-source-code"
318
+ id="add-judgement-source">
319
+ <pre>
320
+ <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 416</span>
321
+ 416: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_judgement</span>(<span class="ruby-identifier">judgement</span>)
322
+ 417: <span class="ruby-ivar">@judgements</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">judgement</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@judgements</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">judgement</span>)
323
+ 418: <span class="ruby-keyword kw">end</span></pre>
324
+ </div>
325
+
326
+ </div>
327
+
328
+
329
+
330
+
331
+ </div>
332
+
333
+
334
+ </div>
335
+
336
+
337
+ </div>
338
+
339
+
340
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
341
+
342
+ <p>Disabled; run with --debug to generate this.</p>
343
+
344
+ </div>
345
+
346
+ <div id="validator-badges">
347
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
348
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
349
+ Rdoc Generator</a> 1.1.6</small>.</p>
350
+ </div>
351
+
352
+ </body>
353
+ </html>
354
+