Initial import into git.
[galago.git] / java / galago / src / org / tartarus / snowball / ext / dutchStemmer.java
blob1b9b4268e5b9d403f554d8e49ca7ec81c96db5e1
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;
7 /**
8 * Generated class implementing code defined by a snowball script.
9 */
10 public class dutchStemmer extends SnowballProgram {
12 private Among a_0[] = {
13 new Among ( "", -1, 6, "", this),
14 new Among ( "\u00E1", 0, 1, "", this),
15 new Among ( "\u00E4", 0, 1, "", this),
16 new Among ( "\u00E9", 0, 2, "", this),
17 new Among ( "\u00EB", 0, 2, "", this),
18 new Among ( "\u00ED", 0, 3, "", this),
19 new Among ( "\u00EF", 0, 3, "", this),
20 new Among ( "\u00F3", 0, 4, "", this),
21 new Among ( "\u00F6", 0, 4, "", this),
22 new Among ( "\u00FA", 0, 5, "", this),
23 new Among ( "\u00FC", 0, 5, "", this)
26 private Among a_1[] = {
27 new Among ( "", -1, 3, "", this),
28 new Among ( "I", 0, 2, "", this),
29 new Among ( "Y", 0, 1, "", this)
32 private Among a_2[] = {
33 new Among ( "dd", -1, -1, "", this),
34 new Among ( "kk", -1, -1, "", this),
35 new Among ( "tt", -1, -1, "", this)
38 private Among a_3[] = {
39 new Among ( "ene", -1, 2, "", this),
40 new Among ( "se", -1, 3, "", this),
41 new Among ( "en", -1, 2, "", this),
42 new Among ( "heden", 2, 1, "", this),
43 new Among ( "s", -1, 3, "", this)
46 private Among a_4[] = {
47 new Among ( "end", -1, 1, "", this),
48 new Among ( "ig", -1, 2, "", this),
49 new Among ( "ing", -1, 1, "", this),
50 new Among ( "lijk", -1, 3, "", this),
51 new Among ( "baar", -1, 4, "", this),
52 new Among ( "bar", -1, 5, "", this)
55 private Among a_5[] = {
56 new Among ( "aa", -1, -1, "", this),
57 new Among ( "ee", -1, -1, "", this),
58 new Among ( "oo", -1, -1, "", this),
59 new Among ( "uu", -1, -1, "", this)
62 private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
64 private static final char g_v_I[] = {1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
66 private static final char g_v_j[] = {17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
68 private int I_p2;
69 private int I_p1;
70 private boolean B_e_found;
72 private void copy_from(dutchStemmer other) {
73 I_p2 = other.I_p2;
74 I_p1 = other.I_p1;
75 B_e_found = other.B_e_found;
76 super.copy_from(other);
79 private boolean r_prelude() {
80 int among_var;
81 int v_1;
82 int v_2;
83 int v_3;
84 int v_4;
85 int v_5;
86 int v_6;
87 // (, line 41
88 // test, line 42
89 v_1 = cursor;
90 // repeat, line 42
91 replab0: while(true)
93 v_2 = cursor;
94 lab1: do {
95 // (, line 42
96 // [, line 43
97 bra = cursor;
98 // substring, line 43
99 among_var = find_among(a_0, 11);
100 if (among_var == 0)
102 break lab1;
104 // ], line 43
105 ket = cursor;
106 switch(among_var) {
107 case 0:
108 break lab1;
109 case 1:
110 // (, line 45
111 // <-, line 45
112 slice_from("a");
113 break;
114 case 2:
115 // (, line 47
116 // <-, line 47
117 slice_from("e");
118 break;
119 case 3:
120 // (, line 49
121 // <-, line 49
122 slice_from("i");
123 break;
124 case 4:
125 // (, line 51
126 // <-, line 51
127 slice_from("o");
128 break;
129 case 5:
130 // (, line 53
131 // <-, line 53
132 slice_from("u");
133 break;
134 case 6:
135 // (, line 54
136 // next, line 54
137 if (cursor >= limit)
139 break lab1;
141 cursor++;
142 break;
144 continue replab0;
145 } while (false);
146 cursor = v_2;
147 break replab0;
149 cursor = v_1;
150 // try, line 57
151 v_3 = cursor;
152 lab2: do {
153 // (, line 57
154 // [, line 57
155 bra = cursor;
156 // literal, line 57
157 if (!(eq_s(1, "y")))
159 cursor = v_3;
160 break lab2;
162 // ], line 57
163 ket = cursor;
164 // <-, line 57
165 slice_from("Y");
166 } while (false);
167 // repeat, line 58
168 replab3: while(true)
170 v_4 = cursor;
171 lab4: do {
172 // goto, line 58
173 golab5: while(true)
175 v_5 = cursor;
176 lab6: do {
177 // (, line 58
178 if (!(in_grouping(g_v, 97, 232)))
180 break lab6;
182 // [, line 59
183 bra = cursor;
184 // or, line 59
185 lab7: do {
186 v_6 = cursor;
187 lab8: do {
188 // (, line 59
189 // literal, line 59
190 if (!(eq_s(1, "i")))
192 break lab8;
194 // ], line 59
195 ket = cursor;
196 if (!(in_grouping(g_v, 97, 232)))
198 break lab8;
200 // <-, line 59
201 slice_from("I");
202 break lab7;
203 } while (false);
204 cursor = v_6;
205 // (, line 60
206 // literal, line 60
207 if (!(eq_s(1, "y")))
209 break lab6;
211 // ], line 60
212 ket = cursor;
213 // <-, line 60
214 slice_from("Y");
215 } while (false);
216 cursor = v_5;
217 break golab5;
218 } while (false);
219 cursor = v_5;
220 if (cursor >= limit)
222 break lab4;
224 cursor++;
226 continue replab3;
227 } while (false);
228 cursor = v_4;
229 break replab3;
231 return true;
234 private boolean r_mark_regions() {
235 // (, line 64
236 I_p1 = limit;
237 I_p2 = limit;
238 // gopast, line 69
239 golab0: while(true)
241 lab1: do {
242 if (!(in_grouping(g_v, 97, 232)))
244 break lab1;
246 break golab0;
247 } while (false);
248 if (cursor >= limit)
250 return false;
252 cursor++;
254 // gopast, line 69
255 golab2: while(true)
257 lab3: do {
258 if (!(out_grouping(g_v, 97, 232)))
260 break lab3;
262 break golab2;
263 } while (false);
264 if (cursor >= limit)
266 return false;
268 cursor++;
270 // setmark p1, line 69
271 I_p1 = cursor;
272 // try, line 70
273 lab4: do {
274 // (, line 70
275 if (!(I_p1 < 3))
277 break lab4;
279 I_p1 = 3;
280 } while (false);
281 // gopast, line 71
282 golab5: while(true)
284 lab6: do {
285 if (!(in_grouping(g_v, 97, 232)))
287 break lab6;
289 break golab5;
290 } while (false);
291 if (cursor >= limit)
293 return false;
295 cursor++;
297 // gopast, line 71
298 golab7: while(true)
300 lab8: do {
301 if (!(out_grouping(g_v, 97, 232)))
303 break lab8;
305 break golab7;
306 } while (false);
307 if (cursor >= limit)
309 return false;
311 cursor++;
313 // setmark p2, line 71
314 I_p2 = cursor;
315 return true;
318 private boolean r_postlude() {
319 int among_var;
320 int v_1;
321 // repeat, line 75
322 replab0: while(true)
324 v_1 = cursor;
325 lab1: do {
326 // (, line 75
327 // [, line 77
328 bra = cursor;
329 // substring, line 77
330 among_var = find_among(a_1, 3);
331 if (among_var == 0)
333 break lab1;
335 // ], line 77
336 ket = cursor;
337 switch(among_var) {
338 case 0:
339 break lab1;
340 case 1:
341 // (, line 78
342 // <-, line 78
343 slice_from("y");
344 break;
345 case 2:
346 // (, line 79
347 // <-, line 79
348 slice_from("i");
349 break;
350 case 3:
351 // (, line 80
352 // next, line 80
353 if (cursor >= limit)
355 break lab1;
357 cursor++;
358 break;
360 continue replab0;
361 } while (false);
362 cursor = v_1;
363 break replab0;
365 return true;
368 private boolean r_R1() {
369 if (!(I_p1 <= cursor))
371 return false;
373 return true;
376 private boolean r_R2() {
377 if (!(I_p2 <= cursor))
379 return false;
381 return true;
384 private boolean r_undouble() {
385 int v_1;
386 // (, line 90
387 // test, line 91
388 v_1 = limit - cursor;
389 // among, line 91
390 if (find_among_b(a_2, 3) == 0)
392 return false;
394 cursor = limit - v_1;
395 // [, line 91
396 ket = cursor;
397 // next, line 91
398 if (cursor <= limit_backward)
400 return false;
402 cursor--;
403 // ], line 91
404 bra = cursor;
405 // delete, line 91
406 slice_del();
407 return true;
410 private boolean r_e_ending() {
411 int v_1;
412 // (, line 94
413 // unset e_found, line 95
414 B_e_found = false;
415 // [, line 96
416 ket = cursor;
417 // literal, line 96
418 if (!(eq_s_b(1, "e")))
420 return false;
422 // ], line 96
423 bra = cursor;
424 // call R1, line 96
425 if (!r_R1())
427 return false;
429 // test, line 96
430 v_1 = limit - cursor;
431 if (!(out_grouping_b(g_v, 97, 232)))
433 return false;
435 cursor = limit - v_1;
436 // delete, line 96
437 slice_del();
438 // set e_found, line 97
439 B_e_found = true;
440 // call undouble, line 98
441 if (!r_undouble())
443 return false;
445 return true;
448 private boolean r_en_ending() {
449 int v_1;
450 int v_2;
451 // (, line 101
452 // call R1, line 102
453 if (!r_R1())
455 return false;
457 // and, line 102
458 v_1 = limit - cursor;
459 if (!(out_grouping_b(g_v, 97, 232)))
461 return false;
463 cursor = limit - v_1;
464 // not, line 102
466 v_2 = limit - cursor;
467 lab0: do {
468 // literal, line 102
469 if (!(eq_s_b(3, "gem")))
471 break lab0;
473 return false;
474 } while (false);
475 cursor = limit - v_2;
477 // delete, line 102
478 slice_del();
479 // call undouble, line 103
480 if (!r_undouble())
482 return false;
484 return true;
487 private boolean r_standard_suffix() {
488 int among_var;
489 int v_1;
490 int v_2;
491 int v_3;
492 int v_4;
493 int v_5;
494 int v_6;
495 int v_7;
496 int v_8;
497 int v_9;
498 int v_10;
499 // (, line 106
500 // do, line 107
501 v_1 = limit - cursor;
502 lab0: do {
503 // (, line 107
504 // [, line 108
505 ket = cursor;
506 // substring, line 108
507 among_var = find_among_b(a_3, 5);
508 if (among_var == 0)
510 break lab0;
512 // ], line 108
513 bra = cursor;
514 switch(among_var) {
515 case 0:
516 break lab0;
517 case 1:
518 // (, line 110
519 // call R1, line 110
520 if (!r_R1())
522 break lab0;
524 // <-, line 110
525 slice_from("heid");
526 break;
527 case 2:
528 // (, line 113
529 // call en_ending, line 113
530 if (!r_en_ending())
532 break lab0;
534 break;
535 case 3:
536 // (, line 116
537 // call R1, line 116
538 if (!r_R1())
540 break lab0;
542 if (!(out_grouping_b(g_v_j, 97, 232)))
544 break lab0;
546 // delete, line 116
547 slice_del();
548 break;
550 } while (false);
551 cursor = limit - v_1;
552 // do, line 120
553 v_2 = limit - cursor;
554 lab1: do {
555 // call e_ending, line 120
556 if (!r_e_ending())
558 break lab1;
560 } while (false);
561 cursor = limit - v_2;
562 // do, line 122
563 v_3 = limit - cursor;
564 lab2: do {
565 // (, line 122
566 // [, line 122
567 ket = cursor;
568 // literal, line 122
569 if (!(eq_s_b(4, "heid")))
571 break lab2;
573 // ], line 122
574 bra = cursor;
575 // call R2, line 122
576 if (!r_R2())
578 break lab2;
580 // not, line 122
582 v_4 = limit - cursor;
583 lab3: do {
584 // literal, line 122
585 if (!(eq_s_b(1, "c")))
587 break lab3;
589 break lab2;
590 } while (false);
591 cursor = limit - v_4;
593 // delete, line 122
594 slice_del();
595 // [, line 123
596 ket = cursor;
597 // literal, line 123
598 if (!(eq_s_b(2, "en")))
600 break lab2;
602 // ], line 123
603 bra = cursor;
604 // call en_ending, line 123
605 if (!r_en_ending())
607 break lab2;
609 } while (false);
610 cursor = limit - v_3;
611 // do, line 126
612 v_5 = limit - cursor;
613 lab4: do {
614 // (, line 126
615 // [, line 127
616 ket = cursor;
617 // substring, line 127
618 among_var = find_among_b(a_4, 6);
619 if (among_var == 0)
621 break lab4;
623 // ], line 127
624 bra = cursor;
625 switch(among_var) {
626 case 0:
627 break lab4;
628 case 1:
629 // (, line 129
630 // call R2, line 129
631 if (!r_R2())
633 break lab4;
635 // delete, line 129
636 slice_del();
637 // or, line 130
638 lab5: do {
639 v_6 = limit - cursor;
640 lab6: do {
641 // (, line 130
642 // [, line 130
643 ket = cursor;
644 // literal, line 130
645 if (!(eq_s_b(2, "ig")))
647 break lab6;
649 // ], line 130
650 bra = cursor;
651 // call R2, line 130
652 if (!r_R2())
654 break lab6;
656 // not, line 130
658 v_7 = limit - cursor;
659 lab7: do {
660 // literal, line 130
661 if (!(eq_s_b(1, "e")))
663 break lab7;
665 break lab6;
666 } while (false);
667 cursor = limit - v_7;
669 // delete, line 130
670 slice_del();
671 break lab5;
672 } while (false);
673 cursor = limit - v_6;
674 // call undouble, line 130
675 if (!r_undouble())
677 break lab4;
679 } while (false);
680 break;
681 case 2:
682 // (, line 133
683 // call R2, line 133
684 if (!r_R2())
686 break lab4;
688 // not, line 133
690 v_8 = limit - cursor;
691 lab8: do {
692 // literal, line 133
693 if (!(eq_s_b(1, "e")))
695 break lab8;
697 break lab4;
698 } while (false);
699 cursor = limit - v_8;
701 // delete, line 133
702 slice_del();
703 break;
704 case 3:
705 // (, line 136
706 // call R2, line 136
707 if (!r_R2())
709 break lab4;
711 // delete, line 136
712 slice_del();
713 // call e_ending, line 136
714 if (!r_e_ending())
716 break lab4;
718 break;
719 case 4:
720 // (, line 139
721 // call R2, line 139
722 if (!r_R2())
724 break lab4;
726 // delete, line 139
727 slice_del();
728 break;
729 case 5:
730 // (, line 142
731 // call R2, line 142
732 if (!r_R2())
734 break lab4;
736 // Boolean test e_found, line 142
737 if (!(B_e_found))
739 break lab4;
741 // delete, line 142
742 slice_del();
743 break;
745 } while (false);
746 cursor = limit - v_5;
747 // do, line 146
748 v_9 = limit - cursor;
749 lab9: do {
750 // (, line 146
751 if (!(out_grouping_b(g_v_I, 73, 232)))
753 break lab9;
755 // test, line 148
756 v_10 = limit - cursor;
757 // (, line 148
758 // among, line 149
759 if (find_among_b(a_5, 4) == 0)
761 break lab9;
763 if (!(out_grouping_b(g_v, 97, 232)))
765 break lab9;
767 cursor = limit - v_10;
768 // [, line 152
769 ket = cursor;
770 // next, line 152
771 if (cursor <= limit_backward)
773 break lab9;
775 cursor--;
776 // ], line 152
777 bra = cursor;
778 // delete, line 152
779 slice_del();
780 } while (false);
781 cursor = limit - v_9;
782 return true;
785 public boolean stem() {
786 int v_1;
787 int v_2;
788 int v_3;
789 int v_4;
790 // (, line 157
791 // do, line 159
792 v_1 = cursor;
793 lab0: do {
794 // call prelude, line 159
795 if (!r_prelude())
797 break lab0;
799 } while (false);
800 cursor = v_1;
801 // do, line 160
802 v_2 = cursor;
803 lab1: do {
804 // call mark_regions, line 160
805 if (!r_mark_regions())
807 break lab1;
809 } while (false);
810 cursor = v_2;
811 // backwards, line 161
812 limit_backward = cursor; cursor = limit;
813 // do, line 162
814 v_3 = limit - cursor;
815 lab2: do {
816 // call standard_suffix, line 162
817 if (!r_standard_suffix())
819 break lab2;
821 } while (false);
822 cursor = limit - v_3;
823 cursor = limit_backward; // do, line 163
824 v_4 = cursor;
825 lab3: do {
826 // call postlude, line 163
827 if (!r_postlude())
829 break lab3;
831 } while (false);
832 cursor = v_4;
833 return true;