9 using System.Collections.Generic;
12 namespace TraceLab.Components.DevelopmentKit.Preprocessors.Stemmers.Snowball.Languages
22 private readonly
static Among[] a_0 =
24 new Among (
"", -1, 6, null ),
25 new Among (
"\u00E1", 0, 1, null ),
26 new Among (
"\u00E4", 0, 1, null ),
27 new Among (
"\u00E9", 0, 2, null ),
28 new Among (
"\u00EB", 0, 2, null ),
29 new Among (
"\u00ED", 0, 3, null ),
30 new Among (
"\u00EF", 0, 3, null ),
31 new Among (
"\u00F3", 0, 4, null ),
32 new Among (
"\u00F6", 0, 4, null ),
33 new Among (
"\u00FA", 0, 5, null ),
34 new Among (
"\u00FC", 0, 5, null )
38 private readonly
static Among[] a_1 =
40 new Among (
"", -1, 3, null ),
41 new Among (
"I", 0, 2, null ),
42 new Among (
"Y", 0, 1, null )
46 private readonly
static Among[] a_2 =
48 new Among (
"dd", -1, -1, null ),
49 new Among (
"kk", -1, -1, null ),
50 new Among (
"tt", -1, -1, null )
54 private readonly
static Among[] a_3 =
56 new Among (
"ene", -1, 2, null ),
57 new Among (
"se", -1, 3, null ),
58 new Among (
"en", -1, 2, null ),
59 new Among (
"heden", 2, 1, null ),
60 new Among (
"s", -1, 3, null )
64 private readonly
static Among[] a_4 =
66 new Among (
"end", -1, 1, null ),
67 new Among (
"ig", -1, 2, null ),
68 new Among (
"ing", -1, 1, null ),
69 new Among (
"lijk", -1, 3, null ),
70 new Among (
"baar", -1, 4, null ),
71 new Among (
"bar", -1, 5, null )
75 private readonly
static Among[] a_5 =
77 new Among (
"aa", -1, -1, null ),
78 new Among (
"ee", -1, -1, null ),
79 new Among (
"oo", -1, -1, null ),
80 new Among (
"uu", -1, -1, null )
84 private static readonly
char[] g_v = {(char)17, (
char)65, (char)16, (
char)1, (char)0, (
char)0, (char)0,
85 (
char)0, (char)0, (
char)0, (char)0, (
char)0, (char)0, (
char)0,
86 (char)0, (
char)0, (char)128 };
88 private static readonly
char[] g_v_I = {(char)1, (
char)0, (char)0, (
char)17, (char)65, (
char)16, (char)1,
89 (
char)0, (char)0, (
char)0, (char)0, (
char)0, (char)0, (
char)0,
90 (char)0, (
char)0, (char)0, (
char)0, (char)0, (
char)128 };
92 private static readonly
char[] g_v_j = { (char)17, (
char)67, (char)16, (
char)1, (char)0, (
char)0,(char)0,
93 (
char)0, (char)0, (
char)0, (char)0, (
char)0, (char)0, (
char)0,
94 (char)0, (
char)0, (char)128 };
98 private bool B_e_found;
105 B_e_found = other.B_e_found;
106 base.copy_from(other);
110 private bool r_prelude()
112 bool subroot =
false;
124 replab0:
while (
true)
133 among_var = find_among(a_0, 11);
181 if (subroot) { subroot =
false;
break; }
210 replab3:
while (
true)
222 if (!(in_grouping(g_v, 97, 232)))
242 if (!(in_grouping(g_v, 97, 232)))
251 if (subroot) { subroot =
false;
break; }
265 if (subroot) { subroot =
false;
break; }
270 if (subroot) { subroot =
false;
break; }
279 if (subroot) { subroot =
false;
break; }
292 private bool r_mark_regions()
294 bool subroot =
false;
304 if (!(in_grouping(g_v, 97, 232)))
311 if (subroot) { subroot =
false;
break; }
323 if (!(out_grouping(g_v, 97, 232)))
330 if (subroot) { subroot =
false;
break; }
354 if (!(in_grouping(g_v, 97, 232)))
361 if (subroot) { subroot =
false;
break; }
373 if (!(out_grouping(g_v, 97, 232)))
380 if (subroot) { subroot =
false;
break; }
393 private bool r_postlude()
395 bool subroot =
false;
399 replab0:
while (
true)
408 among_var = find_among(a_1, 3);
441 if (subroot) { subroot =
false;
break; }
456 if (!(I_p1 <= cursor))
466 if (!(I_p2 <= cursor))
474 private bool r_undouble()
479 v_1 = limit - cursor;
481 if (find_among_b(a_2, 3) == 0)
485 cursor = limit - v_1;
489 if (cursor <= limit_backward)
502 private bool r_e_ending()
511 if (!(eq_s_b(1,
"e")))
523 v_1 = limit - cursor;
524 if (!(out_grouping_b(g_v, 97, 232)))
528 cursor = limit - v_1;
542 private bool r_en_ending()
553 v_1 = limit - cursor;
554 if (!(out_grouping_b(g_v, 97, 232)))
558 cursor = limit - v_1;
561 v_2 = limit - cursor;
565 if (!(eq_s_b(3,
"gem")))
569 else if ((eq_s_b(3,
"gem")))
574 cursor = limit - v_2;
587 private bool r_standard_suffix()
589 bool subroot =
false;
603 v_1 = limit - cursor;
610 among_var = find_among_b(a_3, 5);
650 if (!(out_grouping_b(g_v_j, 97, 232)))
659 if (subroot) { subroot =
false;
break; }
661 cursor = limit - v_1;
663 v_2 = limit - cursor;
672 cursor = limit - v_2;
674 v_3 = limit - cursor;
681 if (!(eq_s_b(4,
"heid")))
694 v_4 = limit - cursor;
698 if (!(eq_s_b(1,
"c")))
705 if (subroot) { subroot =
false;
break; }
706 cursor = limit - v_4;
713 if (!(eq_s_b(2,
"en")))
725 cursor = limit - v_3;
727 v_5 = limit - cursor;
734 among_var = find_among_b(a_4, 6);
759 v_6 = limit - cursor;
767 if (!(eq_s_b(2,
"ig")))
780 v_7 = limit - cursor;
784 if (!(eq_s_b(1,
"e")))
791 if (subroot) { subroot =
false;
break; }
792 cursor = limit - v_7;
799 if (subroot) { subroot =
false;
break; }
800 cursor = limit - v_6;
819 v_8 = limit - cursor;
823 if (!(eq_s_b(1,
"e")))
828 if (subroot)
goto breaklab4;
830 if (subroot) { subroot =
false;
break; }
831 cursor = limit - v_8;
882 breaklab4:
if (subroot) { subroot =
false;
break; }
884 cursor = limit - v_5;
886 v_9 = limit - cursor;
890 if (!(out_grouping_b(g_v_I, 73, 232)))
895 v_10 = limit - cursor;
898 if (find_among_b(a_5, 4) == 0)
902 if (!(out_grouping_b(g_v, 97, 232)))
906 cursor = limit - v_10;
910 if (cursor <= limit_backward)
920 cursor = limit - v_9;
925 private bool CanStem()
948 if (!r_mark_regions())
955 limit_backward = cursor; cursor = limit;
957 v_3 = limit - cursor;
961 if (!r_standard_suffix())
966 cursor = limit - v_3;
967 cursor = limit_backward;
988 this.setCurrent(s.ToLowerInvariant());
990 return this.getCurrent();