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 portugueseStemmer
extends SnowballProgram
{
12 private Among a_0
[] = {
13 new Among ( "", -1, 3, "", this),
14 new Among ( "\u00E3", 0, 1, "", this),
15 new Among ( "\u00F5", 0, 2, "", this)
18 private Among a_1
[] = {
19 new Among ( "", -1, 3, "", this),
20 new Among ( "a~", 0, 1, "", this),
21 new Among ( "o~", 0, 2, "", this)
24 private Among a_2
[] = {
25 new Among ( "ic", -1, -1, "", this),
26 new Among ( "ad", -1, -1, "", this),
27 new Among ( "os", -1, -1, "", this),
28 new Among ( "iv", -1, 1, "", this)
31 private Among a_3
[] = {
32 new Among ( "ante", -1, 1, "", this),
33 new Among ( "avel", -1, 1, "", this),
34 new Among ( "\u00EDvel", -1, 1, "", this)
37 private Among a_4
[] = {
38 new Among ( "ic", -1, 1, "", this),
39 new Among ( "abil", -1, 1, "", this),
40 new Among ( "iv", -1, 1, "", this)
43 private Among a_5
[] = {
44 new Among ( "ica", -1, 1, "", this),
45 new Among ( "\u00E2ncia", -1, 1, "", this),
46 new Among ( "\u00EAncia", -1, 4, "", this),
47 new Among ( "ira", -1, 9, "", this),
48 new Among ( "adora", -1, 1, "", this),
49 new Among ( "osa", -1, 1, "", this),
50 new Among ( "ista", -1, 1, "", this),
51 new Among ( "iva", -1, 8, "", this),
52 new Among ( "eza", -1, 1, "", this),
53 new Among ( "log\u00EDa", -1, 2, "", this),
54 new Among ( "idade", -1, 7, "", this),
55 new Among ( "ante", -1, 1, "", this),
56 new Among ( "mente", -1, 6, "", this),
57 new Among ( "amente", 12, 5, "", this),
58 new Among ( "\u00E1vel", -1, 1, "", this),
59 new Among ( "\u00EDvel", -1, 1, "", this),
60 new Among ( "uci\u00F3n", -1, 3, "", this),
61 new Among ( "ico", -1, 1, "", this),
62 new Among ( "ismo", -1, 1, "", this),
63 new Among ( "oso", -1, 1, "", this),
64 new Among ( "amento", -1, 1, "", this),
65 new Among ( "imento", -1, 1, "", this),
66 new Among ( "ivo", -1, 8, "", this),
67 new Among ( "a\u00E7a~o", -1, 1, "", this),
68 new Among ( "ador", -1, 1, "", this),
69 new Among ( "icas", -1, 1, "", this),
70 new Among ( "\u00EAncias", -1, 4, "", this),
71 new Among ( "iras", -1, 9, "", this),
72 new Among ( "adoras", -1, 1, "", this),
73 new Among ( "osas", -1, 1, "", this),
74 new Among ( "istas", -1, 1, "", this),
75 new Among ( "ivas", -1, 8, "", this),
76 new Among ( "ezas", -1, 1, "", this),
77 new Among ( "log\u00EDas", -1, 2, "", this),
78 new Among ( "idades", -1, 7, "", this),
79 new Among ( "uciones", -1, 3, "", this),
80 new Among ( "adores", -1, 1, "", this),
81 new Among ( "antes", -1, 1, "", this),
82 new Among ( "a\u00E7o~es", -1, 1, "", this),
83 new Among ( "icos", -1, 1, "", this),
84 new Among ( "ismos", -1, 1, "", this),
85 new Among ( "osos", -1, 1, "", this),
86 new Among ( "amentos", -1, 1, "", this),
87 new Among ( "imentos", -1, 1, "", this),
88 new Among ( "ivos", -1, 8, "", this)
91 private Among a_6
[] = {
92 new Among ( "ada", -1, 1, "", this),
93 new Among ( "ida", -1, 1, "", this),
94 new Among ( "ia", -1, 1, "", this),
95 new Among ( "aria", 2, 1, "", this),
96 new Among ( "eria", 2, 1, "", this),
97 new Among ( "iria", 2, 1, "", this),
98 new Among ( "ara", -1, 1, "", this),
99 new Among ( "era", -1, 1, "", this),
100 new Among ( "ira", -1, 1, "", this),
101 new Among ( "ava", -1, 1, "", this),
102 new Among ( "asse", -1, 1, "", this),
103 new Among ( "esse", -1, 1, "", this),
104 new Among ( "isse", -1, 1, "", this),
105 new Among ( "aste", -1, 1, "", this),
106 new Among ( "este", -1, 1, "", this),
107 new Among ( "iste", -1, 1, "", this),
108 new Among ( "ei", -1, 1, "", this),
109 new Among ( "arei", 16, 1, "", this),
110 new Among ( "erei", 16, 1, "", this),
111 new Among ( "irei", 16, 1, "", this),
112 new Among ( "am", -1, 1, "", this),
113 new Among ( "iam", 20, 1, "", this),
114 new Among ( "ariam", 21, 1, "", this),
115 new Among ( "eriam", 21, 1, "", this),
116 new Among ( "iriam", 21, 1, "", this),
117 new Among ( "aram", 20, 1, "", this),
118 new Among ( "eram", 20, 1, "", this),
119 new Among ( "iram", 20, 1, "", this),
120 new Among ( "avam", 20, 1, "", this),
121 new Among ( "em", -1, 1, "", this),
122 new Among ( "arem", 29, 1, "", this),
123 new Among ( "erem", 29, 1, "", this),
124 new Among ( "irem", 29, 1, "", this),
125 new Among ( "assem", 29, 1, "", this),
126 new Among ( "essem", 29, 1, "", this),
127 new Among ( "issem", 29, 1, "", this),
128 new Among ( "ado", -1, 1, "", this),
129 new Among ( "ido", -1, 1, "", this),
130 new Among ( "ando", -1, 1, "", this),
131 new Among ( "endo", -1, 1, "", this),
132 new Among ( "indo", -1, 1, "", this),
133 new Among ( "ara~o", -1, 1, "", this),
134 new Among ( "era~o", -1, 1, "", this),
135 new Among ( "ira~o", -1, 1, "", this),
136 new Among ( "ar", -1, 1, "", this),
137 new Among ( "er", -1, 1, "", this),
138 new Among ( "ir", -1, 1, "", this),
139 new Among ( "as", -1, 1, "", this),
140 new Among ( "adas", 47, 1, "", this),
141 new Among ( "idas", 47, 1, "", this),
142 new Among ( "ias", 47, 1, "", this),
143 new Among ( "arias", 50, 1, "", this),
144 new Among ( "erias", 50, 1, "", this),
145 new Among ( "irias", 50, 1, "", this),
146 new Among ( "aras", 47, 1, "", this),
147 new Among ( "eras", 47, 1, "", this),
148 new Among ( "iras", 47, 1, "", this),
149 new Among ( "avas", 47, 1, "", this),
150 new Among ( "es", -1, 1, "", this),
151 new Among ( "ardes", 58, 1, "", this),
152 new Among ( "erdes", 58, 1, "", this),
153 new Among ( "irdes", 58, 1, "", this),
154 new Among ( "ares", 58, 1, "", this),
155 new Among ( "eres", 58, 1, "", this),
156 new Among ( "ires", 58, 1, "", this),
157 new Among ( "asses", 58, 1, "", this),
158 new Among ( "esses", 58, 1, "", this),
159 new Among ( "isses", 58, 1, "", this),
160 new Among ( "astes", 58, 1, "", this),
161 new Among ( "estes", 58, 1, "", this),
162 new Among ( "istes", 58, 1, "", this),
163 new Among ( "is", -1, 1, "", this),
164 new Among ( "ais", 71, 1, "", this),
165 new Among ( "eis", 71, 1, "", this),
166 new Among ( "areis", 73, 1, "", this),
167 new Among ( "ereis", 73, 1, "", this),
168 new Among ( "ireis", 73, 1, "", this),
169 new Among ( "\u00E1reis", 73, 1, "", this),
170 new Among ( "\u00E9reis", 73, 1, "", this),
171 new Among ( "\u00EDreis", 73, 1, "", this),
172 new Among ( "\u00E1sseis", 73, 1, "", this),
173 new Among ( "\u00E9sseis", 73, 1, "", this),
174 new Among ( "\u00EDsseis", 73, 1, "", this),
175 new Among ( "\u00E1veis", 73, 1, "", this),
176 new Among ( "\u00EDeis", 73, 1, "", this),
177 new Among ( "ar\u00EDeis", 84, 1, "", this),
178 new Among ( "er\u00EDeis", 84, 1, "", this),
179 new Among ( "ir\u00EDeis", 84, 1, "", this),
180 new Among ( "ados", -1, 1, "", this),
181 new Among ( "idos", -1, 1, "", this),
182 new Among ( "amos", -1, 1, "", this),
183 new Among ( "\u00E1ramos", 90, 1, "", this),
184 new Among ( "\u00E9ramos", 90, 1, "", this),
185 new Among ( "\u00EDramos", 90, 1, "", this),
186 new Among ( "\u00E1vamos", 90, 1, "", this),
187 new Among ( "\u00EDamos", 90, 1, "", this),
188 new Among ( "ar\u00EDamos", 95, 1, "", this),
189 new Among ( "er\u00EDamos", 95, 1, "", this),
190 new Among ( "ir\u00EDamos", 95, 1, "", this),
191 new Among ( "emos", -1, 1, "", this),
192 new Among ( "aremos", 99, 1, "", this),
193 new Among ( "eremos", 99, 1, "", this),
194 new Among ( "iremos", 99, 1, "", this),
195 new Among ( "\u00E1ssemos", 99, 1, "", this),
196 new Among ( "\u00EAssemos", 99, 1, "", this),
197 new Among ( "\u00EDssemos", 99, 1, "", this),
198 new Among ( "imos", -1, 1, "", this),
199 new Among ( "armos", -1, 1, "", this),
200 new Among ( "ermos", -1, 1, "", this),
201 new Among ( "irmos", -1, 1, "", this),
202 new Among ( "\u00E1mos", -1, 1, "", this),
203 new Among ( "ar\u00E1s", -1, 1, "", this),
204 new Among ( "er\u00E1s", -1, 1, "", this),
205 new Among ( "ir\u00E1s", -1, 1, "", this),
206 new Among ( "eu", -1, 1, "", this),
207 new Among ( "iu", -1, 1, "", this),
208 new Among ( "ou", -1, 1, "", this),
209 new Among ( "ar\u00E1", -1, 1, "", this),
210 new Among ( "er\u00E1", -1, 1, "", this),
211 new Among ( "ir\u00E1", -1, 1, "", this)
214 private Among a_7
[] = {
215 new Among ( "a", -1, 1, "", this),
216 new Among ( "i", -1, 1, "", this),
217 new Among ( "o", -1, 1, "", this),
218 new Among ( "os", -1, 1, "", this),
219 new Among ( "\u00E1", -1, 1, "", this),
220 new Among ( "\u00ED", -1, 1, "", this),
221 new Among ( "\u00F3", -1, 1, "", this)
224 private Among a_8
[] = {
225 new Among ( "e", -1, 1, "", this),
226 new Among ( "\u00E7", -1, 2, "", this),
227 new Among ( "\u00E9", -1, 1, "", this),
228 new Among ( "\u00EA", -1, 1, "", this)
231 private static final char g_v
[] = {17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2 };
237 private void copy_from(portugueseStemmer other
) {
241 super.copy_from(other
);
244 private boolean r_prelude() {
255 // substring, line 37
256 among_var
= find_among(a_0
, 3);
294 private boolean r_mark_regions() {
313 if (!(in_grouping(g_v
, 97, 250)))
322 if (!(out_grouping(g_v
, 97, 250)))
330 if (!(in_grouping(g_v
, 97, 250)))
346 if (!(in_grouping(g_v
, 97, 250)))
354 if (!(out_grouping(g_v
, 97, 250)))
371 if (!(out_grouping(g_v
, 97, 250)))
380 if (!(out_grouping(g_v
, 97, 250)))
388 if (!(in_grouping(g_v
, 97, 250)))
404 if (!(in_grouping(g_v
, 97, 250)))
416 // setmark pV, line 54
428 if (!(in_grouping(g_v
, 97, 250)))
444 if (!(out_grouping(g_v
, 97, 250)))
456 // setmark p1, line 57
462 if (!(in_grouping(g_v
, 97, 250)))
478 if (!(out_grouping(g_v
, 97, 250)))
490 // setmark p2, line 58
497 private boolean r_postlude() {
508 // substring, line 63
509 among_var
= find_among(a_1
, 3);
522 slice_from("\u00E3");
527 slice_from("\u00F5");
547 private boolean r_RV() {
548 if (!(I_pV
<= cursor
))
555 private boolean r_R1() {
556 if (!(I_p1
<= cursor
))
563 private boolean r_R2() {
564 if (!(I_p2
<= cursor
))
571 private boolean r_standard_suffix() {
580 // substring, line 77
581 among_var
= find_among_b(a_5
, 45);
641 v_1
= limit
- cursor
;
646 // substring, line 112
647 among_var
= find_among_b(a_2
, 4);
650 cursor
= limit
- v_1
;
658 cursor
= limit
- v_1
;
665 cursor
= limit
- v_1
;
672 if (!(eq_s_b(2, "at")))
674 cursor
= limit
- v_1
;
682 cursor
= limit
- v_1
;
701 v_2
= limit
- cursor
;
706 // substring, line 124
707 among_var
= find_among_b(a_3
, 3);
710 cursor
= limit
- v_2
;
717 cursor
= limit
- v_2
;
724 cursor
= limit
- v_2
;
743 v_3
= limit
- cursor
;
748 // substring, line 136
749 among_var
= find_among_b(a_4
, 3);
752 cursor
= limit
- v_3
;
759 cursor
= limit
- v_3
;
766 cursor
= limit
- v_3
;
785 v_4
= limit
- cursor
;
791 if (!(eq_s_b(2, "at")))
793 cursor
= limit
- v_4
;
801 cursor
= limit
- v_4
;
816 if (!(eq_s_b(1, "e")))
827 private boolean r_verb_suffix() {
831 // setlimit, line 159
832 v_1
= limit
- cursor
;
839 v_2
= limit_backward
;
840 limit_backward
= cursor
;
841 cursor
= limit
- v_1
;
845 // substring, line 160
846 among_var
= find_among_b(a_6
, 120);
849 limit_backward
= v_2
;
856 limit_backward
= v_2
;
864 limit_backward
= v_2
;
868 private boolean r_residual_suffix() {
873 // substring, line 184
874 among_var
= find_among_b(a_7
, 7);
898 private boolean r_residual_form() {
906 // substring, line 192
907 among_var
= find_among_b(a_8
, 4);
930 v_1
= limit
- cursor
;
934 if (!(eq_s_b(1, "u")))
941 v_2
= limit
- cursor
;
943 if (!(eq_s_b(1, "g")))
947 cursor
= limit
- v_2
;
950 cursor
= limit
- v_1
;
953 if (!(eq_s_b(1, "i")))
960 v_3
= limit
- cursor
;
962 if (!(eq_s_b(1, "c")))
966 cursor
= limit
- v_3
;
985 public boolean stem() {
1000 // call prelude, line 202
1010 // call mark_regions, line 203
1011 if (!r_mark_regions())
1017 // backwards, line 204
1018 limit_backward
= cursor
; cursor
= limit
;
1021 v_3
= limit
- cursor
;
1026 v_4
= limit
- cursor
;
1030 v_5
= limit
- cursor
;
1034 v_6
= limit
- cursor
;
1036 // call standard_suffix, line 206
1037 if (!r_standard_suffix())
1043 cursor
= limit
- v_6
;
1044 // call verb_suffix, line 206
1045 if (!r_verb_suffix())
1050 cursor
= limit
- v_5
;
1052 v_7
= limit
- cursor
;
1057 // literal, line 207
1058 if (!(eq_s_b(1, "i")))
1065 v_8
= limit
- cursor
;
1066 // literal, line 207
1067 if (!(eq_s_b(1, "c")))
1071 cursor
= limit
- v_8
;
1072 // call RV, line 207
1080 cursor
= limit
- v_7
;
1083 cursor
= limit
- v_4
;
1084 // call residual_suffix, line 209
1085 if (!r_residual_suffix())
1091 cursor
= limit
- v_3
;
1093 v_9
= limit
- cursor
;
1095 // call residual_form, line 211
1096 if (!r_residual_form())
1101 cursor
= limit
- v_9
;
1102 cursor
= limit_backward
; // do, line 213
1105 // call postlude, line 213