classifier 1.3.0 → 1.3.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.
- data/README +2 -1
- data/Rakefile +3 -4
- data/bin/bayes.rb +1 -1
- data/bin/summarize.rb +7 -2
- data/lib/classifier/extensions/string.rb +2 -2
- data/lib/classifier/extensions/vector_serialize.rb +2 -2
- data/lib/classifier/lsi.rb +2 -2
- data/lib/classifier/lsi/content_node.rb +1 -1
- metadata +73 -159
- data/doc/classes/Array.html +0 -139
- data/doc/classes/Array.src/M000003.html +0 -18
- data/doc/classes/Classifier.html +0 -140
- data/doc/classes/Classifier/Bayes.html +0 -317
- data/doc/classes/Classifier/Bayes.src/M000038.html +0 -20
- data/doc/classes/Classifier/Bayes.src/M000039.html +0 -23
- data/doc/classes/Classifier/Bayes.src/M000040.html +0 -30
- data/doc/classes/Classifier/Bayes.src/M000041.html +0 -27
- data/doc/classes/Classifier/Bayes.src/M000042.html +0 -18
- data/doc/classes/Classifier/Bayes.src/M000043.html +0 -25
- data/doc/classes/Classifier/Bayes.src/M000044.html +0 -18
- data/doc/classes/Classifier/ContentNode.html +0 -247
- data/doc/classes/Classifier/ContentNode.src/M000046.html +0 -19
- data/doc/classes/Classifier/ContentNode.src/M000047.html +0 -18
- data/doc/classes/Classifier/ContentNode.src/M000048.html +0 -18
- data/doc/classes/Classifier/ContentNode.src/M000049.html +0 -49
- data/doc/classes/Classifier/LSI.html +0 -539
- data/doc/classes/Classifier/LSI.src/M000022.html +0 -20
- data/doc/classes/Classifier/LSI.src/M000023.html +0 -18
- data/doc/classes/Classifier/LSI.src/M000024.html +0 -21
- data/doc/classes/Classifier/LSI.src/M000025.html +0 -18
- data/doc/classes/Classifier/LSI.src/M000026.html +0 -19
- data/doc/classes/Classifier/LSI.src/M000027.html +0 -21
- data/doc/classes/Classifier/LSI.src/M000028.html +0 -18
- data/doc/classes/Classifier/LSI.src/M000029.html +0 -19
- data/doc/classes/Classifier/LSI.src/M000030.html +0 -43
- data/doc/classes/Classifier/LSI.src/M000031.html +0 -23
- data/doc/classes/Classifier/LSI.src/M000032.html +0 -30
- data/doc/classes/Classifier/LSI.src/M000033.html +0 -30
- data/doc/classes/Classifier/LSI.src/M000034.html +0 -21
- data/doc/classes/Classifier/LSI.src/M000035.html +0 -21
- data/doc/classes/Classifier/LSI.src/M000036.html +0 -31
- data/doc/classes/Classifier/LSI.src/M000037.html +0 -21
- data/doc/classes/Classifier/WordList.html +0 -217
- data/doc/classes/Classifier/WordList.src/M000017.html +0 -18
- data/doc/classes/Classifier/WordList.src/M000018.html +0 -19
- data/doc/classes/Classifier/WordList.src/M000019.html +0 -19
- data/doc/classes/Classifier/WordList.src/M000020.html +0 -18
- data/doc/classes/Classifier/WordList.src/M000021.html +0 -18
- data/doc/classes/GSL.html +0 -112
- data/doc/classes/GSL/Matrix.html +0 -126
- data/doc/classes/GSL/Vector.html +0 -156
- data/doc/classes/GSL/Vector.src/M000015.html +0 -18
- data/doc/classes/GSL/Vector.src/M000016.html +0 -19
- data/doc/classes/Matrix.html +0 -184
- data/doc/classes/Matrix.src/M000004.html +0 -18
- data/doc/classes/Matrix.src/M000005.html +0 -76
- data/doc/classes/Matrix.src/M000006.html +0 -18
- data/doc/classes/Object.html +0 -139
- data/doc/classes/Object.src/M000007.html +0 -16
- data/doc/classes/String.html +0 -275
- data/doc/classes/String.src/M000008.html +0 -18
- data/doc/classes/String.src/M000009.html +0 -18
- data/doc/classes/String.src/M000010.html +0 -18
- data/doc/classes/String.src/M000011.html +0 -18
- data/doc/classes/String.src/M000012.html +0 -18
- data/doc/classes/String.src/M000013.html +0 -18
- data/doc/classes/String.src/M000014.html +0 -18
- data/doc/classes/Vector.html +0 -154
- data/doc/classes/Vector.src/M000001.html +0 -22
- data/doc/classes/Vector.src/M000002.html +0 -25
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -252
- data/doc/files/lib/classifier/bayes_rb.html +0 -115
- data/doc/files/lib/classifier/extensions/string_rb.html +0 -122
- data/doc/files/lib/classifier/extensions/vector_rb.html +0 -120
- data/doc/files/lib/classifier/extensions/vector_serialize_rb.html +0 -101
- data/doc/files/lib/classifier/extensions/word_hash_rb.html +0 -115
- data/doc/files/lib/classifier/lsi/content_node_rb.html +0 -115
- data/doc/files/lib/classifier/lsi/summary_rb.html +0 -115
- data/doc/files/lib/classifier/lsi/word_list_rb.html +0 -115
- data/doc/files/lib/classifier/lsi_rb.html +0 -127
- data/doc/files/lib/classifier_rb.html +0 -125
- data/doc/fr_class_index.html +0 -39
- data/doc/fr_file_index.html +0 -37
- data/doc/fr_method_index.html +0 -75
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>magnitude (Vector)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/classifier/extensions/vector.rb, line 16</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">magnitude</span>
|
|
15
|
-
<span class="ruby-identifier">sumsqs</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
17
|
-
<span class="ruby-identifier">sumsqs</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">**</span> <span class="ruby-value">2.0</span>
|
|
18
|
-
<span class="ruby-keyword kw">end</span>
|
|
19
|
-
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">sqrt</span>(<span class="ruby-identifier">sumsqs</span>)
|
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>normalize (Vector)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/classifier/extensions/vector.rb, line 23</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">normalize</span>
|
|
15
|
-
<span class="ruby-identifier">nv</span> = []
|
|
16
|
-
<span class="ruby-identifier">mag</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">magnitude</span>
|
|
17
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
18
|
-
|
|
19
|
-
<span class="ruby-identifier">nv</span> <span class="ruby-operator"><<</span> (<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">/</span> <span class="ruby-identifier">mag</span>)
|
|
20
|
-
|
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
|
22
|
-
<span class="ruby-constant">Vector</span>[<span class="ruby-operator">*</span><span class="ruby-identifier">nv</span>]
|
|
23
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
24
|
-
</body>
|
|
25
|
-
</html>
|
data/doc/created.rid
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Thu May 05 01:50:25 PDT 2005
|
data/doc/files/README.html
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>File: README</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="fileHeader">
|
|
50
|
-
<h1>README</h1>
|
|
51
|
-
<table class="header-table">
|
|
52
|
-
<tr class="top-aligned-row">
|
|
53
|
-
<td><strong>Path:</strong></td>
|
|
54
|
-
<td>README
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
<tr class="top-aligned-row">
|
|
58
|
-
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>Thu May 05 01:49:23 PDT 2005</td>
|
|
60
|
-
</tr>
|
|
61
|
-
</table>
|
|
62
|
-
</div>
|
|
63
|
-
<!-- banner header -->
|
|
64
|
-
|
|
65
|
-
<div id="bodyContent">
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<div id="contextContent">
|
|
70
|
-
|
|
71
|
-
<div id="description">
|
|
72
|
-
<h2>Welcome to <a href="../classes/Classifier.html">Classifier</a></h2>
|
|
73
|
-
<p>
|
|
74
|
-
<a href="../classes/Classifier.html">Classifier</a> is a general module to
|
|
75
|
-
allow Bayesian and other types of classifications.
|
|
76
|
-
</p>
|
|
77
|
-
<h2>Download</h2>
|
|
78
|
-
<ul>
|
|
79
|
-
<li><a
|
|
80
|
-
href="http://rubyforge.org/projects/classifier">rubyforge.org/projects/classifier</a>
|
|
81
|
-
|
|
82
|
-
</li>
|
|
83
|
-
<li>gem install classifier
|
|
84
|
-
|
|
85
|
-
</li>
|
|
86
|
-
<li>svn co <a
|
|
87
|
-
href="http://rufy.com/svn/classifier/trunk">rufy.com/svn/classifier/trunk</a>
|
|
88
|
-
|
|
89
|
-
</li>
|
|
90
|
-
</ul>
|
|
91
|
-
<h2>Dependencies</h2>
|
|
92
|
-
<p>
|
|
93
|
-
If you install <a href="../classes/Classifier.html">Classifier</a> from
|
|
94
|
-
source, you’ll need to install Martin Porter’s stemmer
|
|
95
|
-
algorithm with RubyGems as follows:
|
|
96
|
-
</p>
|
|
97
|
-
<pre>
|
|
98
|
-
gem install stemmer
|
|
99
|
-
</pre>
|
|
100
|
-
<p>
|
|
101
|
-
If you would like to speed up LSI classification by at least 10x, please
|
|
102
|
-
install the following libraries:
|
|
103
|
-
</p>
|
|
104
|
-
<table>
|
|
105
|
-
<tr><td valign="top">GNU <a href="../classes/GSL.html">GSL</a>:</td><td><a href="http://www.gnu.org/software/gsl">www.gnu.org/software/gsl</a>
|
|
106
|
-
|
|
107
|
-
</td></tr>
|
|
108
|
-
<tr><td valign="top">rb-gsl:</td><td><a href="http://rb-gsl.rubyforge.org">rb-gsl.rubyforge.org</a>
|
|
109
|
-
|
|
110
|
-
</td></tr>
|
|
111
|
-
</table>
|
|
112
|
-
<p>
|
|
113
|
-
Notice that LSI will work without these libraries, but as soon as they are
|
|
114
|
-
installed, <a href="../classes/Classifier.html">Classifier</a> will make
|
|
115
|
-
use of them. No configuration changes are needed, we like to keep things
|
|
116
|
-
ridiculously easy for you.
|
|
117
|
-
</p>
|
|
118
|
-
<h2>Bayes</h2>
|
|
119
|
-
<p>
|
|
120
|
-
A Bayesian classifier by Lucas Carlson. Bayesian Classifiers are accurate,
|
|
121
|
-
fast, and have modest memory requirements.
|
|
122
|
-
</p>
|
|
123
|
-
<h3>Usage</h3>
|
|
124
|
-
<pre>
|
|
125
|
-
require 'classifier'
|
|
126
|
-
b = Classifier::Bayes.new 'Interesting', 'Uninteresting'
|
|
127
|
-
b.train_interesting "here are some good words. I hope you love them"
|
|
128
|
-
b.train_uninteresting "here are some bad words, I hate you"
|
|
129
|
-
b.classify "I hate bad words and you" # returns 'Uninteresting'
|
|
130
|
-
|
|
131
|
-
require 'madeleine'
|
|
132
|
-
m = SnapshotMadeleine.new("bayes_data") {
|
|
133
|
-
Classifier::Bayes.new 'Interesting', 'Uninteresting'
|
|
134
|
-
}
|
|
135
|
-
m.system.train_interesting "here are some good words. I hope you love them"
|
|
136
|
-
m.system.train_uninteresting "here are some bad words, I hate you"
|
|
137
|
-
m.take_snapshot
|
|
138
|
-
m.system.classify "I love you" # returns 'Interesting'
|
|
139
|
-
</pre>
|
|
140
|
-
<p>
|
|
141
|
-
Using Madeleine, your application can persist the learned data over time.
|
|
142
|
-
</p>
|
|
143
|
-
<h3>Bayesian Classification</h3>
|
|
144
|
-
<ul>
|
|
145
|
-
<li><a
|
|
146
|
-
href="http://www.process.com/precisemail/bayesian_filtering.htm">www.process.com/precisemail/bayesian_filtering.htm</a>
|
|
147
|
-
|
|
148
|
-
</li>
|
|
149
|
-
<li><a
|
|
150
|
-
href="http://en.wikipedia.org/wiki/Bayesian_filtering">en.wikipedia.org/wiki/Bayesian_filtering</a>
|
|
151
|
-
|
|
152
|
-
</li>
|
|
153
|
-
<li><a
|
|
154
|
-
href="http://www.paulgraham.com/spam.html">www.paulgraham.com/spam.html</a>
|
|
155
|
-
|
|
156
|
-
</li>
|
|
157
|
-
</ul>
|
|
158
|
-
<h2>LSI</h2>
|
|
159
|
-
<p>
|
|
160
|
-
A Latent Semantic Indexer by David Fayram. Latent Semantic Indexing engines
|
|
161
|
-
are not as fast or as small as Bayesian classifiers, but are more flexible,
|
|
162
|
-
providing fast search and clustering detection as well as semantic analysis
|
|
163
|
-
of the text that theoretically simulates human learning.
|
|
164
|
-
</p>
|
|
165
|
-
<h3>Usage</h3>
|
|
166
|
-
<pre>
|
|
167
|
-
require 'classifier'
|
|
168
|
-
lsi = Classifier::LSI.new
|
|
169
|
-
strings = [ ["This text deals with dogs. Dogs.", :dog],
|
|
170
|
-
["This text involves dogs too. Dogs! ", :dog],
|
|
171
|
-
["This text revolves around cats. Cats.", :cat],
|
|
172
|
-
["This text also involves cats. Cats!", :cat],
|
|
173
|
-
["This text involves birds. Birds.",:bird ]]
|
|
174
|
-
strings.each {|x| lsi.add_item x.first, x.last}
|
|
175
|
-
|
|
176
|
-
lsi.search("dog", 3)
|
|
177
|
-
# returns => ["This text deals with dogs. Dogs.", "This text involves dogs too. Dogs! ",
|
|
178
|
-
# "This text also involves cats. Cats!"]
|
|
179
|
-
|
|
180
|
-
lsi.find_related(strings[2], 2)
|
|
181
|
-
# returns => ["This text revolves around cats. Cats.", "This text also involves cats. Cats!"]
|
|
182
|
-
|
|
183
|
-
lsi.classify "This text is also about dogs!"
|
|
184
|
-
# returns => :dog
|
|
185
|
-
</pre>
|
|
186
|
-
<p>
|
|
187
|
-
Please see the <a href="../classes/Classifier/LSI.html">Classifier::LSI</a>
|
|
188
|
-
documentation for more information. It is possible to index, search and
|
|
189
|
-
classify with more than just simple strings.
|
|
190
|
-
</p>
|
|
191
|
-
<h3>Latent Semantic Indexing</h3>
|
|
192
|
-
<ul>
|
|
193
|
-
<li><a
|
|
194
|
-
href="http://www.c2.com/cgi/wiki?LatentSemanticIndexing">www.c2.com/cgi/wiki?LatentSemanticIndexing</a>
|
|
195
|
-
|
|
196
|
-
</li>
|
|
197
|
-
<li><a
|
|
198
|
-
href="http://www.chadfowler.com/index.cgi/Computing/LatentSemanticIndexing.rdoc">www.chadfowler.com/index.cgi/Computing/LatentSemanticIndexing.rdoc</a>
|
|
199
|
-
|
|
200
|
-
</li>
|
|
201
|
-
<li><a
|
|
202
|
-
href="http://en.wikipedia.org/wiki/Latent_semantic_analysis">en.wikipedia.org/wiki/Latent_semantic_analysis</a>
|
|
203
|
-
|
|
204
|
-
</li>
|
|
205
|
-
</ul>
|
|
206
|
-
<h2>Authors</h2>
|
|
207
|
-
<ul>
|
|
208
|
-
<li>Lucas Carlson (<a href="mailto:lucas@rufy.com">lucas@rufy.com</a>)
|
|
209
|
-
|
|
210
|
-
</li>
|
|
211
|
-
<li>David Fayram II (<a
|
|
212
|
-
href="mailto:dfayram@lensmen.net">dfayram@lensmen.net</a>)
|
|
213
|
-
|
|
214
|
-
</li>
|
|
215
|
-
</ul>
|
|
216
|
-
<p>
|
|
217
|
-
This library is released under the terms of the GNU LGPL. See LICENSE for
|
|
218
|
-
more details.
|
|
219
|
-
</p>
|
|
220
|
-
|
|
221
|
-
</div>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
</div>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
</div>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<!-- if includes -->
|
|
231
|
-
|
|
232
|
-
<div id="section">
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<!-- if method_list -->
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
</div>
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<div id="validator-badges">
|
|
248
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
</body>
|
|
252
|
-
</html>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>File: bayes.rb</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="fileHeader">
|
|
50
|
-
<h1>bayes.rb</h1>
|
|
51
|
-
<table class="header-table">
|
|
52
|
-
<tr class="top-aligned-row">
|
|
53
|
-
<td><strong>Path:</strong></td>
|
|
54
|
-
<td>lib/classifier/bayes.rb
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
<tr class="top-aligned-row">
|
|
58
|
-
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>Mon Apr 25 00:46:40 PDT 2005</td>
|
|
60
|
-
</tr>
|
|
61
|
-
</table>
|
|
62
|
-
</div>
|
|
63
|
-
<!-- banner header -->
|
|
64
|
-
|
|
65
|
-
<div id="bodyContent">
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<div id="contextContent">
|
|
70
|
-
|
|
71
|
-
<div id="description">
|
|
72
|
-
<table>
|
|
73
|
-
<tr><td valign="top">Author:</td><td>Lucas Carlson (<a href="mailto:lucas@rufy.com">lucas@rufy.com</a>)
|
|
74
|
-
|
|
75
|
-
</td></tr>
|
|
76
|
-
<tr><td valign="top">Copyright:</td><td>Copyright © 2005 Lucas Carlson
|
|
77
|
-
|
|
78
|
-
</td></tr>
|
|
79
|
-
<tr><td valign="top">License:</td><td>LGPL
|
|
80
|
-
|
|
81
|
-
</td></tr>
|
|
82
|
-
</table>
|
|
83
|
-
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
<!-- if includes -->
|
|
94
|
-
|
|
95
|
-
<div id="section">
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<!-- if method_list -->
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<div id="validator-badges">
|
|
111
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
</body>
|
|
115
|
-
</html>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>File: string.rb</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="fileHeader">
|
|
50
|
-
<h1>string.rb</h1>
|
|
51
|
-
<table class="header-table">
|
|
52
|
-
<tr class="top-aligned-row">
|
|
53
|
-
<td><strong>Path:</strong></td>
|
|
54
|
-
<td>lib/classifier/extensions/string.rb
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
<tr class="top-aligned-row">
|
|
58
|
-
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>Thu May 05 01:14:54 PDT 2005</td>
|
|
60
|
-
</tr>
|
|
61
|
-
</table>
|
|
62
|
-
</div>
|
|
63
|
-
<!-- banner header -->
|
|
64
|
-
|
|
65
|
-
<div id="bodyContent">
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<div id="contextContent">
|
|
70
|
-
|
|
71
|
-
<div id="description">
|
|
72
|
-
<table>
|
|
73
|
-
<tr><td valign="top">Author:</td><td>Lucas Carlson (<a href="mailto:lucas@rufy.com">lucas@rufy.com</a>)
|
|
74
|
-
|
|
75
|
-
</td></tr>
|
|
76
|
-
<tr><td valign="top">Copyright:</td><td>Copyright © 2005 Lucas Carlson
|
|
77
|
-
|
|
78
|
-
</td></tr>
|
|
79
|
-
<tr><td valign="top">License:</td><td>LGPL
|
|
80
|
-
|
|
81
|
-
</td></tr>
|
|
82
|
-
</table>
|
|
83
|
-
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div id="requires-list">
|
|
87
|
-
<h3 class="section-bar">Required files</h3>
|
|
88
|
-
|
|
89
|
-
<div class="name-list">
|
|
90
|
-
classifier/extensions/word_hash
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<!-- if includes -->
|
|
101
|
-
|
|
102
|
-
<div id="section">
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<!-- if method_list -->
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<div id="validator-badges">
|
|
118
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
</body>
|
|
122
|
-
</html>
|