1 // This file was generated automatically by the Snowball to Java compiler
3 package org
.tartarus
.snowball
.ext
;
4 import org
.tartarus
.snowball
.SnowballProgram
;
5 import org
.tartarus
.snowball
.Among
;
8 * Generated class implementing code defined by a snowball script.
10 public class spanishStemmer
extends SnowballProgram
{
12 private Among a_0
[] = {
13 new Among ( "", -1, 6, "", this),
14 new Among ( "\u00E1", 0, 1, "", this),
15 new Among ( "\u00E9", 0, 2, "", this),
16 new Among ( "\u00ED", 0, 3, "", this),
17 new Among ( "\u00F3", 0, 4, "", this),
18 new Among ( "\u00FA", 0, 5, "", this)
21 private Among a_1
[] = {
22 new Among ( "la", -1, -1, "", this),
23 new Among ( "sela", 0, -1, "", this),
24 new Among ( "le", -1, -1, "", this),
25 new Among ( "me", -1, -1, "", this),
26 new Among ( "se", -1, -1, "", this),
27 new Among ( "lo", -1, -1, "", this),
28 new Among ( "selo", 5, -1, "", this),
29 new Among ( "las", -1, -1, "", this),
30 new Among ( "selas", 7, -1, "", this),
31 new Among ( "les", -1, -1, "", this),
32 new Among ( "los", -1, -1, "", this),
33 new Among ( "selos", 10, -1, "", this),
34 new Among ( "nos", -1, -1, "", this)
37 private Among a_2
[] = {
38 new Among ( "ando", -1, 6, "", this),
39 new Among ( "iendo", -1, 6, "", this),
40 new Among ( "yendo", -1, 7, "", this),
41 new Among ( "\u00E1ndo", -1, 2, "", this),
42 new Among ( "i\u00E9ndo", -1, 1, "", this),
43 new Among ( "ar", -1, 6, "", this),
44 new Among ( "er", -1, 6, "", this),
45 new Among ( "ir", -1, 6, "", this),
46 new Among ( "\u00E1r", -1, 3, "", this),
47 new Among ( "\u00E9r", -1, 4, "", this),
48 new Among ( "\u00EDr", -1, 5, "", this)
51 private Among a_3
[] = {
52 new Among ( "ic", -1, -1, "", this),
53 new Among ( "ad", -1, -1, "", this),
54 new Among ( "os", -1, -1, "", this),
55 new Among ( "iv", -1, 1, "", this)
58 private Among a_4
[] = {
59 new Among ( "able", -1, 1, "", this),
60 new Among ( "ible", -1, 1, "", this),
61 new Among ( "ante", -1, 1, "", this)
64 private Among a_5
[] = {
65 new Among ( "ic", -1, 1, "", this),
66 new Among ( "abil", -1, 1, "", this),
67 new Among ( "iv", -1, 1, "", this)
70 private Among a_6
[] = {
71 new Among ( "ica", -1, 1, "", this),
72 new Among ( "ancia", -1, 2, "", this),
73 new Among ( "encia", -1, 5, "", this),
74 new Among ( "adora", -1, 2, "", this),
75 new Among ( "osa", -1, 1, "", this),
76 new Among ( "ista", -1, 1, "", this),
77 new Among ( "iva", -1, 9, "", this),
78 new Among ( "anza", -1, 1, "", this),
79 new Among ( "log\u00EDa", -1, 3, "", this),
80 new Among ( "idad", -1, 8, "", this),
81 new Among ( "able", -1, 1, "", this),
82 new Among ( "ible", -1, 1, "", this),
83 new Among ( "ante", -1, 2, "", this),
84 new Among ( "mente", -1, 7, "", this),
85 new Among ( "amente", 13, 6, "", this),
86 new Among ( "aci\u00F3n", -1, 2, "", this),
87 new Among ( "uci\u00F3n", -1, 4, "", this),
88 new Among ( "ico", -1, 1, "", this),
89 new Among ( "ismo", -1, 1, "", this),
90 new Among ( "oso", -1, 1, "", this),
91 new Among ( "amiento", -1, 1, "", this),
92 new Among ( "imiento", -1, 1, "", this),
93 new Among ( "ivo", -1, 9, "", this),
94 new Among ( "ador", -1, 2, "", this),
95 new Among ( "icas", -1, 1, "", this),
96 new Among ( "ancias", -1, 2, "", this),
97 new Among ( "encias", -1, 5, "", this),
98 new Among ( "adoras", -1, 2, "", this),
99 new Among ( "osas", -1, 1, "", this),
100 new Among ( "istas", -1, 1, "", this),
101 new Among ( "ivas", -1, 9, "", this),
102 new Among ( "anzas", -1, 1, "", this),
103 new Among ( "log\u00EDas", -1, 3, "", this),
104 new Among ( "idades", -1, 8, "", this),
105 new Among ( "ables", -1, 1, "", this),
106 new Among ( "ibles", -1, 1, "", this),
107 new Among ( "aciones", -1, 2, "", this),
108 new Among ( "uciones", -1, 4, "", this),
109 new Among ( "adores", -1, 2, "", this),
110 new Among ( "antes", -1, 2, "", this),
111 new Among ( "icos", -1, 1, "", this),
112 new Among ( "ismos", -1, 1, "", this),
113 new Among ( "osos", -1, 1, "", this),
114 new Among ( "amientos", -1, 1, "", this),
115 new Among ( "imientos", -1, 1, "", this),
116 new Among ( "ivos", -1, 9, "", this)
119 private Among a_7
[] = {
120 new Among ( "ya", -1, 1, "", this),
121 new Among ( "ye", -1, 1, "", this),
122 new Among ( "yan", -1, 1, "", this),
123 new Among ( "yen", -1, 1, "", this),
124 new Among ( "yeron", -1, 1, "", this),
125 new Among ( "yendo", -1, 1, "", this),
126 new Among ( "yo", -1, 1, "", this),
127 new Among ( "yas", -1, 1, "", this),
128 new Among ( "yes", -1, 1, "", this),
129 new Among ( "yais", -1, 1, "", this),
130 new Among ( "yamos", -1, 1, "", this),
131 new Among ( "y\u00F3", -1, 1, "", this)
134 private Among a_8
[] = {
135 new Among ( "aba", -1, 2, "", this),
136 new Among ( "ada", -1, 2, "", this),
137 new Among ( "ida", -1, 2, "", this),
138 new Among ( "ara", -1, 2, "", this),
139 new Among ( "iera", -1, 2, "", this),
140 new Among ( "\u00EDa", -1, 2, "", this),
141 new Among ( "ar\u00EDa", 5, 2, "", this),
142 new Among ( "er\u00EDa", 5, 2, "", this),
143 new Among ( "ir\u00EDa", 5, 2, "", this),
144 new Among ( "ad", -1, 2, "", this),
145 new Among ( "ed", -1, 2, "", this),
146 new Among ( "id", -1, 2, "", this),
147 new Among ( "ase", -1, 2, "", this),
148 new Among ( "iese", -1, 2, "", this),
149 new Among ( "aste", -1, 2, "", this),
150 new Among ( "iste", -1, 2, "", this),
151 new Among ( "an", -1, 2, "", this),
152 new Among ( "aban", 16, 2, "", this),
153 new Among ( "aran", 16, 2, "", this),
154 new Among ( "ieran", 16, 2, "", this),
155 new Among ( "\u00EDan", 16, 2, "", this),
156 new Among ( "ar\u00EDan", 20, 2, "", this),
157 new Among ( "er\u00EDan", 20, 2, "", this),
158 new Among ( "ir\u00EDan", 20, 2, "", this),
159 new Among ( "en", -1, 1, "", this),
160 new Among ( "asen", 24, 2, "", this),
161 new Among ( "iesen", 24, 2, "", this),
162 new Among ( "aron", -1, 2, "", this),
163 new Among ( "ieron", -1, 2, "", this),
164 new Among ( "ar\u00E1n", -1, 2, "", this),
165 new Among ( "er\u00E1n", -1, 2, "", this),
166 new Among ( "ir\u00E1n", -1, 2, "", this),
167 new Among ( "ado", -1, 2, "", this),
168 new Among ( "ido", -1, 2, "", this),
169 new Among ( "ando", -1, 2, "", this),
170 new Among ( "iendo", -1, 2, "", this),
171 new Among ( "ar", -1, 2, "", this),
172 new Among ( "er", -1, 2, "", this),
173 new Among ( "ir", -1, 2, "", this),
174 new Among ( "as", -1, 2, "", this),
175 new Among ( "abas", 39, 2, "", this),
176 new Among ( "adas", 39, 2, "", this),
177 new Among ( "idas", 39, 2, "", this),
178 new Among ( "aras", 39, 2, "", this),
179 new Among ( "ieras", 39, 2, "", this),
180 new Among ( "\u00EDas", 39, 2, "", this),
181 new Among ( "ar\u00EDas", 45, 2, "", this),
182 new Among ( "er\u00EDas", 45, 2, "", this),
183 new Among ( "ir\u00EDas", 45, 2, "", this),
184 new Among ( "es", -1, 1, "", this),
185 new Among ( "ases", 49, 2, "", this),
186 new Among ( "ieses", 49, 2, "", this),
187 new Among ( "abais", -1, 2, "", this),
188 new Among ( "arais", -1, 2, "", this),
189 new Among ( "ierais", -1, 2, "", this),
190 new Among ( "\u00EDais", -1, 2, "", this),
191 new Among ( "ar\u00EDais", 55, 2, "", this),
192 new Among ( "er\u00EDais", 55, 2, "", this),
193 new Among ( "ir\u00EDais", 55, 2, "", this),
194 new Among ( "aseis", -1, 2, "", this),
195 new Among ( "ieseis", -1, 2, "", this),
196 new Among ( "asteis", -1, 2, "", this),
197 new Among ( "isteis", -1, 2, "", this),
198 new Among ( "\u00E1is", -1, 2, "", this),
199 new Among ( "\u00E9is", -1, 1, "", this),
200 new Among ( "ar\u00E9is", 64, 2, "", this),
201 new Among ( "er\u00E9is", 64, 2, "", this),
202 new Among ( "ir\u00E9is", 64, 2, "", this),
203 new Among ( "ados", -1, 2, "", this),
204 new Among ( "idos", -1, 2, "", this),
205 new Among ( "amos", -1, 2, "", this),
206 new Among ( "\u00E1bamos", 70, 2, "", this),
207 new Among ( "\u00E1ramos", 70, 2, "", this),
208 new Among ( "i\u00E9ramos", 70, 2, "", this),
209 new Among ( "\u00EDamos", 70, 2, "", this),
210 new Among ( "ar\u00EDamos", 74, 2, "", this),
211 new Among ( "er\u00EDamos", 74, 2, "", this),
212 new Among ( "ir\u00EDamos", 74, 2, "", this),
213 new Among ( "emos", -1, 1, "", this),
214 new Among ( "aremos", 78, 2, "", this),
215 new Among ( "eremos", 78, 2, "", this),
216 new Among ( "iremos", 78, 2, "", this),
217 new Among ( "\u00E1semos", 78, 2, "", this),
218 new Among ( "i\u00E9semos", 78, 2, "", this),
219 new Among ( "imos", -1, 2, "", this),
220 new Among ( "ar\u00E1s", -1, 2, "", this),
221 new Among ( "er\u00E1s", -1, 2, "", this),
222 new Among ( "ir\u00E1s", -1, 2, "", this),
223 new Among ( "\u00EDs", -1, 2, "", this),
224 new Among ( "ar\u00E1", -1, 2, "", this),
225 new Among ( "er\u00E1", -1, 2, "", this),
226 new Among ( "ir\u00E1", -1, 2, "", this),
227 new Among ( "ar\u00E9", -1, 2, "", this),
228 new Among ( "er\u00E9", -1, 2, "", this),
229 new Among ( "ir\u00E9", -1, 2, "", this),
230 new Among ( "i\u00F3", -1, 2, "", this)
233 private Among a_9
[] = {
234 new Among ( "a", -1, 1, "", this),
235 new Among ( "e", -1, 2, "", this),
236 new Among ( "o", -1, 1, "", this),
237 new Among ( "os", -1, 1, "", this),
238 new Among ( "\u00E1", -1, 1, "", this),
239 new Among ( "\u00E9", -1, 2, "", this),
240 new Among ( "\u00ED", -1, 1, "", this),
241 new Among ( "\u00F3", -1, 1, "", this)
244 private static final char g_v
[] = {17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10 };
250 private void copy_from(spanishStemmer other
) {
254 super.copy_from(other
);
257 private boolean r_mark_regions() {
276 if (!(in_grouping(g_v
, 97, 252)))
285 if (!(out_grouping(g_v
, 97, 252)))
293 if (!(in_grouping(g_v
, 97, 252)))
309 if (!(in_grouping(g_v
, 97, 252)))
317 if (!(out_grouping(g_v
, 97, 252)))
334 if (!(out_grouping(g_v
, 97, 252)))
343 if (!(out_grouping(g_v
, 97, 252)))
351 if (!(in_grouping(g_v
, 97, 252)))
367 if (!(in_grouping(g_v
, 97, 252)))
379 // setmark pV, line 41
391 if (!(in_grouping(g_v
, 97, 252)))
407 if (!(out_grouping(g_v
, 97, 252)))
419 // setmark p1, line 44
425 if (!(in_grouping(g_v
, 97, 252)))
441 if (!(out_grouping(g_v
, 97, 252)))
453 // setmark p2, line 45
460 private boolean r_postlude() {
471 // substring, line 50
472 among_var
= find_among(a_0
, 6);
525 private boolean r_RV() {
526 if (!(I_pV
<= cursor
))
533 private boolean r_R1() {
534 if (!(I_p1
<= cursor
))
541 private boolean r_R2() {
542 if (!(I_p2
<= cursor
))
549 private boolean r_attached_pronoun() {
554 // substring, line 68
555 if (find_among_b(a_1
, 13) == 0)
561 // substring, line 72
562 among_var
= find_among_b(a_2
, 11);
618 if (!(eq_s_b(1, "u")))
629 private boolean r_standard_suffix() {
639 // substring, line 87
640 among_var
= find_among_b(a_6
, 46);
670 v_1
= limit
- cursor
;
676 if (!(eq_s_b(2, "ic")))
678 cursor
= limit
- v_1
;
686 cursor
= limit
- v_1
;
733 v_2
= limit
- cursor
;
738 // substring, line 125
739 among_var
= find_among_b(a_3
, 4);
742 cursor
= limit
- v_2
;
750 cursor
= limit
- v_2
;
757 cursor
= limit
- v_2
;
764 if (!(eq_s_b(2, "at")))
766 cursor
= limit
- v_2
;
774 cursor
= limit
- v_2
;
793 v_3
= limit
- cursor
;
798 // substring, line 137
799 among_var
= find_among_b(a_4
, 3);
802 cursor
= limit
- v_3
;
809 cursor
= limit
- v_3
;
816 cursor
= limit
- v_3
;
835 v_4
= limit
- cursor
;
840 // substring, line 149
841 among_var
= find_among_b(a_5
, 3);
844 cursor
= limit
- v_4
;
851 cursor
= limit
- v_4
;
858 cursor
= limit
- v_4
;
877 v_5
= limit
- cursor
;
883 if (!(eq_s_b(2, "at")))
885 cursor
= limit
- v_5
;
893 cursor
= limit
- v_5
;
904 private boolean r_y_verb_suffix() {
909 // setlimit, line 168
910 v_1
= limit
- cursor
;
917 v_2
= limit_backward
;
918 limit_backward
= cursor
;
919 cursor
= limit
- v_1
;
923 // substring, line 168
924 among_var
= find_among_b(a_7
, 12);
927 limit_backward
= v_2
;
932 limit_backward
= v_2
;
939 if (!(eq_s_b(1, "u")))
950 private boolean r_verb_suffix() {
957 // setlimit, line 176
958 v_1
= limit
- cursor
;
965 v_2
= limit_backward
;
966 limit_backward
= cursor
;
967 cursor
= limit
- v_1
;
971 // substring, line 176
972 among_var
= find_among_b(a_8
, 96);
975 limit_backward
= v_2
;
980 limit_backward
= v_2
;
987 v_3
= limit
- cursor
;
991 if (!(eq_s_b(1, "u")))
993 cursor
= limit
- v_3
;
997 v_4
= limit
- cursor
;
999 if (!(eq_s_b(1, "g")))
1001 cursor
= limit
- v_3
;
1004 cursor
= limit
- v_4
;
1020 private boolean r_residual_suffix() {
1027 // substring, line 205
1028 among_var
= find_among_b(a_9
, 8);
1040 // call RV, line 208
1050 // call RV, line 210
1058 v_1
= limit
- cursor
;
1063 // literal, line 210
1064 if (!(eq_s_b(1, "u")))
1066 cursor
= limit
- v_1
;
1072 v_2
= limit
- cursor
;
1073 // literal, line 210
1074 if (!(eq_s_b(1, "g")))
1076 cursor
= limit
- v_1
;
1079 cursor
= limit
- v_2
;
1080 // call RV, line 210
1083 cursor
= limit
- v_1
;
1094 public boolean stem() {
1105 // call mark_regions, line 216
1106 if (!r_mark_regions())
1112 // backwards, line 217
1113 limit_backward
= cursor
; cursor
= limit
;
1116 v_2
= limit
- cursor
;
1118 // call attached_pronoun, line 218
1119 if (!r_attached_pronoun())
1124 cursor
= limit
- v_2
;
1126 v_3
= limit
- cursor
;
1131 v_4
= limit
- cursor
;
1133 // call standard_suffix, line 219
1134 if (!r_standard_suffix())
1140 cursor
= limit
- v_4
;
1142 // call y_verb_suffix, line 220
1143 if (!r_y_verb_suffix())
1149 cursor
= limit
- v_4
;
1150 // call verb_suffix, line 221
1151 if (!r_verb_suffix())
1157 cursor
= limit
- v_3
;
1159 v_5
= limit
- cursor
;
1161 // call residual_suffix, line 223
1162 if (!r_residual_suffix())
1167 cursor
= limit
- v_5
;
1168 cursor
= limit_backward
; // do, line 225
1171 // call postlude, line 225