9 using System.Collections.Generic;
12 namespace TraceLab.Components.DevelopmentKit.Preprocessors.Stemmers.Snowball.Languages
22 private readonly
static Among[] a_0 =
24 new Among (
"col", -1, -1, null ),
25 new Among (
"par", -1, -1, null ),
26 new Among (
"tap", -1, -1, null )
30 private readonly
static Among[] a_1 =
32 new Among (
"", -1, 4, null ),
33 new Among (
"I", 0, 1, null ),
34 new Among (
"U", 0, 2, null ),
35 new Among (
"Y", 0, 3, null )
39 private readonly
static Among[] a_2 =
41 new Among (
"iqU", -1, 3, null ),
42 new Among (
"abl", -1, 3, null ),
43 new Among (
"I\u00E8r", -1, 4, null ),
44 new Among (
"i\u00E8r", -1, 4, null ),
45 new Among (
"eus", -1, 2, null ),
46 new Among (
"iv", -1, 1, null )
50 private readonly
static Among[] a_3 =
52 new Among (
"ic", -1, 2, null ),
53 new Among (
"abil", -1, 1, null ),
54 new Among (
"iv", -1, 3, null )
58 private readonly
static Among[] a_4 =
60 new Among (
"iqUe", -1, 1, null ),
61 new Among (
"atrice", -1, 2, null ),
62 new Among (
"ance", -1, 1, null ),
63 new Among (
"ence", -1, 5, null ),
64 new Among (
"logie", -1, 3, null ),
65 new Among (
"able", -1, 1, null ),
66 new Among (
"isme", -1, 1, null ),
67 new Among (
"euse", -1, 11, null ),
68 new Among (
"iste", -1, 1, null ),
69 new Among (
"ive", -1, 8, null ),
70 new Among (
"if", -1, 8, null ),
71 new Among (
"usion", -1, 4, null ),
72 new Among (
"ation", -1, 2, null ),
73 new Among (
"ution", -1, 4, null ),
74 new Among (
"ateur", -1, 2, null ),
75 new Among (
"iqUes", -1, 1, null ),
76 new Among (
"atrices", -1, 2, null ),
77 new Among (
"ances", -1, 1, null ),
78 new Among (
"ences", -1, 5, null ),
79 new Among (
"logies", -1, 3, null ),
80 new Among (
"ables", -1, 1, null ),
81 new Among (
"ismes", -1, 1, null ),
82 new Among (
"euses", -1, 11, null ),
83 new Among (
"istes", -1, 1, null ),
84 new Among (
"ives", -1, 8, null ),
85 new Among (
"ifs", -1, 8, null ),
86 new Among (
"usions", -1, 4, null ),
87 new Among (
"ations", -1, 2, null ),
88 new Among (
"utions", -1, 4, null ),
89 new Among (
"ateurs", -1, 2, null ),
90 new Among (
"ments", -1, 15, null ),
91 new Among (
"ements", 30, 6, null ),
92 new Among (
"issements", 31, 12, null ),
93 new Among (
"it\u00E9s", -1, 7, null ),
94 new Among (
"ment", -1, 15, null ),
95 new Among (
"ement", 34, 6, null ),
96 new Among (
"issement", 35, 12, null ),
97 new Among (
"amment", 34, 13, null ),
98 new Among (
"emment", 34, 14, null ),
99 new Among (
"aux", -1, 10, null ),
100 new Among (
"eaux", 39, 9, null ),
101 new Among (
"eux", -1, 1, null ),
102 new Among (
"it\u00E9", -1, 7, null )
106 private readonly
static Among[] a_5 =
108 new Among (
"ira", -1, 1, null ),
109 new Among (
"ie", -1, 1, null ),
110 new Among (
"isse", -1, 1, null ),
111 new Among (
"issante", -1, 1, null ),
112 new Among (
"i", -1, 1, null ),
113 new Among (
"irai", 4, 1, null ),
114 new Among (
"ir", -1, 1, null ),
115 new Among (
"iras", -1, 1, null ),
116 new Among (
"ies", -1, 1, null ),
117 new Among (
"\u00EEmes", -1, 1, null ),
118 new Among (
"isses", -1, 1, null ),
119 new Among (
"issantes", -1, 1, null ),
120 new Among (
"\u00EEtes", -1, 1, null ),
121 new Among (
"is", -1, 1, null ),
122 new Among (
"irais", 13, 1, null ),
123 new Among (
"issais", 13, 1, null ),
124 new Among (
"irions", -1, 1, null ),
125 new Among (
"issions", -1, 1, null ),
126 new Among (
"irons", -1, 1, null ),
127 new Among (
"issons", -1, 1, null ),
128 new Among (
"issants", -1, 1, null ),
129 new Among (
"it", -1, 1, null ),
130 new Among (
"irait", 21, 1, null ),
131 new Among (
"issait", 21, 1, null ),
132 new Among (
"issant", -1, 1, null ),
133 new Among (
"iraIent", -1, 1, null ),
134 new Among (
"issaIent", -1, 1, null ),
135 new Among (
"irent", -1, 1, null ),
136 new Among (
"issent", -1, 1, null ),
137 new Among (
"iront", -1, 1, null ),
138 new Among (
"\u00EEt", -1, 1, null ),
139 new Among (
"iriez", -1, 1, null ),
140 new Among (
"issiez", -1, 1, null ),
141 new Among (
"irez", -1, 1, null ),
142 new Among (
"issez", -1, 1, null )
146 private readonly
static Among[] a_6 =
148 new Among (
"a", -1, 3, null ),
149 new Among (
"era", 0, 2, null ),
150 new Among (
"asse", -1, 3, null ),
151 new Among (
"ante", -1, 3, null ),
152 new Among (
"\u00E9e", -1, 2, null ),
153 new Among (
"ai", -1, 3, null ),
154 new Among (
"erai", 5, 2, null ),
155 new Among (
"er", -1, 2, null ),
156 new Among (
"as", -1, 3, null ),
157 new Among (
"eras", 8, 2, null ),
158 new Among (
"\u00E2mes", -1, 3, null ),
159 new Among (
"asses", -1, 3, null ),
160 new Among (
"antes", -1, 3, null ),
161 new Among (
"\u00E2tes", -1, 3, null ),
162 new Among (
"\u00E9es", -1, 2, null ),
163 new Among (
"ais", -1, 3, null ),
164 new Among (
"erais", 15, 2, null ),
165 new Among (
"ions", -1, 1, null ),
166 new Among (
"erions", 17, 2, null ),
167 new Among (
"assions", 17, 3, null ),
168 new Among (
"erons", -1, 2, null ),
169 new Among (
"ants", -1, 3, null ),
170 new Among (
"\u00E9s", -1, 2, null ),
171 new Among (
"ait", -1, 3, null ),
172 new Among (
"erait", 23, 2, null ),
173 new Among (
"ant", -1, 3, null ),
174 new Among (
"aIent", -1, 3, null ),
175 new Among (
"eraIent", 26, 2, null ),
176 new Among (
"\u00E8rent", -1, 2, null ),
177 new Among (
"assent", -1, 3, null ),
178 new Among (
"eront", -1, 2, null ),
179 new Among (
"\u00E2t", -1, 3, null ),
180 new Among (
"ez", -1, 2, null ),
181 new Among (
"iez", 32, 2, null ),
182 new Among (
"eriez", 33, 2, null ),
183 new Among (
"assiez", 33, 3, null ),
184 new Among (
"erez", 32, 2, null ),
185 new Among (
"\u00E9", -1, 2, null )
189 private readonly
static Among[] a_7 =
191 new Among (
"e", -1, 3, null ),
192 new Among (
"I\u00E8re", 0, 2, null ),
193 new Among (
"i\u00E8re", 0, 2, null ),
194 new Among (
"ion", -1, 1, null ),
195 new Among (
"Ier", -1, 2, null ),
196 new Among (
"ier", -1, 2, null ),
197 new Among (
"\u00EB", -1, 4, null )
202 private readonly
static Among[] a_8 =
204 new Among (
"ell", -1, -1, null ),
205 new Among (
"eill", -1, -1, null ),
206 new Among (
"enn", -1, -1, null ),
207 new Among (
"onn", -1, -1, null ),
208 new Among (
"ett", -1, -1, null )
212 private static readonly
char[] g_v = {(char)17, (
char)65, (char)16, (
char)1, (char)0,
213 (
char)0,(char)0, (
char)0, (char)0, (
char)0, (char)0,
214 (
char)0, (char)0, (
char)0,(char)0, (
char)128, (char)130,
215 (
char)103, (char)8, (
char)5 };
216 private static readonly
char[] g_keep_with_s = {(char)1, (
char)65, (char)20, (
char)0, (char)0, (
char)0,
217 (char)0, (
char)0, (char)0, (
char)0, (char)0, (
char)0,
218 (char)0, (
char)0, (char)0, (
char)0, (char)128 };
230 base.copy_from(other);
234 private bool r_prelude()
236 bool subroot =
false;
242 replab0:
while (
true)
261 if (!(in_grouping(g_v, 97, 251)))
281 if (!(in_grouping(g_v, 97, 251)))
290 if (subroot) { subroot =
false;
break; }
302 if (!(in_grouping(g_v, 97, 251)))
311 if (subroot) { subroot =
false;
break; }
325 if (subroot) { subroot =
false;
break; }
329 if (subroot) { subroot =
false;
break; }
343 if (!(in_grouping(g_v, 97, 251)))
352 if (subroot) { subroot =
false;
break; }
374 if (subroot) { subroot =
false;
break; }
379 if (subroot) { subroot =
false;
break; }
403 private bool r_mark_regions()
406 bool subroot =
false;
427 if (!(in_grouping(g_v, 97, 251)))
431 if (!(in_grouping(g_v, 97, 251)))
444 if (subroot) { subroot =
false;
break; }
449 if (find_among(a_0, 3) == 0)
456 if (subroot) { subroot =
false;
break; }
471 if (!(in_grouping(g_v, 97, 251)))
478 if (subroot) { subroot =
false;
break; }
487 if (root) { root =
false;
break; }
488 if (subroot) { subroot =
false;
break; }
504 if (!(in_grouping(g_v, 97, 251)))
511 if (subroot) { subroot =
false;
break; }
519 if (subroot) { subroot =
false;
break; }
525 if (!(out_grouping(g_v, 97, 251)))
532 if (subroot) { subroot =
false;
break; }
541 if (subroot) { subroot =
false;
break; }
549 if (!(in_grouping(g_v, 97, 251)))
556 if (subroot) { subroot =
false;
break; }
565 if (subroot) { subroot =
false;
break; }
571 if (!(out_grouping(g_v, 97, 251)))
578 if (subroot) { subroot =
false;
break; }
587 if (subroot) { subroot =
false;
break; }
595 private bool r_postlude()
597 bool subroot =
false;
601 replab0:
while (
true)
610 among_var = find_among(a_1, 4);
648 if (subroot) { subroot =
false;
break; }
662 if (!(I_pV <= cursor))
671 if (!(I_p1 <= cursor))
680 if (!(I_p2 <= cursor))
687 private bool r_standard_suffix()
689 bool subroot =
false;
706 among_var = find_among_b(a_4, 43);
737 v_1 = limit - cursor;
744 if (!(eq_s_b(2,
"ic")))
746 cursor = limit - v_1;
754 v_2 = limit - cursor;
769 if (subroot) { subroot =
false;
break; }
771 cursor = limit - v_2;
817 v_3 = limit - cursor;
824 among_var = find_among_b(a_2, 6);
827 cursor = limit - v_3;
835 cursor = limit - v_3;
843 cursor = limit - v_3;
852 if (!(eq_s_b(2,
"at")))
854 cursor = limit - v_3;
863 cursor = limit - v_3;
875 v_4 = limit - cursor;
890 if (subroot) { subroot =
false;
break; }
892 cursor = limit - v_4;
897 cursor = limit - v_3;
910 cursor = limit - v_3;
922 cursor = limit - v_3;
930 exitLab3:
if (subroot) { subroot =
false;
break; }
943 v_5 = limit - cursor;
950 among_var = find_among_b(a_3, 3);
953 cursor = limit - v_5;
961 cursor = limit - v_5;
969 v_6 = limit - cursor;
984 if (subroot) { subroot =
false;
break; }
986 cursor = limit - v_6;
996 v_7 = limit - cursor;
1011 if (subroot) { subroot =
false;
break; }
1013 cursor = limit - v_7;
1023 cursor = limit - v_5;
1031 if (subroot) { subroot =
false;
break; }
1044 v_8 = limit - cursor;
1051 if (!(eq_s_b(2,
"at")))
1053 cursor = limit - v_8;
1061 cursor = limit - v_8;
1069 if (!(eq_s_b(2,
"ic")))
1071 cursor = limit - v_8;
1079 v_9 = limit - cursor;
1094 if (subroot) { subroot =
false;
break; }
1096 cursor = limit - v_9;
1122 v_10 = limit - cursor;
1137 if (subroot) { subroot =
false;
break; }
1139 cursor = limit - v_10;
1157 if (!(out_grouping_b(g_v, 97, 251)))
1191 v_11 = limit - cursor;
1193 if (!(in_grouping_b(g_v, 97, 251)))
1202 cursor = limit - v_11;
1212 private bool r_i_verb_suffix()
1218 v_1 = limit - cursor;
1225 v_2 = limit_backward;
1226 limit_backward = cursor;
1227 cursor = limit - v_1;
1232 among_var = find_among_b(a_5, 35);
1235 limit_backward = v_2;
1243 limit_backward = v_2;
1247 if (!(out_grouping_b(g_v, 97, 251)))
1249 limit_backward = v_2;
1256 limit_backward = v_2;
1260 private bool r_verb_suffix()
1267 v_1 = limit - cursor;
1274 v_2 = limit_backward;
1275 limit_backward = cursor;
1276 cursor = limit - v_1;
1281 among_var = find_among_b(a_6, 38);
1284 limit_backward = v_2;
1292 limit_backward = v_2;
1299 limit_backward = v_2;
1315 v_3 = limit - cursor;
1323 if (!(eq_s_b(1,
"e")))
1325 cursor = limit - v_3;
1336 limit_backward = v_2;
1340 private bool r_residual_suffix()
1342 bool subroot =
false;
1351 v_1 = limit - cursor;
1358 if (!(eq_s_b(1,
"s")))
1360 cursor = limit - v_1;
1366 v_2 = limit - cursor;
1367 if (!(out_grouping_b(g_keep_with_s, 97, 232)))
1369 cursor = limit - v_1;
1372 cursor = limit - v_2;
1377 v_3 = limit - cursor;
1384 v_4 = limit_backward;
1385 limit_backward = cursor;
1386 cursor = limit - v_3;
1391 among_var = find_among_b(a_7, 7);
1394 limit_backward = v_4;
1402 limit_backward = v_4;
1409 limit_backward = v_4;
1415 v_5 = limit - cursor;
1419 if (!(eq_s_b(1,
"s")))
1428 if (subroot) { subroot =
false;
break; }
1430 cursor = limit - v_5;
1432 if (!(eq_s_b(1,
"t")))
1434 limit_backward = v_4;
1454 if (!(eq_s_b(2,
"gu")))
1456 limit_backward = v_4;
1463 limit_backward = v_4;
1467 private bool r_un_double()
1472 v_1 = limit - cursor;
1474 if (find_among_b(a_8, 5) == 0)
1478 cursor = limit - v_1;
1482 if (cursor <= limit_backward)
1494 private bool r_un_accent()
1496 bool subroot =
false;
1503 replab0:
while (
true)
1508 if (!(out_grouping_b(g_v, 97, 251)))
1530 v_3 = limit - cursor;
1534 if (!(eq_s_b(1,
"\u00E9")))
1542 if (subroot) { subroot =
false;
break; }
1544 cursor = limit - v_3;
1546 if (!(eq_s_b(1,
"\u00E8")))
1558 private bool CanStem()
1560 bool subroot =
false;
1589 if (!r_mark_regions())
1596 limit_backward = cursor; cursor = limit;
1599 v_3 = limit - cursor;
1606 v_4 = limit - cursor;
1611 v_5 = limit - cursor;
1616 v_6 = limit - cursor;
1620 if (!r_standard_suffix())
1628 if (subroot) { subroot =
false;
break; }
1630 cursor = limit - v_6;
1634 if (!r_i_verb_suffix())
1642 if (subroot) { subroot =
false;
break; }
1644 cursor = limit - v_6;
1646 if (!r_verb_suffix())
1653 if (subroot) { subroot =
false;
break; }
1655 cursor = limit - v_5;
1657 v_7 = limit - cursor;
1666 v_8 = limit - cursor;
1671 if (!(eq_s_b(1,
"Y")))
1683 if (subroot) { subroot =
false;
break; }
1685 cursor = limit - v_8;
1688 if (!(eq_s_b(1,
"\u00E7")))
1690 cursor = limit - v_7;
1699 if (subroot) { subroot =
false;
break; }
1704 if (subroot) { subroot =
false;
break; }
1705 cursor = limit - v_4;
1707 if (!r_residual_suffix())
1714 if (subroot) { subroot =
false;
break; }
1717 cursor = limit - v_3;
1719 v_9 = limit - cursor;
1729 cursor = limit - v_9;
1731 v_10 = limit - cursor;
1740 cursor = limit - v_10;
1741 cursor = limit_backward;
1762 this.setCurrent(s.ToLowerInvariant());
1764 return this.getCurrent();