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(
"s", - 1, 3,
"",
this),
new Among(
"ies", 0, 2,
"",
this),
new Among(
"sses", 0, 1,
"",
this),
new Among(
"ss", 0, - 1,
"",
this)};
36 a_1 =
new Among[]{
new Among(
"", - 1, 3,
"",
this),
new Among(
"bb", 0, 2,
"",
this),
new Among(
"dd", 0, 2,
"",
this),
new Among(
"ff", 0, 2,
"",
this),
new Among(
"gg", 0, 2,
"",
this),
new Among(
"bl", 0, 1,
"",
this),
new Among(
"mm", 0, 2,
"",
this),
new Among(
"nn", 0, 2,
"",
this),
new Among(
"pp", 0, 2,
"",
this),
new Among(
"rr", 0, 2,
"",
this),
new Among(
"at", 0, 1,
"",
this),
new Among(
"tt", 0, 2,
"",
this),
new Among(
"iz", 0, 1,
"",
this)};
37 a_2 =
new Among[]{
new Among(
"ed", - 1, 2,
"",
this),
new Among(
"eed", 0, 1,
"",
this),
new Among(
"ing", - 1, 2,
"",
this)};
38 a_3 =
new Among[]{
new Among(
"anci", - 1, 3,
"",
this),
new Among(
"enci", - 1, 2,
"",
this),
new Among(
"abli", - 1, 4,
"",
this),
new Among(
"eli", - 1, 6,
"",
this),
new Among(
"alli", - 1, 9,
"",
this),
new Among(
"ousli", - 1, 12,
"",
this),
new Among(
"entli", - 1, 5,
"",
this),
new Among(
"aliti", - 1, 10,
"",
this),
new Among(
"biliti", - 1, 14,
"",
this),
new Among(
"iviti", - 1, 13,
"",
this),
new Among(
"tional", - 1, 1,
"",
this),
new Among(
"ational", 10, 8,
"",
this),
new Among(
"alism", - 1, 10,
"",
this),
new Among(
"ation", - 1, 8,
"",
this),
new Among(
"ization", 13, 7,
"",
this),
new Among(
"izer", - 1, 7,
"",
this),
new Among(
"ator", - 1, 8,
"",
this),
new Among(
"iveness", - 1, 13,
"",
this),
new Among(
"fulness", - 1, 11,
"",
this),
new Among(
"ousness", - 1, 12,
"",
this)};
39 a_4 =
new Among[]{
new Among(
"icate", - 1, 2,
"",
this),
new Among(
"ative", - 1, 3,
"",
this),
new Among(
"alize", - 1, 1,
"",
this),
new Among(
"iciti", - 1, 2,
"",
this),
new Among(
"ical", - 1, 2,
"",
this),
new Among(
"ful", - 1, 3,
"",
this),
new Among(
"ness", - 1, 3,
"",
this)};
40 a_5 =
new Among[]{
new Among(
"ic", - 1, 1,
"",
this),
new Among(
"ance", - 1, 1,
"",
this),
new Among(
"ence", - 1, 1,
"",
this),
new Among(
"able", - 1, 1,
"",
this),
new Among(
"ible", - 1, 1,
"",
this),
new Among(
"ate", - 1, 1,
"",
this),
new Among(
"ive", - 1, 1,
"",
this),
new Among(
"ize", - 1, 1,
"",
this),
new Among(
"iti", - 1, 1,
"",
this),
new Among(
"al", - 1, 1,
"",
this),
new Among(
"ism", - 1, 1,
"",
this),
new Among(
"ion", - 1, 2,
"",
this),
new Among(
"er", - 1, 1,
"",
this),
new Among(
"ous", - 1, 1,
"",
this),
new Among(
"ant", - 1, 1,
"",
this),
new Among(
"ent", - 1, 1,
"",
this),
new Among(
"ment", 15, 1,
"",
this),
new Among(
"ement", 16, 1,
"",
this),
new Among(
"ou", - 1, 1,
"",
this)};
49 private static readonly
char[] g_v =
new char[]{(char) (17), (char) (65), (char) (16), (char) (1)};
50 private static readonly
char[] g_v_WXY =
new char[]{(char) (1), (char) (17), (char) (65), (char) (208), (char) (1)};
52 private bool B_Y_found;
56 protected internal virtual void copy_from(PorterStemmer other)
58 B_Y_found = other.B_Y_found;
61 base.copy_from(other);
64 private bool r_shortv()
67 if (!(out_grouping_b(g_v_WXY, 89, 121)))
71 if (!(in_grouping_b(g_v, 97, 121)))
75 if (!(out_grouping_b(g_v, 97, 121)))
84 if (!(I_p1 <= cursor))
93 if (!(I_p2 <= cursor))
100 private bool r_Step_1a()
107 among_var = find_among_b(a_0, 4);
141 private bool r_Step_1b()
151 among_var = find_among_b(a_2, 3);
178 v_1 = limit - cursor;
184 if (!(in_grouping_b(g_v, 97, 121)))
194 if (cursor <= limit_backward)
203 cursor = limit - v_1;
207 v_3 = limit - cursor;
209 among_var = find_among_b(a_1, 13);
214 cursor = limit - v_3;
226 insert(cursor, cursor,
"e");
236 if (cursor <= limit_backward)
255 v_4 = limit - cursor;
261 cursor = limit - v_4;
265 insert(cursor, cursor,
"e");
275 private bool r_Step_1c()
284 v_1 = limit - cursor;
288 if (!(eq_s_b(1,
"y")))
298 cursor = limit - v_1;
300 if (!(eq_s_b(1,
"Y")))
316 if (!(in_grouping_b(g_v, 97, 121)))
326 if (cursor <= limit_backward)
340 private bool r_Step_2()
347 among_var = find_among_b(a_3, 20);
452 private bool r_Step_3()
459 among_var = find_among_b(a_4, 7);
498 private bool r_Step_4()
506 among_var = find_among_b(a_5, 19);
536 v_1 = limit - cursor;
540 if (!(eq_s_b(1,
"s")))
550 cursor = limit - v_1;
552 if (!(eq_s_b(1,
"t")))
565 private bool r_Step_5a()
573 if (!(eq_s_b(1,
"e")))
582 v_1 = limit - cursor;
596 cursor = limit - v_1;
605 v_2 = limit - cursor;
619 cursor = limit - v_2;
631 private bool r_Step_5b()
637 if (!(eq_s_b(1,
"l")))
649 if (!(eq_s_b(1,
"l")))
658 public override bool Stem()
721 if (!(in_grouping(g_v, 97, 121)))
787 if (!(in_grouping(g_v, 97, 121)))
811 if (!(out_grouping(g_v, 97, 121)))
837 if (!(in_grouping(g_v, 97, 121)))
861 if (!(out_grouping(g_v, 97, 121)))
889 limit_backward = cursor; cursor = limit;
892 v_10 = limit - cursor;
905 cursor = limit - v_10;
907 v_11 = limit - cursor;
920 cursor = limit - v_11;
922 v_12 = limit - cursor;
935 cursor = limit - v_12;
937 v_13 = limit - cursor;
950 cursor = limit - v_13;
952 v_14 = limit - cursor;
965 cursor = limit - v_14;
967 v_15 = limit - cursor;
980 cursor = limit - v_15;
982 v_16 = limit - cursor;
995 cursor = limit - v_16;
997 v_17 = limit - cursor;
1010 cursor = limit - v_17;
1011 cursor = limit_backward;
1038 if (!(eq_s(1,
"Y")))
1052 if (cursor >= limit)