6c38303ef664984e141954aa5b9b78dc1bddb4f8
[porter2stemmer.git] / rdoc / classes / Porter2.html
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>Module: Porter2</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>Module</strong></td>
53 <td class="class-name-in-header">Porter2</td>
54 </tr>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
57 <td>
58 <a href="../files/lib/porter2stemmer/constants_rb.html">
59 lib/porter2stemmer/constants.rb
60 </a>
61 <br />
62 </td>
63 </tr>
64
65 </table>
66 </div>
67 <!-- banner header -->
68
69 <div id="bodyContent">
70
71
72
73 <div id="contextContent">
74
75 <div id="description">
76 <p>
77 Constants for the Porter 2 stemmer
78 </p>
79
80 </div>
81
82
83 </div>
84
85
86 </div>
87
88
89 <!-- if includes -->
90
91 <div id="section">
92
93
94 <div id="constants-list">
95 <h3 class="section-bar">Constants</h3>
96
97 <div class="name-list">
98 <table summary="Constants">
99 <tr class="top-aligned-row context-row">
100 <td class="context-item-name">C</td>
101 <td>=</td>
102 <td class="context-item-value">&quot;[^aeiouy]&quot;</td>
103 <td width="3em">&nbsp;</td>
104 <td class="context-item-desc">
105 A non-vowel
106
107 </td>
108 </tr>
109 <tr class="top-aligned-row context-row">
110 <td class="context-item-name">V</td>
111 <td>=</td>
112 <td class="context-item-value">&quot;[aeiouy]&quot;</td>
113 <td width="3em">&nbsp;</td>
114 <td class="context-item-desc">
115 A vowel: a e i o u y
116
117 </td>
118 </tr>
119 <tr class="top-aligned-row context-row">
120 <td class="context-item-name">CW</td>
121 <td>=</td>
122 <td class="context-item-value">&quot;[^aeiouywxY]&quot;</td>
123 <td width="3em">&nbsp;</td>
124 <td class="context-item-desc">
125 A non-vowel other than w, x, or Y
126
127 </td>
128 </tr>
129 <tr class="top-aligned-row context-row">
130 <td class="context-item-name">Double</td>
131 <td>=</td>
132 <td class="context-item-value">&quot;(bb|dd|ff|gg|mm|nn|pp|rr|tt)&quot;</td>
133 <td width="3em">&nbsp;</td>
134 <td class="context-item-desc">
135 Doubles created when adding a suffix: these are undoubled when stemmed
136
137 </td>
138 </tr>
139 <tr class="top-aligned-row context-row">
140 <td class="context-item-name">Valid_LI</td>
141 <td>=</td>
142 <td class="context-item-value">&quot;[cdeghkmnrt]&quot;</td>
143 <td width="3em">&nbsp;</td>
144 <td class="context-item-desc">
145 A valid letter that can come before &#8216;li&#8217; (or &#8216;ly&#8217;)
146
147 </td>
148 </tr>
149 <tr class="top-aligned-row context-row">
150 <td class="context-item-name">SHORT_SYLLABLE</td>
151 <td>=</td>
152 <td class="context-item-value">&quot;((#{C}#{V}#{CW})|(^#{V}#{C}))&quot;</td>
153 <td width="3em">&nbsp;</td>
154 <td class="context-item-desc">
155 A specification for a short syllable.
156
157 <p>
158 A short syllable in a word is either:
159 </p>
160 <ol>
161 <li>a vowel followed by a non-vowel other than w, x or Y and preceded by a
162 non-vowel, or
163
164 </li>
165 <li>a vowel at the beginning of the word followed by a non-vowel.
166
167 </li>
168 </ol>
169 <p>
170 (The original document is silent on whether sequences of two or more
171 non-vowels make a syllable long. But as this specification is only used to
172 find sequences of non-vowel - vowel - non-vowel - end-of-word, this
173 ambiguity does not have an effect.)
174 </p>
175 </td>
176 </tr>
177 <tr class="top-aligned-row context-row">
178 <td class="context-item-name">STEP_2_MAPS</td>
179 <td>=</td>
180 <td class="context-item-value">{&quot;tional&quot; =&gt; &quot;tion&quot;, &quot;enci&quot; =&gt; &quot;ence&quot;, &quot;anci&quot; =&gt; &quot;ance&quot;, &quot;abli&quot; =&gt; &quot;able&quot;, &quot;entli&quot; =&gt; &quot;ent&quot;, &quot;ization&quot; =&gt; &quot;ize&quot;, &quot;izer&quot; =&gt; &quot;ize&quot;, &quot;ational&quot; =&gt; &quot;ate&quot;, &quot;ation&quot; =&gt; &quot;ate&quot;, &quot;ator&quot; =&gt; &quot;ate&quot;, &quot;alism&quot; =&gt; &quot;al&quot;, &quot;aliti&quot; =&gt; &quot;al&quot;, &quot;alli&quot; =&gt; &quot;al&quot;, &quot;fulness&quot; =&gt; &quot;ful&quot;, &quot;ousli&quot; =&gt; &quot;ous&quot;, &quot;ousness&quot; =&gt; &quot;ous&quot;, &quot;iveness&quot; =&gt; &quot;ive&quot;, &quot;iviti&quot; =&gt; &quot;ive&quot;, &quot;biliti&quot; =&gt; &quot;ble&quot;, &quot;bli&quot; =&gt; &quot;ble&quot;, &quot;fulli&quot; =&gt; &quot;ful&quot;, &quot;lessli&quot; =&gt; &quot;less&quot; }</td>
181 <td width="3em">&nbsp;</td>
182 <td class="context-item-desc">
183 Suffix transformations used in porter2_step2. (ogi, li endings dealt with
184 in procedure)
185
186 </td>
187 </tr>
188 <tr class="top-aligned-row context-row">
189 <td class="context-item-name">STEP_3_MAPS</td>
190 <td>=</td>
191 <td class="context-item-value">{&quot;tional&quot; =&gt; &quot;tion&quot;, &quot;ational&quot; =&gt; &quot;ate&quot;, &quot;alize&quot; =&gt; &quot;al&quot;, &quot;icate&quot; =&gt; &quot;ic&quot;, &quot;iciti&quot; =&gt; &quot;ic&quot;, &quot;ical&quot; =&gt; &quot;ic&quot;, &quot;ful&quot; =&gt; &quot;&quot;, &quot;ness&quot; =&gt; &quot;&quot; }</td>
192 <td width="3em">&nbsp;</td>
193 <td class="context-item-desc">
194 Suffix transformations used in porter2_step3. (ative ending dealt with in
195 procedure)
196
197 </td>
198 </tr>
199 <tr class="top-aligned-row context-row">
200 <td class="context-item-name">STEP_4_MAPS</td>
201 <td>=</td>
202 <td class="context-item-value">{&quot;al&quot; =&gt; &quot;&quot;, &quot;ance&quot; =&gt; &quot;&quot;, &quot;ence&quot; =&gt; &quot;&quot;, &quot;er&quot; =&gt; &quot;&quot;, &quot;ic&quot; =&gt; &quot;&quot;, &quot;able&quot; =&gt; &quot;&quot;, &quot;ible&quot; =&gt; &quot;&quot;, &quot;ant&quot; =&gt; &quot;&quot;, &quot;ement&quot; =&gt; &quot;&quot;, &quot;ment&quot; =&gt; &quot;&quot;, &quot;ent&quot; =&gt; &quot;&quot;, &quot;ism&quot; =&gt; &quot;&quot;, &quot;ate&quot; =&gt; &quot;&quot;, &quot;iti&quot; =&gt; &quot;&quot;, &quot;ous&quot; =&gt; &quot;&quot;, &quot;ive&quot; =&gt; &quot;&quot;, &quot;ize&quot; =&gt; &quot;&quot; }</td>
203 <td width="3em">&nbsp;</td>
204 <td class="context-item-desc">
205 Suffix transformations used in porter2_step4. (ion ending dealt with in
206 procedure)
207
208 </td>
209 </tr>
210 <tr class="top-aligned-row context-row">
211 <td class="context-item-name">SPECIAL_CASES</td>
212 <td>=</td>
213 <td class="context-item-value">{&quot;skis&quot; =&gt; &quot;ski&quot;, &quot;skies&quot; =&gt; &quot;sky&quot;, &quot;dying&quot; =&gt; &quot;die&quot;, &quot;lying&quot; =&gt; &quot;lie&quot;, &quot;tying&quot; =&gt; &quot;tie&quot;, &quot;idly&quot; =&gt; &quot;idl&quot;, &quot;gently&quot; =&gt; &quot;gentl&quot;, &quot;ugly&quot; =&gt; &quot;ugli&quot;, &quot;early&quot; =&gt; &quot;earli&quot;, &quot;only&quot; =&gt; &quot;onli&quot;, &quot;singly&quot; =&gt;&quot;singl&quot;, &quot;sky&quot; =&gt; &quot;sky&quot;, &quot;news&quot; =&gt; &quot;news&quot;, &quot;howe&quot; =&gt; &quot;howe&quot;, &quot;atlas&quot; =&gt; &quot;atlas&quot;, &quot;cosmos&quot; =&gt; &quot;cosmos&quot;, &quot;bias&quot; =&gt; &quot;bias&quot;, &quot;andes&quot; =&gt; &quot;andes&quot; }</td>
214 <td width="3em">&nbsp;</td>
215 <td class="context-item-desc">
216 Special-case stemmings
217
218 </td>
219 </tr>
220 <tr class="top-aligned-row context-row">
221 <td class="context-item-name">STEP_1A_SPECIAL_CASES</td>
222 <td>=</td>
223 <td class="context-item-value">%w[ inning outing canning herring earring proceed exceed succeed ]</td>
224 <td width="3em">&nbsp;</td>
225 <td class="context-item-desc">
226 Special case words to stop processing after step 1a.
227
228 </td>
229 </tr>
230 </table>
231 </div>
232 </div>
233
234
235
236
237
238
239 <!-- if method_list -->
240
241
242 </div>
243
244
245 <div id="validator-badges">
246 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
247 </div>
248
249 </body>
250 </html>