001: // This file was generated automatically by the Snowball to Java compiler
002:
003: package net.sf.snowball.ext;
004:
005: import net.sf.snowball.SnowballProgram;
006: import net.sf.snowball.Among;
007:
008: /**
009: * Generated class implementing code defined by a snowball script.
010: */
011: public class DutchStemmer extends SnowballProgram {
012:
013: private Among a_0[] = { new Among("", -1, 6, "", this ),
014: new Among("\u00E1", 0, 1, "", this ),
015: new Among("\u00E4", 0, 1, "", this ),
016: new Among("\u00E9", 0, 2, "", this ),
017: new Among("\u00EB", 0, 2, "", this ),
018: new Among("\u00ED", 0, 3, "", this ),
019: new Among("\u00EF", 0, 3, "", this ),
020: new Among("\u00F3", 0, 4, "", this ),
021: new Among("\u00F6", 0, 4, "", this ),
022: new Among("\u00FA", 0, 5, "", this ),
023: new Among("\u00FC", 0, 5, "", this ) };
024:
025: private Among a_1[] = { new Among("", -1, 3, "", this ),
026: new Among("I", 0, 2, "", this ),
027: new Among("Y", 0, 1, "", this ) };
028:
029: private Among a_2[] = { new Among("dd", -1, -1, "", this ),
030: new Among("kk", -1, -1, "", this ),
031: new Among("tt", -1, -1, "", this ) };
032:
033: private Among a_3[] = { new Among("ene", -1, 2, "", this ),
034: new Among("se", -1, 3, "", this ),
035: new Among("en", -1, 2, "", this ),
036: new Among("heden", 2, 1, "", this ),
037: new Among("s", -1, 3, "", this ) };
038:
039: private Among a_4[] = { new Among("end", -1, 1, "", this ),
040: new Among("ig", -1, 2, "", this ),
041: new Among("ing", -1, 1, "", this ),
042: new Among("lijk", -1, 3, "", this ),
043: new Among("baar", -1, 4, "", this ),
044: new Among("bar", -1, 5, "", this ) };
045:
046: private Among a_5[] = { new Among("aa", -1, -1, "", this ),
047: new Among("ee", -1, -1, "", this ),
048: new Among("oo", -1, -1, "", this ),
049: new Among("uu", -1, -1, "", this ) };
050:
051: private static final char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0,
052: 0, 0, 0, 0, 0, 0, 0, 128 };
053:
054: private static final char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0,
055: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
056:
057: private static final char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0,
058: 0, 0, 0, 0, 0, 0, 0, 128 };
059:
060: private int I_p2;
061: private int I_p1;
062: private boolean B_e_found;
063:
064: private void copy_from(DutchStemmer other) {
065: I_p2 = other.I_p2;
066: I_p1 = other.I_p1;
067: B_e_found = other.B_e_found;
068: super .copy_from(other);
069: }
070:
071: private boolean r_prelude() {
072: int among_var;
073: int v_1;
074: int v_2;
075: int v_3;
076: int v_4;
077: int v_5;
078: int v_6;
079: // (, line 41
080: // test, line 42
081: v_1 = cursor;
082: // repeat, line 42
083: replab0: while (true) {
084: v_2 = cursor;
085: lab1: do {
086: // (, line 42
087: // [, line 43
088: bra = cursor;
089: // substring, line 43
090: among_var = find_among(a_0, 11);
091: if (among_var == 0) {
092: break lab1;
093: }
094: // ], line 43
095: ket = cursor;
096: switch (among_var) {
097: case 0:
098: break lab1;
099: case 1:
100: // (, line 45
101: // <-, line 45
102: slice_from("a");
103: break;
104: case 2:
105: // (, line 47
106: // <-, line 47
107: slice_from("e");
108: break;
109: case 3:
110: // (, line 49
111: // <-, line 49
112: slice_from("i");
113: break;
114: case 4:
115: // (, line 51
116: // <-, line 51
117: slice_from("o");
118: break;
119: case 5:
120: // (, line 53
121: // <-, line 53
122: slice_from("u");
123: break;
124: case 6:
125: // (, line 54
126: // next, line 54
127: if (cursor >= limit) {
128: break lab1;
129: }
130: cursor++;
131: break;
132: }
133: continue replab0;
134: } while (false);
135: cursor = v_2;
136: break replab0;
137: }
138: cursor = v_1;
139: // try, line 57
140: v_3 = cursor;
141: lab2: do {
142: // (, line 57
143: // [, line 57
144: bra = cursor;
145: // literal, line 57
146: if (!(eq_s(1, "y"))) {
147: cursor = v_3;
148: break lab2;
149: }
150: // ], line 57
151: ket = cursor;
152: // <-, line 57
153: slice_from("Y");
154: } while (false);
155: // repeat, line 58
156: replab3: while (true) {
157: v_4 = cursor;
158: lab4: do {
159: // goto, line 58
160: golab5: while (true) {
161: v_5 = cursor;
162: lab6: do {
163: // (, line 58
164: if (!(in_grouping(g_v, 97, 232))) {
165: break lab6;
166: }
167: // [, line 59
168: bra = cursor;
169: // or, line 59
170: lab7: do {
171: v_6 = cursor;
172: lab8: do {
173: // (, line 59
174: // literal, line 59
175: if (!(eq_s(1, "i"))) {
176: break lab8;
177: }
178: // ], line 59
179: ket = cursor;
180: if (!(in_grouping(g_v, 97, 232))) {
181: break lab8;
182: }
183: // <-, line 59
184: slice_from("I");
185: break lab7;
186: } while (false);
187: cursor = v_6;
188: // (, line 60
189: // literal, line 60
190: if (!(eq_s(1, "y"))) {
191: break lab6;
192: }
193: // ], line 60
194: ket = cursor;
195: // <-, line 60
196: slice_from("Y");
197: } while (false);
198: cursor = v_5;
199: break golab5;
200: } while (false);
201: cursor = v_5;
202: if (cursor >= limit) {
203: break lab4;
204: }
205: cursor++;
206: }
207: continue replab3;
208: } while (false);
209: cursor = v_4;
210: break replab3;
211: }
212: return true;
213: }
214:
215: private boolean r_mark_regions() {
216: // (, line 64
217: I_p1 = limit;
218: I_p2 = limit;
219: // gopast, line 69
220: golab0: while (true) {
221: lab1: do {
222: if (!(in_grouping(g_v, 97, 232))) {
223: break lab1;
224: }
225: break golab0;
226: } while (false);
227: if (cursor >= limit) {
228: return false;
229: }
230: cursor++;
231: }
232: // gopast, line 69
233: golab2: while (true) {
234: lab3: do {
235: if (!(out_grouping(g_v, 97, 232))) {
236: break lab3;
237: }
238: break golab2;
239: } while (false);
240: if (cursor >= limit) {
241: return false;
242: }
243: cursor++;
244: }
245: // setmark p1, line 69
246: I_p1 = cursor;
247: // try, line 70
248: lab4: do {
249: // (, line 70
250: if (!(I_p1 < 3)) {
251: break lab4;
252: }
253: I_p1 = 3;
254: } while (false);
255: // gopast, line 71
256: golab5: while (true) {
257: lab6: do {
258: if (!(in_grouping(g_v, 97, 232))) {
259: break lab6;
260: }
261: break golab5;
262: } while (false);
263: if (cursor >= limit) {
264: return false;
265: }
266: cursor++;
267: }
268: // gopast, line 71
269: golab7: while (true) {
270: lab8: do {
271: if (!(out_grouping(g_v, 97, 232))) {
272: break lab8;
273: }
274: break golab7;
275: } while (false);
276: if (cursor >= limit) {
277: return false;
278: }
279: cursor++;
280: }
281: // setmark p2, line 71
282: I_p2 = cursor;
283: return true;
284: }
285:
286: private boolean r_postlude() {
287: int among_var;
288: int v_1;
289: // repeat, line 75
290: replab0: while (true) {
291: v_1 = cursor;
292: lab1: do {
293: // (, line 75
294: // [, line 77
295: bra = cursor;
296: // substring, line 77
297: among_var = find_among(a_1, 3);
298: if (among_var == 0) {
299: break lab1;
300: }
301: // ], line 77
302: ket = cursor;
303: switch (among_var) {
304: case 0:
305: break lab1;
306: case 1:
307: // (, line 78
308: // <-, line 78
309: slice_from("y");
310: break;
311: case 2:
312: // (, line 79
313: // <-, line 79
314: slice_from("i");
315: break;
316: case 3:
317: // (, line 80
318: // next, line 80
319: if (cursor >= limit) {
320: break lab1;
321: }
322: cursor++;
323: break;
324: }
325: continue replab0;
326: } while (false);
327: cursor = v_1;
328: break replab0;
329: }
330: return true;
331: }
332:
333: private boolean r_R1() {
334: if (!(I_p1 <= cursor)) {
335: return false;
336: }
337: return true;
338: }
339:
340: private boolean r_R2() {
341: if (!(I_p2 <= cursor)) {
342: return false;
343: }
344: return true;
345: }
346:
347: private boolean r_undouble() {
348: int v_1;
349: // (, line 90
350: // test, line 91
351: v_1 = limit - cursor;
352: // among, line 91
353: if (find_among_b(a_2, 3) == 0) {
354: return false;
355: }
356: cursor = limit - v_1;
357: // [, line 91
358: ket = cursor;
359: // next, line 91
360: if (cursor <= limit_backward) {
361: return false;
362: }
363: cursor--;
364: // ], line 91
365: bra = cursor;
366: // delete, line 91
367: slice_del();
368: return true;
369: }
370:
371: private boolean r_e_ending() {
372: int v_1;
373: // (, line 94
374: // unset e_found, line 95
375: B_e_found = false;
376: // [, line 96
377: ket = cursor;
378: // literal, line 96
379: if (!(eq_s_b(1, "e"))) {
380: return false;
381: }
382: // ], line 96
383: bra = cursor;
384: // call R1, line 96
385: if (!r_R1()) {
386: return false;
387: }
388: // test, line 96
389: v_1 = limit - cursor;
390: if (!(out_grouping_b(g_v, 97, 232))) {
391: return false;
392: }
393: cursor = limit - v_1;
394: // delete, line 96
395: slice_del();
396: // set e_found, line 97
397: B_e_found = true;
398: // call undouble, line 98
399: if (!r_undouble()) {
400: return false;
401: }
402: return true;
403: }
404:
405: private boolean r_en_ending() {
406: int v_1;
407: int v_2;
408: // (, line 101
409: // call R1, line 102
410: if (!r_R1()) {
411: return false;
412: }
413: // and, line 102
414: v_1 = limit - cursor;
415: if (!(out_grouping_b(g_v, 97, 232))) {
416: return false;
417: }
418: cursor = limit - v_1;
419: // not, line 102
420: {
421: v_2 = limit - cursor;
422: lab0: do {
423: // literal, line 102
424: if (!(eq_s_b(3, "gem"))) {
425: break lab0;
426: }
427: return false;
428: } while (false);
429: cursor = limit - v_2;
430: }
431: // delete, line 102
432: slice_del();
433: // call undouble, line 103
434: if (!r_undouble()) {
435: return false;
436: }
437: return true;
438: }
439:
440: private boolean r_standard_suffix() {
441: int among_var;
442: int v_1;
443: int v_2;
444: int v_3;
445: int v_4;
446: int v_5;
447: int v_6;
448: int v_7;
449: int v_8;
450: int v_9;
451: int v_10;
452: // (, line 106
453: // do, line 107
454: v_1 = limit - cursor;
455: lab0: do {
456: // (, line 107
457: // [, line 108
458: ket = cursor;
459: // substring, line 108
460: among_var = find_among_b(a_3, 5);
461: if (among_var == 0) {
462: break lab0;
463: }
464: // ], line 108
465: bra = cursor;
466: switch (among_var) {
467: case 0:
468: break lab0;
469: case 1:
470: // (, line 110
471: // call R1, line 110
472: if (!r_R1()) {
473: break lab0;
474: }
475: // <-, line 110
476: slice_from("heid");
477: break;
478: case 2:
479: // (, line 113
480: // call en_ending, line 113
481: if (!r_en_ending()) {
482: break lab0;
483: }
484: break;
485: case 3:
486: // (, line 116
487: // call R1, line 116
488: if (!r_R1()) {
489: break lab0;
490: }
491: if (!(out_grouping_b(g_v_j, 97, 232))) {
492: break lab0;
493: }
494: // delete, line 116
495: slice_del();
496: break;
497: }
498: } while (false);
499: cursor = limit - v_1;
500: // do, line 120
501: v_2 = limit - cursor;
502: lab1: do {
503: // call e_ending, line 120
504: if (!r_e_ending()) {
505: break lab1;
506: }
507: } while (false);
508: cursor = limit - v_2;
509: // do, line 122
510: v_3 = limit - cursor;
511: lab2: do {
512: // (, line 122
513: // [, line 122
514: ket = cursor;
515: // literal, line 122
516: if (!(eq_s_b(4, "heid"))) {
517: break lab2;
518: }
519: // ], line 122
520: bra = cursor;
521: // call R2, line 122
522: if (!r_R2()) {
523: break lab2;
524: }
525: // not, line 122
526: {
527: v_4 = limit - cursor;
528: lab3: do {
529: // literal, line 122
530: if (!(eq_s_b(1, "c"))) {
531: break lab3;
532: }
533: break lab2;
534: } while (false);
535: cursor = limit - v_4;
536: }
537: // delete, line 122
538: slice_del();
539: // [, line 123
540: ket = cursor;
541: // literal, line 123
542: if (!(eq_s_b(2, "en"))) {
543: break lab2;
544: }
545: // ], line 123
546: bra = cursor;
547: // call en_ending, line 123
548: if (!r_en_ending()) {
549: break lab2;
550: }
551: } while (false);
552: cursor = limit - v_3;
553: // do, line 126
554: v_5 = limit - cursor;
555: lab4: do {
556: // (, line 126
557: // [, line 127
558: ket = cursor;
559: // substring, line 127
560: among_var = find_among_b(a_4, 6);
561: if (among_var == 0) {
562: break lab4;
563: }
564: // ], line 127
565: bra = cursor;
566: switch (among_var) {
567: case 0:
568: break lab4;
569: case 1:
570: // (, line 129
571: // call R2, line 129
572: if (!r_R2()) {
573: break lab4;
574: }
575: // delete, line 129
576: slice_del();
577: // or, line 130
578: lab5: do {
579: v_6 = limit - cursor;
580: lab6: do {
581: // (, line 130
582: // [, line 130
583: ket = cursor;
584: // literal, line 130
585: if (!(eq_s_b(2, "ig"))) {
586: break lab6;
587: }
588: // ], line 130
589: bra = cursor;
590: // call R2, line 130
591: if (!r_R2()) {
592: break lab6;
593: }
594: // not, line 130
595: {
596: v_7 = limit - cursor;
597: lab7: do {
598: // literal, line 130
599: if (!(eq_s_b(1, "e"))) {
600: break lab7;
601: }
602: break lab6;
603: } while (false);
604: cursor = limit - v_7;
605: }
606: // delete, line 130
607: slice_del();
608: break lab5;
609: } while (false);
610: cursor = limit - v_6;
611: // call undouble, line 130
612: if (!r_undouble()) {
613: break lab4;
614: }
615: } while (false);
616: break;
617: case 2:
618: // (, line 133
619: // call R2, line 133
620: if (!r_R2()) {
621: break lab4;
622: }
623: // not, line 133
624: {
625: v_8 = limit - cursor;
626: lab8: do {
627: // literal, line 133
628: if (!(eq_s_b(1, "e"))) {
629: break lab8;
630: }
631: break lab4;
632: } while (false);
633: cursor = limit - v_8;
634: }
635: // delete, line 133
636: slice_del();
637: break;
638: case 3:
639: // (, line 136
640: // call R2, line 136
641: if (!r_R2()) {
642: break lab4;
643: }
644: // delete, line 136
645: slice_del();
646: // call e_ending, line 136
647: if (!r_e_ending()) {
648: break lab4;
649: }
650: break;
651: case 4:
652: // (, line 139
653: // call R2, line 139
654: if (!r_R2()) {
655: break lab4;
656: }
657: // delete, line 139
658: slice_del();
659: break;
660: case 5:
661: // (, line 142
662: // call R2, line 142
663: if (!r_R2()) {
664: break lab4;
665: }
666: // Boolean test e_found, line 142
667: if (!(B_e_found)) {
668: break lab4;
669: }
670: // delete, line 142
671: slice_del();
672: break;
673: }
674: } while (false);
675: cursor = limit - v_5;
676: // do, line 146
677: v_9 = limit - cursor;
678: lab9: do {
679: // (, line 146
680: if (!(out_grouping_b(g_v_I, 73, 232))) {
681: break lab9;
682: }
683: // test, line 148
684: v_10 = limit - cursor;
685: // (, line 148
686: // among, line 149
687: if (find_among_b(a_5, 4) == 0) {
688: break lab9;
689: }
690: if (!(out_grouping_b(g_v, 97, 232))) {
691: break lab9;
692: }
693: cursor = limit - v_10;
694: // [, line 152
695: ket = cursor;
696: // next, line 152
697: if (cursor <= limit_backward) {
698: break lab9;
699: }
700: cursor--;
701: // ], line 152
702: bra = cursor;
703: // delete, line 152
704: slice_del();
705: } while (false);
706: cursor = limit - v_9;
707: return true;
708: }
709:
710: public boolean stem() {
711: int v_1;
712: int v_2;
713: int v_3;
714: int v_4;
715: // (, line 157
716: // do, line 159
717: v_1 = cursor;
718: lab0: do {
719: // call prelude, line 159
720: if (!r_prelude()) {
721: break lab0;
722: }
723: } while (false);
724: cursor = v_1;
725: // do, line 160
726: v_2 = cursor;
727: lab1: do {
728: // call mark_regions, line 160
729: if (!r_mark_regions()) {
730: break lab1;
731: }
732: } while (false);
733: cursor = v_2;
734: // backwards, line 161
735: limit_backward = cursor;
736: cursor = limit;
737: // do, line 162
738: v_3 = limit - cursor;
739: lab2: do {
740: // call standard_suffix, line 162
741: if (!r_standard_suffix()) {
742: break lab2;
743: }
744: } while (false);
745: cursor = limit - v_3;
746: cursor = limit_backward; // do, line 163
747: v_4 = cursor;
748: lab3: do {
749: // call postlude, line 163
750: if (!r_postlude()) {
751: break lab3;
752: }
753: } while (false);
754: cursor = v_4;
755: return true;
756: }
757:
758: }
|