bow_tfidf 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40d14aa0f73576f5e41347a94beb38c6a5656841dc6e6d6c0d9226684372e2ab
4
- data.tar.gz: 3f98488216254e1d318a2aef7b00bee20f5922a6844c18d05f15921cd2ee2296
3
+ metadata.gz: a60a701654b2abe6ec602f849730bc83d8c4dc1bb9d8e6c51eaeaa5fc98b75b0
4
+ data.tar.gz: 58e07510fb09eba371159f6db58ae1a728f603c3c784a5e9f7d8a1a588bc3a4e
5
5
  SHA512:
6
- metadata.gz: 4b3b166ff76a9b2513eac62b918ee386d7b8c5cd8e0683f60d3c8663f7c09d217b3ad56275eda26f6e5b6506f071ec69bdbfbd725daf8686ec4549b925090ea3
7
- data.tar.gz: d6a2afb56d90fa0edeb2c8f10bde35ccca4892da735056205ee2d8d1e38a3433c9f45a5cd206b75fa8c4ddf013fdc18f37c7ca125616e4adc404cdd8c09e1973
6
+ metadata.gz: d984bc5572ad977cc185631025404bb86ccfe4c79b6e82106686dfa89fe09d5b08f4c1ae60e35222510bccb8a970cf7897e6a875966e00e3bc3b903997a4ca0b
7
+ data.tar.gz: b0de453c3a9556c89976dd05ddc1b2868b1ea7e02e25ac393b9bf191a553e95b55a6f75af12d2db46aebdaf5520e919f39951e887b388729e8f463002c1d9acb
@@ -0,0 +1,6 @@
1
+ lib/bow_tfidf.rb b49f21259baa79f03f743478c11c1733d0afaff6
2
+ lib/bow_tfidf/version.rb 9b3a82963210269968f685dba19063863258df8b
3
+ lib/bow_tfidf/tokenizer.rb 3e04a5d7c7de300f5c6202d4e3ac606afa6a08cc
4
+ lib/bow_tfidf/classifier.rb ff053c3d9f9c495584ca78ee5db29f13f5fac76d
5
+ lib/bow_tfidf/computation.rb 3f889385b245e6dd01bc6751778c5657f1767932
6
+ lib/bow_tfidf/bag_of_words.rb 84d2170d67c577edb97f8166921103df4ab772f7
File without changes
Binary file
Binary file
Binary file
@@ -0,0 +1,133 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: BowTfidf
8
+
9
+ &mdash; Documentation by YARD 0.9.19
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "BowTfidf";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (B)</a> &raquo;
40
+
41
+
42
+ <span class="title">BowTfidf</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: BowTfidf
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/bow_tfidf.rb<span class="defines">,<br />
82
+ lib/bow_tfidf/version.rb,<br /> lib/bow_tfidf/tokenizer.rb,<br /> lib/bow_tfidf/classifier.rb,<br /> lib/bow_tfidf/computation.rb,<br /> lib/bow_tfidf/bag_of_words.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+
93
+
94
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="BowTfidf/BagOfWords.html" title="BowTfidf::BagOfWords (class)">BagOfWords</a></span>, <span class='object_link'><a href="BowTfidf/Classifier.html" title="BowTfidf::Classifier (class)">Classifier</a></span>, <span class='object_link'><a href="BowTfidf/Computation.html" title="BowTfidf::Computation (class)">Computation</a></span>, <span class='object_link'><a href="BowTfidf/Tokenizer.html" title="BowTfidf::Tokenizer (class)">Tokenizer</a></span>
95
+
96
+
97
+ </p>
98
+
99
+
100
+ <h2>
101
+ Constant Summary
102
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
103
+ </h2>
104
+
105
+ <dl class="constants">
106
+
107
+ <dt id="VERSION-constant" class="">VERSION =
108
+
109
+ </dt>
110
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.1.1</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
111
+
112
+ </dl>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ </div>
124
+
125
+ <div id="footer">
126
+ Generated on Tue Apr 9 12:45:14 2019 by
127
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
128
+ 0.9.19 (ruby-2.1.2).
129
+ </div>
130
+
131
+ </div>
132
+ </body>
133
+ </html>
@@ -0,0 +1,437 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: BowTfidf::BagOfWords
8
+
9
+ &mdash; Documentation by YARD 0.9.19
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "BowTfidf::BagOfWords";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../BowTfidf.html" title="BowTfidf (module)">BowTfidf</a></span></span>
41
+ &raquo;
42
+ <span class="title">BagOfWords</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: BowTfidf::BagOfWords
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">BowTfidf::BagOfWords</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/bow_tfidf/bag_of_words.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#categories-instance_method" title="#categories (instance method)">#<strong>categories</strong> &#x21d2; Object </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+ <span class="note title readonly">readonly</span>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Returns the value of attribute categories.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ <li class="public ">
139
+ <span class="summary_signature">
140
+
141
+ <a href="#words-instance_method" title="#words (instance method)">#<strong>words</strong> &#x21d2; Object </a>
142
+
143
+
144
+
145
+ </span>
146
+
147
+
148
+
149
+
150
+ <span class="note title readonly">readonly</span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'>
161
+ <p>Returns the value of attribute words.</p>
162
+ </div></span>
163
+
164
+ </li>
165
+
166
+
167
+ </ul>
168
+
169
+
170
+
171
+
172
+
173
+ <h2>
174
+ Instance Method Summary
175
+ <small><a href="#" class="summary_toggle">collapse</a></small>
176
+ </h2>
177
+
178
+ <ul class="summary">
179
+
180
+ <li class="public ">
181
+ <span class="summary_signature">
182
+
183
+ <a href="#add_labeled_data!-instance_method" title="#add_labeled_data! (instance method)">#<strong>add_labeled_data!</strong>(data) &#x21d2; Object </a>
184
+
185
+
186
+
187
+ </span>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <span class="summary_desc"><div class='inline'></div></span>
198
+
199
+ </li>
200
+
201
+
202
+ <li class="public ">
203
+ <span class="summary_signature">
204
+
205
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; BagOfWords </a>
206
+
207
+
208
+
209
+ </span>
210
+
211
+
212
+ <span class="note title constructor">constructor</span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'>
222
+ <p>A new instance of BagOfWords.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ </ul>
229
+
230
+
231
+ <div id="constructor_details" class="method_details_list">
232
+ <h2>Constructor Details</h2>
233
+
234
+ <div class="method_details first">
235
+ <h3 class="signature first" id="initialize-instance_method">
236
+
237
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="BowTfidf::BagOfWords (class)">BagOfWords</a></span></tt>
238
+
239
+
240
+
241
+
242
+
243
+ </h3><div class="docstring">
244
+ <div class="discussion">
245
+
246
+ <p>Returns a new instance of BagOfWords</p>
247
+
248
+
249
+ </div>
250
+ </div>
251
+ <div class="tags">
252
+
253
+
254
+ </div><table class="source_code">
255
+ <tr>
256
+ <td>
257
+ <pre class="lines">
258
+
259
+
260
+ 5
261
+ 6
262
+ 7
263
+ 8</pre>
264
+ </td>
265
+ <td>
266
+ <pre class="code"><span class="info file"># File 'lib/bow_tfidf/bag_of_words.rb', line 5</span>
267
+
268
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
269
+ <span class='ivar'>@words</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
270
+ <span class='ivar'>@categories</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
271
+ <span class='kw'>end</span></pre>
272
+ </td>
273
+ </tr>
274
+ </table>
275
+ </div>
276
+
277
+ </div>
278
+
279
+ <div id="instance_attr_details" class="attr_details">
280
+ <h2>Instance Attribute Details</h2>
281
+
282
+
283
+ <span id=""></span>
284
+ <div class="method_details first">
285
+ <h3 class="signature first" id="categories-instance_method">
286
+
287
+ #<strong>categories</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
288
+
289
+
290
+
291
+
292
+
293
+ </h3><div class="docstring">
294
+ <div class="discussion">
295
+
296
+ <p>Returns the value of attribute categories</p>
297
+
298
+
299
+ </div>
300
+ </div>
301
+ <div class="tags">
302
+
303
+
304
+ </div><table class="source_code">
305
+ <tr>
306
+ <td>
307
+ <pre class="lines">
308
+
309
+
310
+ 3
311
+ 4
312
+ 5</pre>
313
+ </td>
314
+ <td>
315
+ <pre class="code"><span class="info file"># File 'lib/bow_tfidf/bag_of_words.rb', line 3</span>
316
+
317
+ <span class='kw'>def</span> <span class='id identifier rubyid_categories'>categories</span>
318
+ <span class='ivar'>@categories</span>
319
+ <span class='kw'>end</span></pre>
320
+ </td>
321
+ </tr>
322
+ </table>
323
+ </div>
324
+
325
+
326
+ <span id=""></span>
327
+ <div class="method_details ">
328
+ <h3 class="signature " id="words-instance_method">
329
+
330
+ #<strong>words</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
331
+
332
+
333
+
334
+
335
+
336
+ </h3><div class="docstring">
337
+ <div class="discussion">
338
+
339
+ <p>Returns the value of attribute words</p>
340
+
341
+
342
+ </div>
343
+ </div>
344
+ <div class="tags">
345
+
346
+
347
+ </div><table class="source_code">
348
+ <tr>
349
+ <td>
350
+ <pre class="lines">
351
+
352
+
353
+ 3
354
+ 4
355
+ 5</pre>
356
+ </td>
357
+ <td>
358
+ <pre class="code"><span class="info file"># File 'lib/bow_tfidf/bag_of_words.rb', line 3</span>
359
+
360
+ <span class='kw'>def</span> <span class='id identifier rubyid_words'>words</span>
361
+ <span class='ivar'>@words</span>
362
+ <span class='kw'>end</span></pre>
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ </div>
367
+
368
+ </div>
369
+
370
+
371
+ <div id="instance_method_details" class="method_details_list">
372
+ <h2>Instance Method Details</h2>
373
+
374
+
375
+ <div class="method_details first">
376
+ <h3 class="signature first" id="add_labeled_data!-instance_method">
377
+
378
+ #<strong>add_labeled_data!</strong>(data) &#x21d2; <tt>Object</tt>
379
+
380
+
381
+
382
+
383
+
384
+ </h3><table class="source_code">
385
+ <tr>
386
+ <td>
387
+ <pre class="lines">
388
+
389
+
390
+ 10
391
+ 11
392
+ 12
393
+ 13
394
+ 14
395
+ 15
396
+ 16
397
+ 17
398
+ 18
399
+ 19
400
+ 20
401
+ 21
402
+ 22</pre>
403
+ </td>
404
+ <td>
405
+ <pre class="code"><span class="info file"># File 'lib/bow_tfidf/bag_of_words.rb', line 10</span>
406
+
407
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_labeled_data!'>add_labeled_data!</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
408
+ <span class='id identifier rubyid_validate_labeled_data'>validate_labeled_data</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
409
+
410
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_category_key'>category_key</span><span class='comma'>,</span> <span class='id identifier rubyid_category_words'>category_words</span><span class='op'>|</span>
411
+ <span class='id identifier rubyid_category'>category</span> <span class='op'>=</span> <span class='id identifier rubyid_category_by_key'>category_by_key</span><span class='lparen'>(</span><span class='id identifier rubyid_category_key'>category_key</span><span class='rparen'>)</span>
412
+
413
+ <span class='id identifier rubyid_category_words'>category_words</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_word'>word</span><span class='op'>|</span>
414
+ <span class='id identifier rubyid_add_word'>add_word</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='comma'>,</span> <span class='id identifier rubyid_category'>category</span><span class='rparen'>)</span>
415
+ <span class='kw'>end</span>
416
+ <span class='kw'>end</span>
417
+
418
+ <span class='id identifier rubyid_compute_tfidf'>compute_tfidf</span>
419
+ <span class='kw'>end</span></pre>
420
+ </td>
421
+ </tr>
422
+ </table>
423
+ </div>
424
+
425
+ </div>
426
+
427
+ </div>
428
+
429
+ <div id="footer">
430
+ Generated on Tue Apr 9 12:45:14 2019 by
431
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
432
+ 0.9.19 (ruby-2.1.2).
433
+ </div>
434
+
435
+ </div>
436
+ </body>
437
+ </html>