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(
"", - 1, 6,
"",
this),
new Among(
"ae", 0, 2,
"",
this),
new Among(
"oe", 0, 3,
"",
this),
new Among(
"qu", 0, 5,
"",
this),
new Among(
"ue", 0, 4,
"",
this),
new Among(
"\u00DF", 0, 1,
"",
this)};
36 a_1 =
new Among[]{
new Among(
"", - 1, 6,
"",
this),
new Among(
"U", 0, 2,
"",
this),
new Among(
"Y", 0, 1,
"",
this),
new Among(
"\u00E4", 0, 3,
"",
this),
new Among(
"\u00F6", 0, 4,
"",
this),
new Among(
"\u00FC", 0, 5,
"",
this)};
37 a_2 =
new Among[]{
new Among(
"e", - 1, 1,
"",
this),
new Among(
"em", - 1, 1,
"",
this),
new Among(
"en", - 1, 1,
"",
this),
new Among(
"ern", - 1, 1,
"",
this),
new Among(
"er", - 1, 1,
"",
this),
new Among(
"s", - 1, 2,
"",
this),
new Among(
"es", 5, 1,
"",
this)};
38 a_3 =
new Among[]{
new Among(
"en", - 1, 1,
"",
this),
new Among(
"er", - 1, 1,
"",
this),
new Among(
"st", - 1, 2,
"",
this),
new Among(
"est", 2, 1,
"",
this)};
39 a_4 =
new Among[]{
new Among(
"ig", - 1, 1,
"",
this),
new Among(
"lich", - 1, 1,
"",
this)};
40 a_5 =
new Among[]{
new Among(
"end", - 1, 1,
"",
this),
new Among(
"ig", - 1, 2,
"",
this),
new Among(
"ung", - 1, 1,
"",
this),
new Among(
"lich", - 1, 3,
"",
this),
new Among(
"isch", - 1, 2,
"",
this),
new Among(
"ik", - 1, 2,
"",
this),
new Among(
"heit", - 1, 3,
"",
this),
new Among(
"keit", - 1, 4,
"",
this)};
49 private static readonly
char[] g_v =
new char[]{(char) (17), (char) (65), (char) (16), (char) (1), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (0), (char) (8), (char) (0), (char) (32), (char) (8)};
50 private static readonly
char[] g_s_ending =
new char[]{(char) (117), (char) (30), (char) (5)};
51 private static readonly
char[] g_st_ending =
new char[]{(char) (117), (char) (30), (char) (4)};
56 protected internal virtual void copy_from(German2Stemmer other)
60 base.copy_from(other);
63 private bool r_prelude()
87 if (!(in_grouping(g_v, 97, 252)))
107 if (!(in_grouping(g_v, 97, 252)))
128 if (!(in_grouping(g_v, 97, 252)))
181 among_var = find_among(a_0, 6);
203 slice_from(
"\u00E4");
209 slice_from(
"\u00F6");
215 slice_from(
"\u00FC");
223 if (0 > c || c > limit)
258 private bool r_mark_regions()
268 if (!(in_grouping(g_v, 97, 252)))
292 if (!(out_grouping(g_v, 97, 252)))
332 if (!(in_grouping(g_v, 97, 252)))
356 if (!(out_grouping(g_v, 97, 252)))
380 private bool r_postlude()
394 among_var = find_among(a_1, 6);
466 if (!(I_p1 <= cursor))
475 if (!(I_p2 <= cursor))
482 private bool r_standard_suffix()
496 v_1 = limit - cursor;
503 among_var = find_among_b(a_2, 7);
529 if (!(in_grouping_b(g_s_ending, 98, 116)))
542 cursor = limit - v_1;
544 v_2 = limit - cursor;
551 among_var = find_among_b(a_3, 4);
577 if (!(in_grouping_b(g_st_ending, 98, 116)))
584 if (limit_backward > c || c > limit)
599 cursor = limit - v_2;
601 v_3 = limit - cursor;
608 among_var = find_among_b(a_5, 8);
631 v_4 = limit - cursor;
638 if (!(eq_s_b(2,
"ig")))
640 cursor = limit - v_4;
647 v_5 = limit - cursor;
651 if (!(eq_s_b(1,
"e")))
655 cursor = limit - v_4;
662 cursor = limit - v_5;
667 cursor = limit - v_4;
683 v_6 = limit - cursor;
687 if (!(eq_s_b(1,
"e")))
697 cursor = limit - v_6;
708 v_7 = limit - cursor;
717 v_8 = limit - cursor;
721 if (!(eq_s_b(2,
"er")))
731 cursor = limit - v_8;
733 if (!(eq_s_b(2,
"en")))
735 cursor = limit - v_7;
748 cursor = limit - v_7;
765 v_9 = limit - cursor;
772 among_var = find_among_b(a_4, 2);
775 cursor = limit - v_9;
783 cursor = limit - v_9;
790 cursor = limit - v_9;
811 cursor = limit - v_3;
815 public override bool Stem()
842 if (!r_mark_regions())
853 limit_backward = cursor; cursor = limit;
855 v_3 = limit - cursor;
859 if (!r_standard_suffix())
868 cursor = limit - v_3;
869 cursor = limit_backward;