20 using Among = SF.Snowball.Among;
22 namespace SF.Snowball.Ext
24 #pragma warning disable 162,164
34 private void InitBlock()
36 a_0 =
new Among[]{
new Among(
"gener", - 1, - 1,
"",
this)};
37 a_1 =
new Among[]{
new Among(
"ied", - 1, 2,
"",
this),
new Among(
"s", - 1, 3,
"",
this),
new Among(
"ies", 1, 2,
"",
this),
new Among(
"sses", 1, 1,
"",
this),
new Among(
"ss", 1, - 1,
"",
this),
new Among(
"us", 1, - 1,
"",
this)};
38 a_2 =
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)};
39 a_3 =
new Among[]{
new Among(
"ed", - 1, 2,
"",
this),
new Among(
"eed", 0, 1,
"",
this),
new Among(
"ing", - 1, 2,
"",
this),
new Among(
"edly", - 1, 2,
"",
this),
new Among(
"eedly", 3, 1,
"",
this),
new Among(
"ingly", - 1, 2,
"",
this)};
40 a_4 =
new Among[]{
new Among(
"anci", - 1, 3,
"",
this),
new Among(
"enci", - 1, 2,
"",
this),
new Among(
"ogi", - 1, 13,
"",
this),
new Among(
"li", - 1, 16,
"",
this),
new Among(
"bli", 3, 12,
"",
this),
new Among(
"abli", 4, 4,
"",
this),
new Among(
"alli", 3, 8,
"",
this),
new Among(
"fulli", 3, 14,
"",
this),
new Among(
"lessli", 3, 15,
"",
this),
new Among(
"ousli", 3, 10,
"",
this),
new Among(
"entli", 3, 5,
"",
this),
new Among(
"aliti", - 1, 8,
"",
this),
new Among(
"biliti", - 1, 12,
"",
this),
new Among(
"iviti", - 1, 11,
"",
this),
new Among(
"tional", - 1, 1,
"",
this),
new Among(
"ational", 14, 7,
"",
this),
new Among(
"alism", - 1, 8,
"",
this),
new Among(
"ation", - 1, 7,
"",
this),
new Among(
"ization", 17, 6,
"",
this),
new Among(
"izer", - 1, 6,
"",
this),
new Among(
"ator", - 1, 7,
"",
this),
new Among(
"iveness", - 1, 11,
"",
this),
new Among(
"fulness", - 1, 9,
"",
this),
new Among(
"ousness", - 1, 10,
"",
this)};
41 a_5 =
new Among[]{
new Among(
"icate", - 1, 4,
"",
this),
new Among(
"ative", - 1, 6,
"",
this),
new Among(
"alize", - 1, 3,
"",
this),
new Among(
"iciti", - 1, 4,
"",
this),
new Among(
"ical", - 1, 4,
"",
this),
new Among(
"tional", - 1, 1,
"",
this),
new Among(
"ational", 5, 2,
"",
this),
new Among(
"ful", - 1, 5,
"",
this),
new Among(
"ness", - 1, 5,
"",
this)};
42 a_6 =
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)};
43 a_7 =
new Among[]{
new Among(
"e", - 1, 1,
"",
this),
new Among(
"l", - 1, 2,
"",
this)};
44 a_8 =
new Among[]{
new Among(
"succeed", - 1, - 1,
"",
this),
new Among(
"proceed", - 1, - 1,
"",
this),
new Among(
"exceed", - 1, - 1,
"",
this),
new Among(
"canning", - 1, - 1,
"",
this),
new Among(
"inning", - 1, - 1,
"",
this),
new Among(
"earring", - 1, - 1,
"",
this),
new Among(
"herring", - 1, - 1,
"",
this),
new Among(
"outing", - 1, - 1,
"",
this)};
45 a_9 =
new Among[]{
new Among(
"andes", - 1, - 1,
"",
this),
new Among(
"atlas", - 1, - 1,
"",
this),
new Among(
"bias", - 1, - 1,
"",
this),
new Among(
"cosmos", - 1, - 1,
"",
this),
new Among(
"dying", - 1, 3,
"",
this),
new Among(
"early", - 1, 9,
"",
this),
new Among(
"gently", - 1, 7,
"",
this),
new Among(
"howe", - 1, - 1,
"",
this),
new Among(
"idly", - 1, 6,
"",
this),
new Among(
"lying", - 1, 4,
"",
this),
new Among(
"news", - 1, - 1,
"",
this),
new Among(
"only", - 1, 10,
"",
this),
new Among(
"singly", - 1, 11,
"",
this),
new Among(
"skies", - 1, 2,
"",
this),
new Among(
"skis", - 1, 1,
"",
this),
new Among(
"sky", - 1, - 1,
"",
this),
new Among(
"tying", - 1, 5,
"",
this),
new Among(
"ugly", - 1, 8,
"",
this)};
59 private static readonly
char[] g_v =
new char[]{(char) (17), (char) (65), (char) (16), (char) (1)};
60 private static readonly
char[] g_v_WXY =
new char[]{(char) (1), (char) (17), (char) (65), (char) (208), (char) (1)};
61 private static readonly
char[] g_valid_LI =
new char[]{(char) (55), (char) (141), (char) (2)};
63 private bool B_Y_found;
67 protected internal virtual void copy_from(EnglishStemmer other)
69 B_Y_found = other.B_Y_found;
72 base.copy_from(other);
75 private bool r_prelude()
98 if (!(in_grouping(g_v, 97, 121)))
130 if (!(in_grouping(g_v, 97, 121)))
187 private bool r_mark_regions()
206 if (find_among(a_0, 1) == 0)
223 if (!(in_grouping(g_v, 97, 121)))
247 if (!(out_grouping(g_v, 97, 121)))
278 if (!(in_grouping(g_v, 97, 121)))
302 if (!(out_grouping(g_v, 97, 121)))
332 private bool r_shortv()
339 v_1 = limit - cursor;
343 if (!(out_grouping_b(g_v_WXY, 89, 121)))
347 if (!(in_grouping_b(g_v, 97, 121)))
351 if (!(out_grouping_b(g_v, 97, 121)))
361 cursor = limit - v_1;
363 if (!(out_grouping_b(g_v, 97, 121)))
367 if (!(in_grouping_b(g_v, 97, 121)))
372 if (cursor > limit_backward)
386 if (!(I_p1 <= cursor))
395 if (!(I_p2 <= cursor))
402 private bool r_Step_1a()
410 among_var = find_among_b(a_1, 6);
434 v_1 = limit - cursor;
439 if (cursor <= limit_backward)
445 if (cursor > limit_backward)
457 cursor = limit - v_1;
470 if (cursor <= limit_backward)
480 if (!(in_grouping_b(g_v, 97, 121)))
490 if (cursor <= limit_backward)
506 private bool r_Step_1b()
516 among_var = find_among_b(a_3, 6);
543 v_1 = limit - cursor;
549 if (!(in_grouping_b(g_v, 97, 121)))
559 if (cursor <= limit_backward)
568 cursor = limit - v_1;
572 v_3 = limit - cursor;
574 among_var = find_among_b(a_2, 13);
579 cursor = limit - v_3;
591 insert(cursor, cursor,
"e");
601 if (cursor <= limit_backward)
620 v_4 = limit - cursor;
626 cursor = limit - v_4;
630 insert(cursor, cursor,
"e");
640 private bool r_Step_1c()
650 v_1 = limit - cursor;
654 if (!(eq_s_b(1,
"y")))
664 cursor = limit - v_1;
666 if (!(eq_s_b(1,
"Y")))
677 if (!(out_grouping_b(g_v, 97, 121)))
683 v_2 = limit - cursor;
687 if (cursor > limit_backward)
697 cursor = limit - v_2;
704 private bool r_Step_2()
711 among_var = find_among_b(a_4, 24);
804 if (!(eq_s_b(1,
"l")))
826 if (!(in_grouping_b(g_valid_LI, 99, 116)))
837 private bool r_Step_3()
844 among_var = find_among_b(a_5, 9);
906 private bool r_Step_4()
914 among_var = find_among_b(a_6, 18);
943 v_1 = limit - cursor;
947 if (!(eq_s_b(1,
"s")))
957 cursor = limit - v_1;
959 if (!(eq_s_b(1,
"t")))
975 private bool r_Step_5()
984 among_var = find_among_b(a_7, 2);
1002 v_1 = limit - cursor;
1016 cursor = limit - v_1;
1025 v_2 = limit - cursor;
1039 cursor = limit - v_2;
1056 if (!(eq_s_b(1,
"l")))
1067 private bool r_exception2()
1073 if (find_among_b(a_8, 8) == 0)
1080 if (cursor > limit_backward)
1087 private bool r_exception1()
1094 among_var = find_among(a_9, 18);
1151 slice_from(
"gentl");
1163 slice_from(
"earli");
1175 slice_from(
"singl");
1181 private bool r_postlude()
1208 if (!(eq_s(1,
"Y")))
1222 if (cursor >= limit)
1249 public override bool Stem()
1272 if (!r_exception1())
1289 if (0 > c || c > limit)
1316 if (!r_mark_regions())
1327 limit_backward = cursor; cursor = limit;
1330 v_5 = limit - cursor;
1343 cursor = limit - v_5;
1347 v_6 = limit - cursor;
1351 if (!r_exception2())
1361 cursor = limit - v_6;
1364 v_7 = limit - cursor;
1377 cursor = limit - v_7;
1379 v_8 = limit - cursor;
1392 cursor = limit - v_8;
1394 v_9 = limit - cursor;
1407 cursor = limit - v_9;
1409 v_10 = limit - cursor;
1422 cursor = limit - v_10;
1424 v_11 = limit - cursor;
1437 cursor = limit - v_11;
1439 v_12 = limit - cursor;
1452 cursor = limit - v_12;
1458 cursor = limit_backward;