1 // This file was generated automatically by the Snowball to Java compiler
2
3 package org.tartarus.snowball.ext;
4
5 import org.tartarus.snowball.Among;
6
7 /***
8 * This class was automatically generated by a Snowball to Java compiler
9 * It implements the stemming algorithm defined by a snowball script.
10 */
11
12 public class dutchStemmer extends org.tartarus.snowball.SnowballStemmer {
13
14 private static final long serialVersionUID = 1L;
15
16 private final static dutchStemmer methodObject = new dutchStemmer ();
17
18 private final static Among a_0[] = {
19 new Among ( "", -1, 6, "", methodObject ),
20 new Among ( "\u00E1", 0, 1, "", methodObject ),
21 new Among ( "\u00E4", 0, 1, "", methodObject ),
22 new Among ( "\u00E9", 0, 2, "", methodObject ),
23 new Among ( "\u00EB", 0, 2, "", methodObject ),
24 new Among ( "\u00ED", 0, 3, "", methodObject ),
25 new Among ( "\u00EF", 0, 3, "", methodObject ),
26 new Among ( "\u00F3", 0, 4, "", methodObject ),
27 new Among ( "\u00F6", 0, 4, "", methodObject ),
28 new Among ( "\u00FA", 0, 5, "", methodObject ),
29 new Among ( "\u00FC", 0, 5, "", methodObject )
30 };
31
32 private final static Among a_1[] = {
33 new Among ( "", -1, 3, "", methodObject ),
34 new Among ( "I", 0, 2, "", methodObject ),
35 new Among ( "Y", 0, 1, "", methodObject )
36 };
37
38 private final static Among a_2[] = {
39 new Among ( "dd", -1, -1, "", methodObject ),
40 new Among ( "kk", -1, -1, "", methodObject ),
41 new Among ( "tt", -1, -1, "", methodObject )
42 };
43
44 private final static Among a_3[] = {
45 new Among ( "ene", -1, 2, "", methodObject ),
46 new Among ( "se", -1, 3, "", methodObject ),
47 new Among ( "en", -1, 2, "", methodObject ),
48 new Among ( "heden", 2, 1, "", methodObject ),
49 new Among ( "s", -1, 3, "", methodObject )
50 };
51
52 private final static Among a_4[] = {
53 new Among ( "end", -1, 1, "", methodObject ),
54 new Among ( "ig", -1, 2, "", methodObject ),
55 new Among ( "ing", -1, 1, "", methodObject ),
56 new Among ( "lijk", -1, 3, "", methodObject ),
57 new Among ( "baar", -1, 4, "", methodObject ),
58 new Among ( "bar", -1, 5, "", methodObject )
59 };
60
61 private final static Among a_5[] = {
62 new Among ( "aa", -1, -1, "", methodObject ),
63 new Among ( "ee", -1, -1, "", methodObject ),
64 new Among ( "oo", -1, -1, "", methodObject ),
65 new Among ( "uu", -1, -1, "", methodObject )
66 };
67
68 private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
69
70 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 };
71
72 private static final char g_v_j[] = {17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
73
74 private int I_p2;
75 private int I_p1;
76 private boolean B_e_found;
77
78 private void copy_from(dutchStemmer other) {
79 I_p2 = other.I_p2;
80 I_p1 = other.I_p1;
81 B_e_found = other.B_e_found;
82 super.copy_from(other);
83 }
84
85 private boolean r_prelude() {
86 int among_var;
87 int v_1;
88 int v_2;
89 int v_3;
90 int v_4;
91 int v_5;
92 int v_6;
93 // (, line 41
94 // test, line 42
95 v_1 = cursor;
96 // repeat, line 42
97 replab0: while(true)
98 {
99 v_2 = cursor;
100 lab1: do {
101 // (, line 42
102 // [, line 43
103 bra = cursor;
104 // substring, line 43
105 among_var = find_among(a_0, 11);
106 if (among_var == 0)
107 {
108 break lab1;
109 }
110 // ], line 43
111 ket = cursor;
112 switch(among_var) {
113 case 0:
114 break lab1;
115 case 1:
116 // (, line 45
117 // <-, line 45
118 slice_from("a");
119 break;
120 case 2:
121 // (, line 47
122 // <-, line 47
123 slice_from("e");
124 break;
125 case 3:
126 // (, line 49
127 // <-, line 49
128 slice_from("i");
129 break;
130 case 4:
131 // (, line 51
132 // <-, line 51
133 slice_from("o");
134 break;
135 case 5:
136 // (, line 53
137 // <-, line 53
138 slice_from("u");
139 break;
140 case 6:
141 // (, line 54
142 // next, line 54
143 if (cursor >= limit)
144 {
145 break lab1;
146 }
147 cursor++;
148 break;
149 }
150 continue replab0;
151 } while (false);
152 cursor = v_2;
153 break replab0;
154 }
155 cursor = v_1;
156 // try, line 57
157 v_3 = cursor;
158 lab2: do {
159 // (, line 57
160 // [, line 57
161 bra = cursor;
162 // literal, line 57
163 if (!(eq_s(1, "y")))
164 {
165 cursor = v_3;
166 break lab2;
167 }
168 // ], line 57
169 ket = cursor;
170 // <-, line 57
171 slice_from("Y");
172 } while (false);
173 // repeat, line 58
174 replab3: while(true)
175 {
176 v_4 = cursor;
177 lab4: do {
178 // goto, line 58
179 golab5: while(true)
180 {
181 v_5 = cursor;
182 lab6: do {
183 // (, line 58
184 if (!(in_grouping(g_v, 97, 232)))
185 {
186 break lab6;
187 }
188 // [, line 59
189 bra = cursor;
190 // or, line 59
191 lab7: do {
192 v_6 = cursor;
193 lab8: do {
194 // (, line 59
195 // literal, line 59
196 if (!(eq_s(1, "i")))
197 {
198 break lab8;
199 }
200 // ], line 59
201 ket = cursor;
202 if (!(in_grouping(g_v, 97, 232)))
203 {
204 break lab8;
205 }
206 // <-, line 59
207 slice_from("I");
208 break lab7;
209 } while (false);
210 cursor = v_6;
211 // (, line 60
212 // literal, line 60
213 if (!(eq_s(1, "y")))
214 {
215 break lab6;
216 }
217 // ], line 60
218 ket = cursor;
219 // <-, line 60
220 slice_from("Y");
221 } while (false);
222 cursor = v_5;
223 break golab5;
224 } while (false);
225 cursor = v_5;
226 if (cursor >= limit)
227 {
228 break lab4;
229 }
230 cursor++;
231 }
232 continue replab3;
233 } while (false);
234 cursor = v_4;
235 break replab3;
236 }
237 return true;
238 }
239
240 private boolean r_mark_regions() {
241 // (, line 64
242 I_p1 = limit;
243 I_p2 = limit;
244 // gopast, line 69
245 golab0: while(true)
246 {
247 lab1: do {
248 if (!(in_grouping(g_v, 97, 232)))
249 {
250 break lab1;
251 }
252 break golab0;
253 } while (false);
254 if (cursor >= limit)
255 {
256 return false;
257 }
258 cursor++;
259 }
260 // gopast, line 69
261 golab2: while(true)
262 {
263 lab3: do {
264 if (!(out_grouping(g_v, 97, 232)))
265 {
266 break lab3;
267 }
268 break golab2;
269 } while (false);
270 if (cursor >= limit)
271 {
272 return false;
273 }
274 cursor++;
275 }
276 // setmark p1, line 69
277 I_p1 = cursor;
278 // try, line 70
279 lab4: do {
280 // (, line 70
281 if (!(I_p1 < 3))
282 {
283 break lab4;
284 }
285 I_p1 = 3;
286 } while (false);
287 // gopast, line 71
288 golab5: while(true)
289 {
290 lab6: do {
291 if (!(in_grouping(g_v, 97, 232)))
292 {
293 break lab6;
294 }
295 break golab5;
296 } while (false);
297 if (cursor >= limit)
298 {
299 return false;
300 }
301 cursor++;
302 }
303 // gopast, line 71
304 golab7: while(true)
305 {
306 lab8: do {
307 if (!(out_grouping(g_v, 97, 232)))
308 {
309 break lab8;
310 }
311 break golab7;
312 } while (false);
313 if (cursor >= limit)
314 {
315 return false;
316 }
317 cursor++;
318 }
319 // setmark p2, line 71
320 I_p2 = cursor;
321 return true;
322 }
323
324 private boolean r_postlude() {
325 int among_var;
326 int v_1;
327 // repeat, line 75
328 replab0: while(true)
329 {
330 v_1 = cursor;
331 lab1: do {
332 // (, line 75
333 // [, line 77
334 bra = cursor;
335 // substring, line 77
336 among_var = find_among(a_1, 3);
337 if (among_var == 0)
338 {
339 break lab1;
340 }
341 // ], line 77
342 ket = cursor;
343 switch(among_var) {
344 case 0:
345 break lab1;
346 case 1:
347 // (, line 78
348 // <-, line 78
349 slice_from("y");
350 break;
351 case 2:
352 // (, line 79
353 // <-, line 79
354 slice_from("i");
355 break;
356 case 3:
357 // (, line 80
358 // next, line 80
359 if (cursor >= limit)
360 {
361 break lab1;
362 }
363 cursor++;
364 break;
365 }
366 continue replab0;
367 } while (false);
368 cursor = v_1;
369 break replab0;
370 }
371 return true;
372 }
373
374 private boolean r_R1() {
375 if (!(I_p1 <= cursor))
376 {
377 return false;
378 }
379 return true;
380 }
381
382 private boolean r_R2() {
383 if (!(I_p2 <= cursor))
384 {
385 return false;
386 }
387 return true;
388 }
389
390 private boolean r_undouble() {
391 int v_1;
392 // (, line 90
393 // test, line 91
394 v_1 = limit - cursor;
395 // among, line 91
396 if (find_among_b(a_2, 3) == 0)
397 {
398 return false;
399 }
400 cursor = limit - v_1;
401 // [, line 91
402 ket = cursor;
403 // next, line 91
404 if (cursor <= limit_backward)
405 {
406 return false;
407 }
408 cursor--;
409 // ], line 91
410 bra = cursor;
411 // delete, line 91
412 slice_del();
413 return true;
414 }
415
416 private boolean r_e_ending() {
417 int v_1;
418 // (, line 94
419 // unset e_found, line 95
420 B_e_found = false;
421 // [, line 96
422 ket = cursor;
423 // literal, line 96
424 if (!(eq_s_b(1, "e")))
425 {
426 return false;
427 }
428 // ], line 96
429 bra = cursor;
430 // call R1, line 96
431 if (!r_R1())
432 {
433 return false;
434 }
435 // test, line 96
436 v_1 = limit - cursor;
437 if (!(out_grouping_b(g_v, 97, 232)))
438 {
439 return false;
440 }
441 cursor = limit - v_1;
442 // delete, line 96
443 slice_del();
444 // set e_found, line 97
445 B_e_found = true;
446 // call undouble, line 98
447 if (!r_undouble())
448 {
449 return false;
450 }
451 return true;
452 }
453
454 private boolean r_en_ending() {
455 int v_1;
456 int v_2;
457 // (, line 101
458 // call R1, line 102
459 if (!r_R1())
460 {
461 return false;
462 }
463 // and, line 102
464 v_1 = limit - cursor;
465 if (!(out_grouping_b(g_v, 97, 232)))
466 {
467 return false;
468 }
469 cursor = limit - v_1;
470 // not, line 102
471 {
472 v_2 = limit - cursor;
473 lab0: do {
474 // literal, line 102
475 if (!(eq_s_b(3, "gem")))
476 {
477 break lab0;
478 }
479 return false;
480 } while (false);
481 cursor = limit - v_2;
482 }
483 // delete, line 102
484 slice_del();
485 // call undouble, line 103
486 if (!r_undouble())
487 {
488 return false;
489 }
490 return true;
491 }
492
493 private boolean r_standard_suffix() {
494 int among_var;
495 int v_1;
496 int v_2;
497 int v_3;
498 int v_4;
499 int v_5;
500 int v_6;
501 int v_7;
502 int v_8;
503 int v_9;
504 int v_10;
505 // (, line 106
506 // do, line 107
507 v_1 = limit - cursor;
508 lab0: do {
509 // (, line 107
510 // [, line 108
511 ket = cursor;
512 // substring, line 108
513 among_var = find_among_b(a_3, 5);
514 if (among_var == 0)
515 {
516 break lab0;
517 }
518 // ], line 108
519 bra = cursor;
520 switch(among_var) {
521 case 0:
522 break lab0;
523 case 1:
524 // (, line 110
525 // call R1, line 110
526 if (!r_R1())
527 {
528 break lab0;
529 }
530 // <-, line 110
531 slice_from("heid");
532 break;
533 case 2:
534 // (, line 113
535 // call en_ending, line 113
536 if (!r_en_ending())
537 {
538 break lab0;
539 }
540 break;
541 case 3:
542 // (, line 116
543 // call R1, line 116
544 if (!r_R1())
545 {
546 break lab0;
547 }
548 if (!(out_grouping_b(g_v_j, 97, 232)))
549 {
550 break lab0;
551 }
552 // delete, line 116
553 slice_del();
554 break;
555 }
556 } while (false);
557 cursor = limit - v_1;
558 // do, line 120
559 v_2 = limit - cursor;
560 lab1: do {
561 // call e_ending, line 120
562 if (!r_e_ending())
563 {
564 break lab1;
565 }
566 } while (false);
567 cursor = limit - v_2;
568 // do, line 122
569 v_3 = limit - cursor;
570 lab2: do {
571 // (, line 122
572 // [, line 122
573 ket = cursor;
574 // literal, line 122
575 if (!(eq_s_b(4, "heid")))
576 {
577 break lab2;
578 }
579 // ], line 122
580 bra = cursor;
581 // call R2, line 122
582 if (!r_R2())
583 {
584 break lab2;
585 }
586 // not, line 122
587 {
588 v_4 = limit - cursor;
589 lab3: do {
590 // literal, line 122
591 if (!(eq_s_b(1, "c")))
592 {
593 break lab3;
594 }
595 break lab2;
596 } while (false);
597 cursor = limit - v_4;
598 }
599 // delete, line 122
600 slice_del();
601 // [, line 123
602 ket = cursor;
603 // literal, line 123
604 if (!(eq_s_b(2, "en")))
605 {
606 break lab2;
607 }
608 // ], line 123
609 bra = cursor;
610 // call en_ending, line 123
611 if (!r_en_ending())
612 {
613 break lab2;
614 }
615 } while (false);
616 cursor = limit - v_3;
617 // do, line 126
618 v_5 = limit - cursor;
619 lab4: do {
620 // (, line 126
621 // [, line 127
622 ket = cursor;
623 // substring, line 127
624 among_var = find_among_b(a_4, 6);
625 if (among_var == 0)
626 {
627 break lab4;
628 }
629 // ], line 127
630 bra = cursor;
631 switch(among_var) {
632 case 0:
633 break lab4;
634 case 1:
635 // (, line 129
636 // call R2, line 129
637 if (!r_R2())
638 {
639 break lab4;
640 }
641 // delete, line 129
642 slice_del();
643 // or, line 130
644 lab5: do {
645 v_6 = limit - cursor;
646 lab6: do {
647 // (, line 130
648 // [, line 130
649 ket = cursor;
650 // literal, line 130
651 if (!(eq_s_b(2, "ig")))
652 {
653 break lab6;
654 }
655 // ], line 130
656 bra = cursor;
657 // call R2, line 130
658 if (!r_R2())
659 {
660 break lab6;
661 }
662 // not, line 130
663 {
664 v_7 = limit - cursor;
665 lab7: do {
666 // literal, line 130
667 if (!(eq_s_b(1, "e")))
668 {
669 break lab7;
670 }
671 break lab6;
672 } while (false);
673 cursor = limit - v_7;
674 }
675 // delete, line 130
676 slice_del();
677 break lab5;
678 } while (false);
679 cursor = limit - v_6;
680 // call undouble, line 130
681 if (!r_undouble())
682 {
683 break lab4;
684 }
685 } while (false);
686 break;
687 case 2:
688 // (, line 133
689 // call R2, line 133
690 if (!r_R2())
691 {
692 break lab4;
693 }
694 // not, line 133
695 {
696 v_8 = limit - cursor;
697 lab8: do {
698 // literal, line 133
699 if (!(eq_s_b(1, "e")))
700 {
701 break lab8;
702 }
703 break lab4;
704 } while (false);
705 cursor = limit - v_8;
706 }
707 // delete, line 133
708 slice_del();
709 break;
710 case 3:
711 // (, line 136
712 // call R2, line 136
713 if (!r_R2())
714 {
715 break lab4;
716 }
717 // delete, line 136
718 slice_del();
719 // call e_ending, line 136
720 if (!r_e_ending())
721 {
722 break lab4;
723 }
724 break;
725 case 4:
726 // (, line 139
727 // call R2, line 139
728 if (!r_R2())
729 {
730 break lab4;
731 }
732 // delete, line 139
733 slice_del();
734 break;
735 case 5:
736 // (, line 142
737 // call R2, line 142
738 if (!r_R2())
739 {
740 break lab4;
741 }
742 // Boolean test e_found, line 142
743 if (!(B_e_found))
744 {
745 break lab4;
746 }
747 // delete, line 142
748 slice_del();
749 break;
750 }
751 } while (false);
752 cursor = limit - v_5;
753 // do, line 146
754 v_9 = limit - cursor;
755 lab9: do {
756 // (, line 146
757 if (!(out_grouping_b(g_v_I, 73, 232)))
758 {
759 break lab9;
760 }
761 // test, line 148
762 v_10 = limit - cursor;
763 // (, line 148
764 // among, line 149
765 if (find_among_b(a_5, 4) == 0)
766 {
767 break lab9;
768 }
769 if (!(out_grouping_b(g_v, 97, 232)))
770 {
771 break lab9;
772 }
773 cursor = limit - v_10;
774 // [, line 152
775 ket = cursor;
776 // next, line 152
777 if (cursor <= limit_backward)
778 {
779 break lab9;
780 }
781 cursor--;
782 // ], line 152
783 bra = cursor;
784 // delete, line 152
785 slice_del();
786 } while (false);
787 cursor = limit - v_9;
788 return true;
789 }
790
791 public boolean stem() {
792 int v_1;
793 int v_2;
794 int v_3;
795 int v_4;
796 // (, line 157
797 // do, line 159
798 v_1 = cursor;
799 lab0: do {
800 // call prelude, line 159
801 if (!r_prelude())
802 {
803 break lab0;
804 }
805 } while (false);
806 cursor = v_1;
807 // do, line 160
808 v_2 = cursor;
809 lab1: do {
810 // call mark_regions, line 160
811 if (!r_mark_regions())
812 {
813 break lab1;
814 }
815 } while (false);
816 cursor = v_2;
817 // backwards, line 161
818 limit_backward = cursor; cursor = limit;
819 // do, line 162
820 v_3 = limit - cursor;
821 lab2: do {
822 // call standard_suffix, line 162
823 if (!r_standard_suffix())
824 {
825 break lab2;
826 }
827 } while (false);
828 cursor = limit - v_3;
829 cursor = limit_backward; // do, line 163
830 v_4 = cursor;
831 lab3: do {
832 // call postlude, line 163
833 if (!r_postlude())
834 {
835 break lab3;
836 }
837 } while (false);
838 cursor = v_4;
839 return true;
840 }
841
842 public boolean equals( Object o ) {
843 return o instanceof dutchStemmer;
844 }
845
846 public int hashCode() {
847 return dutchStemmer.class.getName().hashCode();
848 }
849
850
851
852 }
853