1 // This file was generated automatically by the Snowball to Java compiler
3 package org.tartarus.snowball.ext;
4 import org.tartarus.snowball.SnowballProgram;
5 import org.tartarus.snowball.Among;
8 * Generated class implementing code defined by a snowball script.
10 public class German2Stemmer extends SnowballProgram {
12 private Among a_0[] = {
13 new Among ( "", -1, 6, "", this),
14 new Among ( "ae", 0, 2, "", this),
15 new Among ( "oe", 0, 3, "", this),
16 new Among ( "qu", 0, 5, "", this),
17 new Among ( "ue", 0, 4, "", this),
18 new Among ( "\u00DF", 0, 1, "", this)
21 private Among a_1[] = {
22 new Among ( "", -1, 6, "", this),
23 new Among ( "U", 0, 2, "", this),
24 new Among ( "Y", 0, 1, "", this),
25 new Among ( "\u00E4", 0, 3, "", this),
26 new Among ( "\u00F6", 0, 4, "", this),
27 new Among ( "\u00FC", 0, 5, "", this)
30 private Among a_2[] = {
31 new Among ( "e", -1, 1, "", this),
32 new Among ( "em", -1, 1, "", this),
33 new Among ( "en", -1, 1, "", this),
34 new Among ( "ern", -1, 1, "", this),
35 new Among ( "er", -1, 1, "", this),
36 new Among ( "s", -1, 2, "", this),
37 new Among ( "es", 5, 1, "", this)
40 private Among a_3[] = {
41 new Among ( "en", -1, 1, "", this),
42 new Among ( "er", -1, 1, "", this),
43 new Among ( "st", -1, 2, "", this),
44 new Among ( "est", 2, 1, "", this)
47 private Among a_4[] = {
48 new Among ( "ig", -1, 1, "", this),
49 new Among ( "lich", -1, 1, "", this)
52 private Among a_5[] = {
53 new Among ( "end", -1, 1, "", this),
54 new Among ( "ig", -1, 2, "", this),
55 new Among ( "ung", -1, 1, "", this),
56 new Among ( "lich", -1, 3, "", this),
57 new Among ( "isch", -1, 2, "", this),
58 new Among ( "ik", -1, 2, "", this),
59 new Among ( "heit", -1, 3, "", this),
60 new Among ( "keit", -1, 4, "", this)
63 private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
65 private static final char g_s_ending[] = {117, 30, 5 };
67 private static final char g_st_ending[] = {117, 30, 4 };
73 private void copy_from(German2Stemmer other) {
77 super.copy_from(other);
80 private boolean r_prelude() {
101 if (!(in_grouping(g_v, 97, 252)))
119 if (!(in_grouping(g_v, 97, 252)))
136 if (!(in_grouping(g_v, 97, 252)))
167 // substring, line 36
168 among_var = find_among(a_0, 6);
186 slice_from("\u00E4");
191 slice_from("\u00F6");
196 slice_from("\u00FC");
203 if (0 > c || c > limit)
228 private boolean r_mark_regions() {
239 if (0 > c || c > limit)
245 // setmark x, line 53
252 if (!(in_grouping(g_v, 97, 252)))
268 if (!(out_grouping(g_v, 97, 252)))
280 // setmark p1, line 55
295 if (!(in_grouping(g_v, 97, 252)))
311 if (!(out_grouping(g_v, 97, 252)))
323 // setmark p2, line 57
328 private boolean r_postlude() {
339 // substring, line 63
340 among_var = find_among(a_1, 6);
393 private boolean r_R1() {
394 if (!(I_p1 <= cursor))
401 private boolean r_R2() {
402 if (!(I_p2 <= cursor))
409 private boolean r_standard_suffix() {
422 v_1 = limit - cursor;
427 // substring, line 81
428 among_var = find_among_b(a_2, 7);
450 if (!(in_grouping_b(g_s_ending, 98, 116)))
459 cursor = limit - v_1;
461 v_2 = limit - cursor;
466 // substring, line 91
467 among_var = find_among_b(a_3, 4);
489 if (!(in_grouping_b(g_st_ending, 98, 116)))
496 if (limit_backward > c || c > limit)
507 cursor = limit - v_2;
509 v_3 = limit - cursor;
514 // substring, line 101
515 among_var = find_among_b(a_5, 8);
535 v_4 = limit - cursor;
541 if (!(eq_s_b(2, "ig")))
543 cursor = limit - v_4;
550 v_5 = limit - cursor;
553 if (!(eq_s_b(1, "e")))
557 cursor = limit - v_4;
560 cursor = limit - v_5;
565 cursor = limit - v_4;
576 v_6 = limit - cursor;
579 if (!(eq_s_b(1, "e")))
585 cursor = limit - v_6;
595 v_7 = limit - cursor;
602 v_8 = limit - cursor;
605 if (!(eq_s_b(2, "er")))
611 cursor = limit - v_8;
613 if (!(eq_s_b(2, "en")))
615 cursor = limit - v_7;
624 cursor = limit - v_7;
636 v_9 = limit - cursor;
641 // substring, line 118
642 among_var = find_among_b(a_4, 2);
645 cursor = limit - v_9;
653 cursor = limit - v_9;
658 cursor = limit - v_9;
670 cursor = limit - v_3;
674 public boolean stem() {
683 // call prelude, line 131
693 // call mark_regions, line 132
694 if (!r_mark_regions())
700 // backwards, line 133
701 limit_backward = cursor; cursor = limit;
703 v_3 = limit - cursor;
705 // call standard_suffix, line 134
706 if (!r_standard_suffix())
711 cursor = limit - v_3;
712 cursor = limit_backward; // do, line 135
715 // call postlude, line 135