ruby_rhymes 0.1.0 → 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,21 @@
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>new (Phrase::Pronunciation)</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/ruby_rhymes.rb, line 177</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">word</span>, <span class="ruby-identifier">pronunciation_id</span>, <span class="ruby-identifier">num_syllables</span>, <span class="ruby-identifier">rhyme_key</span>)
15
+ <span class="ruby-ivar">@word</span> = <span class="ruby-identifier">word</span>
16
+ <span class="ruby-ivar">@pronunciation_id</span> = <span class="ruby-identifier">pronunciation_id</span>
17
+ <span class="ruby-ivar">@num_syllables</span> = <span class="ruby-identifier">num_syllables</span>
18
+ <span class="ruby-ivar">@rhyme_key</span> = <span class="ruby-identifier">rhyme_key</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,18 @@
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>dict? (Phrase::Pronunciation)</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/ruby_rhymes.rb, line 185</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dict?</span>
15
+ <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-ivar">@pronunciation_id</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>to_s (Phrase::Pronunciation)</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/ruby_rhymes.rb, line 189</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
+ <span class="ruby-identifier">word</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,210 @@
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>Class: Phrase::Pronunciations</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="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Phrase::Pronunciations</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/ruby_rhymes_rb.html">
59
+ lib/ruby_rhymes.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/syllable_arrays_rb.html">
63
+ lib/syllable_arrays.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ <tr class="top-aligned-row">
70
+ <td><strong>Parent:</strong></td>
71
+ <td>
72
+ Object
73
+ </td>
74
+ </tr>
75
+ </table>
76
+ </div>
77
+ <!-- banner header -->
78
+
79
+ <div id="bodyContent">
80
+
81
+
82
+
83
+ <div id="contextContent">
84
+
85
+ <div id="description">
86
+ <p>
87
+ <a href="Pronunciations.html">Pronunciations</a> does the heavy lifting,
88
+ interfacing with the mythical text file of doom
89
+ </p>
90
+
91
+ </div>
92
+
93
+
94
+ </div>
95
+
96
+ <div id="method-list">
97
+ <h3 class="section-bar">Methods</h3>
98
+
99
+ <div class="name-list">
100
+ <a href="#M000008">get_pronunciations</a>&nbsp;&nbsp;
101
+ <a href="#M000009">get_rhymes</a>&nbsp;&nbsp;
102
+ </div>
103
+ </div>
104
+
105
+ </div>
106
+
107
+
108
+ <!-- if includes -->
109
+
110
+ <div id="section">
111
+
112
+
113
+ <div id="constants-list">
114
+ <h3 class="section-bar">Constants</h3>
115
+
116
+ <div class="name-list">
117
+ <table summary="Constants">
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">WORDS_PATH</td>
120
+ <td>=</td>
121
+ <td class="context-item-value">&quot;words.txt&quot;</td>
122
+ </tr>
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">RHYMES_PATH</td>
125
+ <td>=</td>
126
+ <td class="context-item-value">&quot;rhymes.txt&quot;</td>
127
+ </tr>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">MULTIPLES_PATH</td>
130
+ <td>=</td>
131
+ <td class="context-item-value">&quot;multiple.txt&quot;</td>
132
+ </tr>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">SYBSYL</td>
135
+ <td>=</td>
136
+ <td class="context-item-value">[ /cial/, /tia/, /cius/, /cious/, /uiet/, /gious/, /geous/, /priest/, /giu/, /dge/, /ion/, /iou/, /sia$/, /.che$/, /.ched$/, /.abe$/, /.ace$/, /.ade$/, /.age$/, /.aged$/, /.ake$/, /.ale$/, /.aled$/, /.ales$/, /.ane$/, /.ame$/, /.ape$/, /.are$/, /.ase$/, /.ashed$/, /.asque$/, /.ate$/, /.ave$/, /.azed$/, /.awe$/, /.aze$/, /.aped$/, /.athe$/, /.athes$/, /.ece$/, /.ese$/, /.esque$/, /.esques$/, /.eze$/, /.gue$/, /.ibe$/, /.ice$/, /.ide$/, /.ife$/, /.ike$/, /.ile$/, /.ime$/, /.ine$/, /.ipe$/, /.iped$/, /.ire$/, /.ise$/, /.ished$/, /.ite$/, /.ive$/, /.ize$/, /.obe$/, /.ode$/, /.oke$/, /.ole$/, /.ome$/, /.one$/, /.ope$/, /.oque$/, /.ore$/, /.ose$/, /.osque$/, /.osques$/, /.ote$/, /.ove$/, /.pped$/, /.sse$/, /.ssed$/, /.ste$/, /.ube$/, /.uce$/, /.ude$/, /.uge$/, /.uke$/, /.ule$/, /.ules$/, /.uled$/, /.ume$/, /.une$/, /.upe$/, /.ure$/, /.use$/, /.ushed$/, /.ute$/, /.ved$/, /.we$/, /.wes$/, /.wed$/, /.yse$/, /.yze$/, /.rse$/, /.red$/, /.rce$/, /.rde$/, /.ily$/, /.ely$/, /.des$/, /.gged$/, /.kes$/, /.ced$/, /.ked$/, /.med$/, /.mes$/, /.ned$/, /.sed$/, /.nce$/, /.rles$/, /.nes$/, /.pes$/, /.tes$/, /.res$/, /.ves$/, /ere$/</td>
137
+ </tr>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">ADDSYL</td>
140
+ <td>=</td>
141
+ <td class="context-item-value">[ /ia/, /riet/, /dien/, /ien/, /iet/, /iu/, /iest/, /io/, /ii/, /ily/, /.oala$/, /.iara$/, /.ying$/, /.earest/, /.arer/, /.aress/, /.eate$/, /.eation$/, /[aeiouym]bl$/, /[aeiou]{3}/, /^mc','ism/, /^mc','asm/, /([^aeiouy])\1l$/, /[^l]lien/, /^coa[dglx]./, /[^gq]ua[^auieo]/, /dnt$/</td>
142
+ </tr>
143
+ <tr class="top-aligned-row context-row">
144
+ <td class="context-item-name">EXCEPTIONS_ONE</td>
145
+ <td>=</td>
146
+ <td class="context-item-value">[ /abe/, /ace/, /ade/, /age/, /ale/, /are/, /use/, /ate/</td>
147
+ <td width="3em">&nbsp;</td>
148
+ <td class="context-item-desc">
149
+ UBER EXCEPTIONS - WHOLE WORDS THAT SLIP THROUGH THE NET OR SOMEHOW THROW A
150
+ WOBBLY
151
+
152
+ </td>
153
+ </tr>
154
+ </table>
155
+ </div>
156
+ </div>
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <!-- if method_list -->
164
+ <div id="methods">
165
+ <h3 class="section-bar">Public Class methods</h3>
166
+
167
+ <div id="method-M000008" class="method-detail">
168
+ <a name="M000008"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="Pronunciations.src/M000008.html" target="Code" class="method-signature"
172
+ onclick="popupCode('Pronunciations.src/M000008.html');return false;">
173
+ <span class="method-name">get_pronunciations</span><span class="method-args">(word)</span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ </div>
179
+ </div>
180
+
181
+ <div id="method-M000009" class="method-detail">
182
+ <a name="M000009"></a>
183
+
184
+ <div class="method-heading">
185
+ <a href="Pronunciations.src/M000009.html" target="Code" class="method-signature"
186
+ onclick="popupCode('Pronunciations.src/M000009.html');return false;">
187
+ <span class="method-name">get_rhymes</span><span class="method-args">(pronunciation)</span>
188
+ </a>
189
+ </div>
190
+
191
+ <div class="method-description">
192
+ <p>
193
+ Returns arrays of rhymes &#8212; an Array of rhymes for each pronunciation
194
+ </p>
195
+ </div>
196
+ </div>
197
+
198
+
199
+ </div>
200
+
201
+
202
+ </div>
203
+
204
+
205
+ <div id="validator-badges">
206
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
207
+ </div>
208
+
209
+ </body>
210
+ </html>
@@ -0,0 +1,29 @@
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>get_pronunciations (Phrase::Pronunciations)</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/ruby_rhymes.rb, line 78</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_pronunciations</span>(<span class="ruby-identifier">word</span>)
15
+ <span class="ruby-identifier">load</span>
16
+ <span class="ruby-identifier">pronunciations</span> = <span class="ruby-ivar">@@MULTIPLE_PRONUNCIATIONS</span>[<span class="ruby-identifier">word</span>]
17
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pronunciations</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># Multiple pronunciations case</span>
18
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pronunciations</span>
19
+ <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># Single or pronunciation case</span>
20
+ <span class="ruby-identifier">pronunciation</span> = <span class="ruby-identifier">get_pronunciation</span>(<span class="ruby-identifier">word</span>)
21
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pronunciation</span>
22
+ <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">pronunciation</span>]
23
+ <span class="ruby-keyword kw">else</span>
24
+ <span class="ruby-keyword kw">return</span> [<span class="ruby-constant">Pronunciation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">word</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">auto_syllables</span>(<span class="ruby-identifier">word</span>.<span class="ruby-identifier">downcase</span>), <span class="ruby-keyword kw">nil</span>)]
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-keyword kw">end</span>
27
+ <span class="ruby-keyword kw">end</span></pre>
28
+ </body>
29
+ </html>
@@ -0,0 +1,22 @@
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>get_rhymes (Phrase::Pronunciations)</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/ruby_rhymes.rb, line 94</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_rhymes</span>(<span class="ruby-identifier">pronunciation</span>)
15
+ <span class="ruby-identifier">load</span>
16
+ <span class="ruby-identifier">rhymes</span> = []
17
+ <span class="ruby-identifier">rhymes</span> = <span class="ruby-ivar">@@RHYMES</span>[<span class="ruby-identifier">pronunciation</span>.<span class="ruby-identifier">rhyme_key</span>]
18
+ <span class="ruby-identifier">rhymes</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">pronunciation</span>)
19
+ <span class="ruby-identifier">rhymes</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,137 @@
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>Class: String</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="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">String</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/ruby_rhymes_rb.html">
59
+ lib/ruby_rhymes.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000013">to_phrase</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Instance methods</h3>
110
+
111
+ <div id="method-M000013" class="method-detail">
112
+ <a name="M000013"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="String.src/M000013.html" target="Code" class="method-signature"
116
+ onclick="popupCode('String.src/M000013.html');return false;">
117
+ <span class="method-name">to_phrase</span><span class="method-args">()</span>
118
+ </a>
119
+ </div>
120
+
121
+ <div class="method-description">
122
+ </div>
123
+ </div>
124
+
125
+
126
+ </div>
127
+
128
+
129
+ </div>
130
+
131
+
132
+ <div id="validator-badges">
133
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
134
+ </div>
135
+
136
+ </body>
137
+ </html>