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 EnglishStemmer extends SnowballProgram {
12 private Among a_0[] = {
13 new Among ( "arsen", -1, -1, "", this),
14 new Among ( "commun", -1, -1, "", this),
15 new Among ( "gener", -1, -1, "", this)
18 private Among a_1[] = {
19 new Among ( "'", -1, 1, "", this),
20 new Among ( "'s'", 0, 1, "", this),
21 new Among ( "'s", -1, 1, "", this)
24 private Among a_2[] = {
25 new Among ( "ied", -1, 2, "", this),
26 new Among ( "s", -1, 3, "", this),
27 new Among ( "ies", 1, 2, "", this),
28 new Among ( "sses", 1, 1, "", this),
29 new Among ( "ss", 1, -1, "", this),
30 new Among ( "us", 1, -1, "", this)
33 private Among a_3[] = {
34 new Among ( "", -1, 3, "", this),
35 new Among ( "bb", 0, 2, "", this),
36 new Among ( "dd", 0, 2, "", this),
37 new Among ( "ff", 0, 2, "", this),
38 new Among ( "gg", 0, 2, "", this),
39 new Among ( "bl", 0, 1, "", this),
40 new Among ( "mm", 0, 2, "", this),
41 new Among ( "nn", 0, 2, "", this),
42 new Among ( "pp", 0, 2, "", this),
43 new Among ( "rr", 0, 2, "", this),
44 new Among ( "at", 0, 1, "", this),
45 new Among ( "tt", 0, 2, "", this),
46 new Among ( "iz", 0, 1, "", this)
49 private Among a_4[] = {
50 new Among ( "ed", -1, 2, "", this),
51 new Among ( "eed", 0, 1, "", this),
52 new Among ( "ing", -1, 2, "", this),
53 new Among ( "edly", -1, 2, "", this),
54 new Among ( "eedly", 3, 1, "", this),
55 new Among ( "ingly", -1, 2, "", this)
58 private Among a_5[] = {
59 new Among ( "anci", -1, 3, "", this),
60 new Among ( "enci", -1, 2, "", this),
61 new Among ( "ogi", -1, 13, "", this),
62 new Among ( "li", -1, 16, "", this),
63 new Among ( "bli", 3, 12, "", this),
64 new Among ( "abli", 4, 4, "", this),
65 new Among ( "alli", 3, 8, "", this),
66 new Among ( "fulli", 3, 14, "", this),
67 new Among ( "lessli", 3, 15, "", this),
68 new Among ( "ousli", 3, 10, "", this),
69 new Among ( "entli", 3, 5, "", this),
70 new Among ( "aliti", -1, 8, "", this),
71 new Among ( "biliti", -1, 12, "", this),
72 new Among ( "iviti", -1, 11, "", this),
73 new Among ( "tional", -1, 1, "", this),
74 new Among ( "ational", 14, 7, "", this),
75 new Among ( "alism", -1, 8, "", this),
76 new Among ( "ation", -1, 7, "", this),
77 new Among ( "ization", 17, 6, "", this),
78 new Among ( "izer", -1, 6, "", this),
79 new Among ( "ator", -1, 7, "", this),
80 new Among ( "iveness", -1, 11, "", this),
81 new Among ( "fulness", -1, 9, "", this),
82 new Among ( "ousness", -1, 10, "", this)
85 private Among a_6[] = {
86 new Among ( "icate", -1, 4, "", this),
87 new Among ( "ative", -1, 6, "", this),
88 new Among ( "alize", -1, 3, "", this),
89 new Among ( "iciti", -1, 4, "", this),
90 new Among ( "ical", -1, 4, "", this),
91 new Among ( "tional", -1, 1, "", this),
92 new Among ( "ational", 5, 2, "", this),
93 new Among ( "ful", -1, 5, "", this),
94 new Among ( "ness", -1, 5, "", this)
97 private Among a_7[] = {
98 new Among ( "ic", -1, 1, "", this),
99 new Among ( "ance", -1, 1, "", this),
100 new Among ( "ence", -1, 1, "", this),
101 new Among ( "able", -1, 1, "", this),
102 new Among ( "ible", -1, 1, "", this),
103 new Among ( "ate", -1, 1, "", this),
104 new Among ( "ive", -1, 1, "", this),
105 new Among ( "ize", -1, 1, "", this),
106 new Among ( "iti", -1, 1, "", this),
107 new Among ( "al", -1, 1, "", this),
108 new Among ( "ism", -1, 1, "", this),
109 new Among ( "ion", -1, 2, "", this),
110 new Among ( "er", -1, 1, "", this),
111 new Among ( "ous", -1, 1, "", this),
112 new Among ( "ant", -1, 1, "", this),
113 new Among ( "ent", -1, 1, "", this),
114 new Among ( "ment", 15, 1, "", this),
115 new Among ( "ement", 16, 1, "", this)
118 private Among a_8[] = {
119 new Among ( "e", -1, 1, "", this),
120 new Among ( "l", -1, 2, "", this)
123 private Among a_9[] = {
124 new Among ( "succeed", -1, -1, "", this),
125 new Among ( "proceed", -1, -1, "", this),
126 new Among ( "exceed", -1, -1, "", this),
127 new Among ( "canning", -1, -1, "", this),
128 new Among ( "inning", -1, -1, "", this),
129 new Among ( "earring", -1, -1, "", this),
130 new Among ( "herring", -1, -1, "", this),
131 new Among ( "outing", -1, -1, "", this)
134 private Among a_10[] = {
135 new Among ( "andes", -1, -1, "", this),
136 new Among ( "atlas", -1, -1, "", this),
137 new Among ( "bias", -1, -1, "", this),
138 new Among ( "cosmos", -1, -1, "", this),
139 new Among ( "dying", -1, 3, "", this),
140 new Among ( "early", -1, 9, "", this),
141 new Among ( "gently", -1, 7, "", this),
142 new Among ( "howe", -1, -1, "", this),
143 new Among ( "idly", -1, 6, "", this),
144 new Among ( "lying", -1, 4, "", this),
145 new Among ( "news", -1, -1, "", this),
146 new Among ( "only", -1, 10, "", this),
147 new Among ( "singly", -1, 11, "", this),
148 new Among ( "skies", -1, 2, "", this),
149 new Among ( "skis", -1, 1, "", this),
150 new Among ( "sky", -1, -1, "", this),
151 new Among ( "tying", -1, 5, "", this),
152 new Among ( "ugly", -1, 8, "", this)
155 private static final char g_v[] = {17, 65, 16, 1 };
157 private static final char g_v_WXY[] = {1, 17, 65, 208, 1 };
159 private static final char g_valid_LI[] = {55, 141, 2 };
161 private boolean B_Y_found;
165 private void copy_from(EnglishStemmer other) {
166 B_Y_found = other.B_Y_found;
169 super.copy_from(other);
172 private boolean r_prelude() {
179 // unset Y_found, line 26
213 // set Y_found, line 28
232 if (!(in_grouping(g_v, 97, 121)))
257 // set Y_found, line 29
269 private boolean r_mark_regions() {
284 if (find_among(a_0, 3) == 0)
296 if (!(in_grouping(g_v, 97, 121)))
312 if (!(out_grouping(g_v, 97, 121)))
325 // setmark p1, line 42
331 if (!(in_grouping(g_v, 97, 121)))
347 if (!(out_grouping(g_v, 97, 121)))
359 // setmark p2, line 43
366 private boolean r_shortv() {
371 v_1 = limit - cursor;
374 if (!(out_grouping_b(g_v_WXY, 89, 121)))
378 if (!(in_grouping_b(g_v, 97, 121)))
382 if (!(out_grouping_b(g_v, 97, 121)))
388 cursor = limit - v_1;
390 if (!(out_grouping_b(g_v, 97, 121)))
394 if (!(in_grouping_b(g_v, 97, 121)))
399 if (cursor > limit_backward)
407 private boolean r_R1() {
408 if (!(I_p1 <= cursor))
415 private boolean r_R2() {
416 if (!(I_p2 <= cursor))
423 private boolean r_Step_1a() {
429 v_1 = limit - cursor;
434 // substring, line 60
435 among_var = find_among_b(a_1, 3);
438 cursor = limit - v_1;
445 cursor = limit - v_1;
456 // substring, line 65
457 among_var = find_among_b(a_2, 6);
476 v_2 = limit - cursor;
482 if (limit_backward > c || c > limit)
492 cursor = limit - v_2;
500 if (cursor <= limit_backward)
509 if (!(in_grouping_b(g_v, 97, 121)))
515 if (cursor <= limit_backward)
528 private boolean r_Step_1b() {
536 // substring, line 75
537 among_var = find_among_b(a_4, 6);
560 v_1 = limit - cursor;
565 if (!(in_grouping_b(g_v, 97, 121)))
571 if (cursor <= limit_backward)
577 cursor = limit - v_1;
581 v_3 = limit - cursor;
582 // substring, line 81
583 among_var = find_among_b(a_3, 13);
588 cursor = limit - v_3;
597 insert(cursor, cursor, "e");
606 if (cursor <= limit_backward)
624 v_4 = limit - cursor;
625 // call shortv, line 87
630 cursor = limit - v_4;
634 insert(cursor, cursor, "e");
644 private boolean r_Step_1c() {
652 v_1 = limit - cursor;
655 if (!(eq_s_b(1, "y")))
661 cursor = limit - v_1;
663 if (!(eq_s_b(1, "Y")))
670 if (!(out_grouping_b(g_v, 97, 121)))
676 v_2 = limit - cursor;
679 if (cursor > limit_backward)
685 cursor = limit - v_2;
692 private boolean r_Step_2() {
697 // substring, line 100
698 among_var = find_among_b(a_5, 24);
776 if (!(eq_s_b(1, "l")))
795 if (!(in_grouping_b(g_valid_LI, 99, 116)))
806 private boolean r_Step_3() {
811 // substring, line 127
812 among_var = find_among_b(a_6, 9);
866 private boolean r_Step_4() {
872 // substring, line 141
873 among_var = find_among_b(a_7, 18);
897 v_1 = limit - cursor;
900 if (!(eq_s_b(1, "s")))
906 cursor = limit - v_1;
908 if (!(eq_s_b(1, "t")))
920 private boolean r_Step_5() {
927 // substring, line 150
928 among_var = find_among_b(a_8, 2);
942 v_1 = limit - cursor;
951 cursor = limit - v_1;
960 v_2 = limit - cursor;
962 // call shortv, line 151
969 cursor = limit - v_2;
983 if (!(eq_s_b(1, "l")))
994 private boolean r_exception2() {
998 // substring, line 158
999 if (find_among_b(a_9, 8) == 0)
1005 // atlimit, line 158
1006 if (cursor > limit_backward)
1013 private boolean r_exception1() {
1018 // substring, line 170
1019 among_var = find_among(a_10, 18);
1026 // atlimit, line 170
1067 slice_from("gentl");
1077 slice_from("earli");
1087 slice_from("singl");
1093 private boolean r_postlude() {
1097 // Boolean test Y_found, line 203
1103 replab0: while(true)
1116 // literal, line 203
1117 if (!(eq_s(1, "Y")))
1127 if (cursor >= limit)
1143 public boolean stem() {
1162 // call exception1, line 207
1163 if (!r_exception1())
1178 if (0 > c || c > limit)
1195 // call prelude, line 209
1205 // call mark_regions, line 210
1206 if (!r_mark_regions())
1212 // backwards, line 211
1213 limit_backward = cursor; cursor = limit;
1216 v_5 = limit - cursor;
1218 // call Step_1a, line 213
1224 cursor = limit - v_5;
1227 v_6 = limit - cursor;
1229 // call exception2, line 215
1230 if (!r_exception2())
1236 cursor = limit - v_6;
1239 v_7 = limit - cursor;
1241 // call Step_1b, line 217
1247 cursor = limit - v_7;
1249 v_8 = limit - cursor;
1251 // call Step_1c, line 218
1257 cursor = limit - v_8;
1259 v_9 = limit - cursor;
1261 // call Step_2, line 220
1267 cursor = limit - v_9;
1269 v_10 = limit - cursor;
1271 // call Step_3, line 221
1277 cursor = limit - v_10;
1279 v_11 = limit - cursor;
1281 // call Step_4, line 222
1287 cursor = limit - v_11;
1289 v_12 = limit - cursor;
1291 // call Step_5, line 224
1297 cursor = limit - v_12;
1299 cursor = limit_backward; // do, line 227
1302 // call postlude, line 227