20 using Among = SF.Snowball.Among;
22 namespace SF.Snowball.Ext
24 #pragma warning disable 162,164
33 private void InitBlock()
35 a_0 =
new Among[]{
new Among(
"nde", - 1, 7,
"",
this),
new Among(
"en", - 1, 6,
"",
this),
new Among(
"s", - 1, 2,
"",
this),
new Among(
"'s", 2, 1,
"",
this),
new Among(
"es", 2, 4,
"",
this),
new Among(
"ies", 4, 3,
"",
this),
new Among(
"aus", 2, 5,
"",
this)};
36 a_1 =
new Among[]{
new Among(
"de", - 1, 5,
"",
this),
new Among(
"ge", - 1, 2,
"",
this),
new Among(
"ische", - 1, 4,
"",
this),
new Among(
"je", - 1, 1,
"",
this),
new Among(
"lijke", - 1, 3,
"",
this),
new Among(
"le", - 1, 9,
"",
this),
new Among(
"ene", - 1, 10,
"",
this),
new Among(
"re", - 1, 8,
"",
this),
new Among(
"se", - 1, 7,
"",
this),
new Among(
"te", - 1, 6,
"",
this),
new Among(
"ieve", - 1, 11,
"",
this)};
37 a_2 =
new Among[]{
new Among(
"heid", - 1, 3,
"",
this),
new Among(
"fie", - 1, 7,
"",
this),
new Among(
"gie", - 1, 8,
"",
this),
new Among(
"atie", - 1, 1,
"",
this),
new Among(
"isme", - 1, 5,
"",
this),
new Among(
"ing", - 1, 5,
"",
this),
new Among(
"arij", - 1, 6,
"",
this),
new Among(
"erij", - 1, 5,
"",
this),
new Among(
"sel", - 1, 3,
"",
this),
new Among(
"rder", - 1, 4,
"",
this),
new Among(
"ster", - 1, 3,
"",
this),
new Among(
"iteit", - 1, 2,
"",
this),
new Among(
"dst", - 1, 10,
"",
this),
new Among(
"tst", - 1, 9,
"",
this)};
38 a_3 =
new Among[]{
new Among(
"end", - 1, 10,
"",
this),
new Among(
"atief", - 1, 2,
"",
this),
new Among(
"erig", - 1, 10,
"",
this),
new Among(
"achtig", - 1, 9,
"",
this),
new Among(
"ioneel", - 1, 1,
"",
this),
new Among(
"baar", - 1, 3,
"",
this),
new Among(
"laar", - 1, 5,
"",
this),
new Among(
"naar", - 1, 4,
"",
this),
new Among(
"raar", - 1, 6,
"",
this),
new Among(
"eriger", - 1, 10,
"",
this),
new Among(
"achtiger", - 1, 9,
"",
this),
new Among(
"lijker", - 1, 8,
"",
this),
new Among(
"tant", - 1, 7,
"",
this),
new Among(
"erigst", - 1, 10,
"",
this),
new Among(
"achtigst", - 1, 9,
"",
this),
new Among(
"lijkst", - 1, 8,
"",
this)};
39 a_4 =
new Among[]{
new Among(
"ig", - 1, 1,
"",
this),
new Among(
"iger", - 1, 1,
"",
this),
new Among(
"igst", - 1, 1,
"",
this)};
40 a_5 =
new Among[]{
new Among(
"ft", - 1, 2,
"",
this),
new Among(
"kt", - 1, 1,
"",
this),
new Among(
"pt", - 1, 3,
"",
this)};
41 a_6 =
new Among[]{
new Among(
"bb", - 1, 1,
"",
this),
new Among(
"cc", - 1, 2,
"",
this),
new Among(
"dd", - 1, 3,
"",
this),
new Among(
"ff", - 1, 4,
"",
this),
new Among(
"gg", - 1, 5,
"",
this),
new Among(
"hh", - 1, 6,
"",
this),
new Among(
"jj", - 1, 7,
"",
this),
new Among(
"kk", - 1, 8,
"",
this),
new Among(
"ll", - 1, 9,
"",
this),
new Among(
"mm", - 1, 10,
"",
this),
new Among(
"nn", - 1, 11,
"",
this),
new Among(
"pp", - 1, 12,
"",
this),
new Among(
"qq", - 1, 13,
"",
this),
new Among(
"rr", - 1, 14,
"",
this),
new Among(
"ss", - 1, 15,
"",
this),
new Among(
"tt", - 1, 16,
"",
this),
new Among(
"v", - 1, 21,
"",
this),
new Among(
"vv", 16, 17,
"",
this),
new Among(
"ww", - 1, 18,
"",
this),
new Among(
"xx", - 1, 19,
"",
this),
new Among(
"z", - 1, 22,
"",
this),
new Among(
"zz", 20, 20,
"",
this)};
42 a_7 =
new Among[]{
new Among(
"d", - 1, 1,
"",
this),
new Among(
"t", - 1, 2,
"",
this)};
53 private static readonly
char[] g_v =
new char[]{(char) (17), (char) (65), (char) (16), (char) (1)};
54 private static readonly
char[] g_v_WX =
new char[]{(char) (17), (char) (65), (char) (208), (char) (1)};
55 private static readonly
char[] g_AOU =
new char[]{(char) (1), (char) (64), (char) (16)};
56 private static readonly
char[] g_AIOU =
new char[]{(char) (1), (char) (65), (char) (16)};
58 private bool B_GE_removed;
59 private bool B_stemmed;
60 private bool B_Y_found;
64 private System.Text.StringBuilder S_ch =
new System.Text.StringBuilder();
66 protected internal virtual void copy_from(KpStemmer other)
68 B_GE_removed = other.B_GE_removed;
69 B_stemmed = other.B_stemmed;
70 B_Y_found = other.B_Y_found;
75 base.copy_from(other);
107 v_1 = limit - cursor;
112 v_2 = limit - cursor;
115 if (!(in_grouping_b(g_v, 97, 121)))
125 cursor = limit - v_2;
127 if (!(eq_s_b(2,
"ij")))
136 cursor = limit - v_1;
145 v_1 = limit - cursor;
148 if (cursor <= limit_backward)
157 v_2 = limit - cursor;
160 if (!(in_grouping_b(g_v, 97, 121)))
170 cursor = limit - v_2;
172 if (!(eq_s_b(2,
"ij")))
178 cursor = limit - v_1;
187 v_1 = limit - cursor;
191 v_2 = limit - cursor;
195 if (!(eq_s_b(2,
"ij")))
205 cursor = limit - v_2;
207 if (!(out_grouping_b(g_v, 97, 121)))
211 cursor = limit - v_1;
215 private bool r_lengthen_V()
226 v_1 = limit - cursor;
230 if (!(out_grouping_b(g_v_WX, 97, 121)))
239 v_2 = limit - cursor;
243 if (!(in_grouping_b(g_AOU, 97, 117)))
250 v_3 = limit - cursor;
255 v_4 = limit - cursor;
258 if (!(out_grouping_b(g_v, 97, 121)))
268 cursor = limit - v_4;
270 if (cursor > limit_backward)
279 cursor = limit - v_3;
286 cursor = limit - v_2;
289 if (!(eq_s_b(1,
"e")))
296 v_5 = limit - cursor;
301 v_6 = limit - cursor;
304 if (!(out_grouping_b(g_v, 97, 121)))
314 cursor = limit - v_6;
316 if (cursor > limit_backward)
327 v_7 = limit - cursor;
330 if (!(in_grouping_b(g_AIOU, 97, 117)))
340 cursor = limit - v_7;
344 v_8 = limit - cursor;
349 if (cursor <= limit_backward)
354 if (!(in_grouping_b(g_AIOU, 97, 117)))
358 if (!(out_grouping_b(g_v, 97, 121)))
368 cursor = limit - v_8;
370 cursor = limit - v_5;
377 S_ch = slice_to(S_ch);
381 insert(cursor, cursor, S_ch);
389 cursor = limit - v_1;
393 private bool r_Step_1()
404 among_var = find_among_b(a_0, 7);
433 v_1 = limit - cursor;
438 if (!(eq_s_b(1,
"t")))
453 cursor = limit - v_1;
480 v_2 = limit - cursor;
485 if (!(eq_s_b(2,
"ar")))
514 cursor = limit - v_2;
519 if (!(eq_s_b(2,
"er")))
543 cursor = limit - v_2;
585 v_3 = limit - cursor;
590 if (!(eq_s_b(3,
"hed")))
609 cursor = limit - v_3;
614 if (!(eq_s_b(2,
"nd")))
626 cursor = limit - v_3;
631 if (!(eq_s_b(1,
"d")))
655 cursor = limit - v_3;
662 v_4 = limit - cursor;
666 if (!(eq_s_b(1,
"i")))
676 cursor = limit - v_4;
678 if (!(eq_s_b(1,
"j")))
700 cursor = limit - v_3;
735 private bool r_Step_2()
743 among_var = find_among_b(a_1, 11);
762 v_1 = limit - cursor;
767 if (!(eq_s_b(2,
"'t")))
781 cursor = limit - v_1;
786 if (!(eq_s_b(2,
"et")))
810 cursor = limit - v_1;
815 if (!(eq_s_b(3,
"rnt")))
829 cursor = limit - v_1;
834 if (!(eq_s_b(1,
"t")))
858 cursor = limit - v_1;
863 if (!(eq_s_b(3,
"ink")))
877 cursor = limit - v_1;
882 if (!(eq_s_b(2,
"mp")))
896 cursor = limit - v_1;
901 if (!(eq_s_b(1,
"'")))
920 cursor = limit - v_1;
1035 insert(cursor, cursor,
"l");
1037 if (!r_lengthen_V())
1058 insert(cursor, cursor,
"en");
1060 if (!r_lengthen_V())
1085 private bool r_Step_3()
1092 among_var = find_among_b(a_2, 14);
1127 if (!r_lengthen_V())
1160 if (!r_lengthen_V())
1192 insert(cursor, cursor,
"f");
1194 if (!r_lengthen_V())
1210 insert(cursor, cursor,
"g");
1212 if (!r_lengthen_V())
1253 private bool r_Step_4()
1262 v_1 = limit - cursor;
1269 among_var = find_among_b(a_3, 16);
1412 if (!r_lengthen_V())
1424 cursor = limit - v_1;
1429 among_var = find_among_b(a_4, 3);
1458 if (!r_lengthen_V())
1469 private bool r_Step_7()
1476 among_var = find_among_b(a_5, 3);
1511 private bool r_Step_6()
1518 among_var = find_among_b(a_6, 22);
1667 private bool r_Step_1c()
1676 among_var = find_among_b(a_7, 2);
1704 v_1 = limit - cursor;
1709 if (!(eq_s_b(1,
"n")))
1724 cursor = limit - v_1;
1734 v_2 = limit - cursor;
1739 if (!(eq_s_b(1,
"h")))
1754 cursor = limit - v_2;
1763 private bool r_Lose_prefix()
1772 if (!(eq_s(2,
"ge")))
1783 if (0 > c || c > limit)
1797 if (!(in_grouping(g_v, 97, 121)))
1809 if (cursor >= limit)
1824 if (!(out_grouping(g_v, 97, 121)))
1836 if (cursor >= limit)
1846 B_GE_removed =
true;
1852 private bool r_Lose_infix()
1859 if (cursor >= limit)
1873 if (!(eq_s(2,
"ge")))
1885 if (cursor >= limit)
1899 if (0 > c || c > limit)
1913 if (!(in_grouping(g_v, 97, 121)))
1925 if (cursor >= limit)
1940 if (!(out_grouping(g_v, 97, 121)))
1952 if (cursor >= limit)
1962 B_GE_removed =
true;
1968 private bool r_measure()
2004 if (!(out_grouping(g_v, 97, 121)))
2038 if (!(eq_s(2,
"ij")))
2049 if (!(in_grouping(g_v, 97, 121)))
2078 if (!(out_grouping(g_v, 97, 121)))
2089 if (!(out_grouping(g_v, 97, 121)))
2123 if (!(eq_s(2,
"ij")))
2134 if (!(in_grouping(g_v, 97, 121)))
2163 if (!(out_grouping(g_v, 97, 121)))
2178 public override bool Stem()
2212 if (!(eq_s(1,
"y")))
2246 if (!(in_grouping(g_v, 97, 121)))
2253 if (!(eq_s(1,
"y")))
2267 if (cursor >= limit)
2306 limit_backward = cursor; cursor = limit;
2309 v_5 = limit - cursor;
2325 cursor = limit - v_5;
2327 v_6 = limit - cursor;
2343 cursor = limit - v_6;
2345 v_7 = limit - cursor;
2361 cursor = limit - v_7;
2363 v_8 = limit - cursor;
2379 cursor = limit - v_8;
2380 cursor = limit_backward;
2381 B_GE_removed =
false;
2390 if (!r_Lose_prefix())
2407 limit_backward = cursor; cursor = limit;
2410 v_11 = limit - cursor;
2415 if (!(B_GE_removed))
2429 cursor = limit - v_11;
2430 cursor = limit_backward;
2431 B_GE_removed =
false;
2440 if (!r_Lose_infix())
2457 limit_backward = cursor; cursor = limit;
2460 v_14 = limit - cursor;
2465 if (!(B_GE_removed))
2479 cursor = limit - v_14;
2480 cursor = limit_backward;
2481 limit_backward = cursor; cursor = limit;
2484 v_15 = limit - cursor;
2500 cursor = limit - v_15;
2502 v_16 = limit - cursor;
2523 if (!(B_GE_removed))
2542 cursor = limit - v_16;
2543 cursor = limit_backward;
2570 if (!(eq_s(1,
"Y")))
2584 if (cursor >= limit)