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 RussianStemmer extends SnowballProgram {
012:
013: private Among a_0[] = {
014: new Among("\u00D7\u00DB\u00C9", -1, 1, "", this ),
015: new Among("\u00C9\u00D7\u00DB\u00C9", 0, 2, "", this ),
016: new Among("\u00D9\u00D7\u00DB\u00C9", 0, 2, "", this ),
017: new Among("\u00D7", -1, 1, "", this ),
018: new Among("\u00C9\u00D7", 3, 2, "", this ),
019: new Among("\u00D9\u00D7", 3, 2, "", this ),
020: new Among("\u00D7\u00DB\u00C9\u00D3\u00D8", -1, 1, "", this ),
021: new Among("\u00C9\u00D7\u00DB\u00C9\u00D3\u00D8", 6, 2, "",
022: this ),
023: new Among("\u00D9\u00D7\u00DB\u00C9\u00D3\u00D8", 6, 2, "",
024: this ) };
025:
026: private Among a_1[] = { new Among("\u00C0\u00C0", -1, 1, "", this ),
027: new Among("\u00C5\u00C0", -1, 1, "", this ),
028: new Among("\u00CF\u00C0", -1, 1, "", this ),
029: new Among("\u00D5\u00C0", -1, 1, "", this ),
030: new Among("\u00C5\u00C5", -1, 1, "", this ),
031: new Among("\u00C9\u00C5", -1, 1, "", this ),
032: new Among("\u00CF\u00C5", -1, 1, "", this ),
033: new Among("\u00D9\u00C5", -1, 1, "", this ),
034: new Among("\u00C9\u00C8", -1, 1, "", this ),
035: new Among("\u00D9\u00C8", -1, 1, "", this ),
036: new Among("\u00C9\u00CD\u00C9", -1, 1, "", this ),
037: new Among("\u00D9\u00CD\u00C9", -1, 1, "", this ),
038: new Among("\u00C5\u00CA", -1, 1, "", this ),
039: new Among("\u00C9\u00CA", -1, 1, "", this ),
040: new Among("\u00CF\u00CA", -1, 1, "", this ),
041: new Among("\u00D9\u00CA", -1, 1, "", this ),
042: new Among("\u00C5\u00CD", -1, 1, "", this ),
043: new Among("\u00C9\u00CD", -1, 1, "", this ),
044: new Among("\u00CF\u00CD", -1, 1, "", this ),
045: new Among("\u00D9\u00CD", -1, 1, "", this ),
046: new Among("\u00C5\u00C7\u00CF", -1, 1, "", this ),
047: new Among("\u00CF\u00C7\u00CF", -1, 1, "", this ),
048: new Among("\u00C1\u00D1", -1, 1, "", this ),
049: new Among("\u00D1\u00D1", -1, 1, "", this ),
050: new Among("\u00C5\u00CD\u00D5", -1, 1, "", this ),
051: new Among("\u00CF\u00CD\u00D5", -1, 1, "", this ) };
052:
053: private Among a_2[] = { new Among("\u00C5\u00CD", -1, 1, "", this ),
054: new Among("\u00CE\u00CE", -1, 1, "", this ),
055: new Among("\u00D7\u00DB", -1, 1, "", this ),
056: new Among("\u00C9\u00D7\u00DB", 2, 2, "", this ),
057: new Among("\u00D9\u00D7\u00DB", 2, 2, "", this ),
058: new Among("\u00DD", -1, 1, "", this ),
059: new Among("\u00C0\u00DD", 5, 1, "", this ),
060: new Among("\u00D5\u00C0\u00DD", 6, 2, "", this ) };
061:
062: private Among a_3[] = { new Among("\u00D3\u00D1", -1, 1, "", this ),
063: new Among("\u00D3\u00D8", -1, 1, "", this ) };
064:
065: private Among a_4[] = { new Among("\u00C0", -1, 2, "", this ),
066: new Among("\u00D5\u00C0", 0, 2, "", this ),
067: new Among("\u00CC\u00C1", -1, 1, "", this ),
068: new Among("\u00C9\u00CC\u00C1", 2, 2, "", this ),
069: new Among("\u00D9\u00CC\u00C1", 2, 2, "", this ),
070: new Among("\u00CE\u00C1", -1, 1, "", this ),
071: new Among("\u00C5\u00CE\u00C1", 5, 2, "", this ),
072: new Among("\u00C5\u00D4\u00C5", -1, 1, "", this ),
073: new Among("\u00C9\u00D4\u00C5", -1, 2, "", this ),
074: new Among("\u00CA\u00D4\u00C5", -1, 1, "", this ),
075: new Among("\u00C5\u00CA\u00D4\u00C5", 9, 2, "", this ),
076: new Among("\u00D5\u00CA\u00D4\u00C5", 9, 2, "", this ),
077: new Among("\u00CC\u00C9", -1, 1, "", this ),
078: new Among("\u00C9\u00CC\u00C9", 12, 2, "", this ),
079: new Among("\u00D9\u00CC\u00C9", 12, 2, "", this ),
080: new Among("\u00CA", -1, 1, "", this ),
081: new Among("\u00C5\u00CA", 15, 2, "", this ),
082: new Among("\u00D5\u00CA", 15, 2, "", this ),
083: new Among("\u00CC", -1, 1, "", this ),
084: new Among("\u00C9\u00CC", 18, 2, "", this ),
085: new Among("\u00D9\u00CC", 18, 2, "", this ),
086: new Among("\u00C5\u00CD", -1, 1, "", this ),
087: new Among("\u00C9\u00CD", -1, 2, "", this ),
088: new Among("\u00D9\u00CD", -1, 2, "", this ),
089: new Among("\u00CE", -1, 1, "", this ),
090: new Among("\u00C5\u00CE", 24, 2, "", this ),
091: new Among("\u00CC\u00CF", -1, 1, "", this ),
092: new Among("\u00C9\u00CC\u00CF", 26, 2, "", this ),
093: new Among("\u00D9\u00CC\u00CF", 26, 2, "", this ),
094: new Among("\u00CE\u00CF", -1, 1, "", this ),
095: new Among("\u00C5\u00CE\u00CF", 29, 2, "", this ),
096: new Among("\u00CE\u00CE\u00CF", 29, 1, "", this ),
097: new Among("\u00C0\u00D4", -1, 1, "", this ),
098: new Among("\u00D5\u00C0\u00D4", 32, 2, "", this ),
099: new Among("\u00C5\u00D4", -1, 1, "", this ),
100: new Among("\u00D5\u00C5\u00D4", 34, 2, "", this ),
101: new Among("\u00C9\u00D4", -1, 2, "", this ),
102: new Among("\u00D1\u00D4", -1, 2, "", this ),
103: new Among("\u00D9\u00D4", -1, 2, "", this ),
104: new Among("\u00D4\u00D8", -1, 1, "", this ),
105: new Among("\u00C9\u00D4\u00D8", 39, 2, "", this ),
106: new Among("\u00D9\u00D4\u00D8", 39, 2, "", this ),
107: new Among("\u00C5\u00DB\u00D8", -1, 1, "", this ),
108: new Among("\u00C9\u00DB\u00D8", -1, 2, "", this ),
109: new Among("\u00CE\u00D9", -1, 1, "", this ),
110: new Among("\u00C5\u00CE\u00D9", 44, 2, "", this ) };
111:
112: private Among a_5[] = { new Among("\u00C0", -1, 1, "", this ),
113: new Among("\u00C9\u00C0", 0, 1, "", this ),
114: new Among("\u00D8\u00C0", 0, 1, "", this ),
115: new Among("\u00C1", -1, 1, "", this ),
116: new Among("\u00C5", -1, 1, "", this ),
117: new Among("\u00C9\u00C5", 4, 1, "", this ),
118: new Among("\u00D8\u00C5", 4, 1, "", this ),
119: new Among("\u00C1\u00C8", -1, 1, "", this ),
120: new Among("\u00D1\u00C8", -1, 1, "", this ),
121: new Among("\u00C9\u00D1\u00C8", 8, 1, "", this ),
122: new Among("\u00C9", -1, 1, "", this ),
123: new Among("\u00C5\u00C9", 10, 1, "", this ),
124: new Among("\u00C9\u00C9", 10, 1, "", this ),
125: new Among("\u00C1\u00CD\u00C9", 10, 1, "", this ),
126: new Among("\u00D1\u00CD\u00C9", 10, 1, "", this ),
127: new Among("\u00C9\u00D1\u00CD\u00C9", 14, 1, "", this ),
128: new Among("\u00CA", -1, 1, "", this ),
129: new Among("\u00C5\u00CA", 16, 1, "", this ),
130: new Among("\u00C9\u00C5\u00CA", 17, 1, "", this ),
131: new Among("\u00C9\u00CA", 16, 1, "", this ),
132: new Among("\u00CF\u00CA", 16, 1, "", this ),
133: new Among("\u00C1\u00CD", -1, 1, "", this ),
134: new Among("\u00C5\u00CD", -1, 1, "", this ),
135: new Among("\u00C9\u00C5\u00CD", 22, 1, "", this ),
136: new Among("\u00CF\u00CD", -1, 1, "", this ),
137: new Among("\u00D1\u00CD", -1, 1, "", this ),
138: new Among("\u00C9\u00D1\u00CD", 25, 1, "", this ),
139: new Among("\u00CF", -1, 1, "", this ),
140: new Among("\u00D1", -1, 1, "", this ),
141: new Among("\u00C9\u00D1", 28, 1, "", this ),
142: new Among("\u00D8\u00D1", 28, 1, "", this ),
143: new Among("\u00D5", -1, 1, "", this ),
144: new Among("\u00C5\u00D7", -1, 1, "", this ),
145: new Among("\u00CF\u00D7", -1, 1, "", this ),
146: new Among("\u00D8", -1, 1, "", this ),
147: new Among("\u00D9", -1, 1, "", this ) };
148:
149: private Among a_6[] = {
150: new Among("\u00CF\u00D3\u00D4", -1, 1, "", this ),
151: new Among("\u00CF\u00D3\u00D4\u00D8", -1, 1, "", this ) };
152:
153: private Among a_7[] = {
154: new Among("\u00C5\u00CA\u00DB\u00C5", -1, 1, "", this ),
155: new Among("\u00CE", -1, 2, "", this ),
156: new Among("\u00D8", -1, 3, "", this ),
157: new Among("\u00C5\u00CA\u00DB", -1, 1, "", this ) };
158:
159: private static final char g_v[] = { 35, 130, 34, 18 };
160:
161: private int I_p2;
162: private int I_pV;
163:
164: private void copy_from(RussianStemmer other) {
165: I_p2 = other.I_p2;
166: I_pV = other.I_pV;
167: super .copy_from(other);
168: }
169:
170: private boolean r_mark_regions() {
171: int v_1;
172: // (, line 96
173: I_pV = limit;
174: I_p2 = limit;
175: // do, line 100
176: v_1 = cursor;
177: lab0: do {
178: // (, line 100
179: // gopast, line 101
180: golab1: while (true) {
181: lab2: do {
182: if (!(in_grouping(g_v, 192, 220))) {
183: break lab2;
184: }
185: break golab1;
186: } while (false);
187: if (cursor >= limit) {
188: break lab0;
189: }
190: cursor++;
191: }
192: // setmark pV, line 101
193: I_pV = cursor;
194: // gopast, line 101
195: golab3: while (true) {
196: lab4: do {
197: if (!(out_grouping(g_v, 192, 220))) {
198: break lab4;
199: }
200: break golab3;
201: } while (false);
202: if (cursor >= limit) {
203: break lab0;
204: }
205: cursor++;
206: }
207: // gopast, line 102
208: golab5: while (true) {
209: lab6: do {
210: if (!(in_grouping(g_v, 192, 220))) {
211: break lab6;
212: }
213: break golab5;
214: } while (false);
215: if (cursor >= limit) {
216: break lab0;
217: }
218: cursor++;
219: }
220: // gopast, line 102
221: golab7: while (true) {
222: lab8: do {
223: if (!(out_grouping(g_v, 192, 220))) {
224: break lab8;
225: }
226: break golab7;
227: } while (false);
228: if (cursor >= limit) {
229: break lab0;
230: }
231: cursor++;
232: }
233: // setmark p2, line 102
234: I_p2 = cursor;
235: } while (false);
236: cursor = v_1;
237: return true;
238: }
239:
240: private boolean r_R2() {
241: if (!(I_p2 <= cursor)) {
242: return false;
243: }
244: return true;
245: }
246:
247: private boolean r_perfective_gerund() {
248: int among_var;
249: int v_1;
250: // (, line 110
251: // [, line 111
252: ket = cursor;
253: // substring, line 111
254: among_var = find_among_b(a_0, 9);
255: if (among_var == 0) {
256: return false;
257: }
258: // ], line 111
259: bra = cursor;
260: switch (among_var) {
261: case 0:
262: return false;
263: case 1:
264: // (, line 115
265: // or, line 115
266: lab0: do {
267: v_1 = limit - cursor;
268: lab1: do {
269: // literal, line 115
270: if (!(eq_s_b(1, "\u00C1"))) {
271: break lab1;
272: }
273: break lab0;
274: } while (false);
275: cursor = limit - v_1;
276: // literal, line 115
277: if (!(eq_s_b(1, "\u00D1"))) {
278: return false;
279: }
280: } while (false);
281: // delete, line 115
282: slice_del();
283: break;
284: case 2:
285: // (, line 122
286: // delete, line 122
287: slice_del();
288: break;
289: }
290: return true;
291: }
292:
293: private boolean r_adjective() {
294: int among_var;
295: // (, line 126
296: // [, line 127
297: ket = cursor;
298: // substring, line 127
299: among_var = find_among_b(a_1, 26);
300: if (among_var == 0) {
301: return false;
302: }
303: // ], line 127
304: bra = cursor;
305: switch (among_var) {
306: case 0:
307: return false;
308: case 1:
309: // (, line 136
310: // delete, line 136
311: slice_del();
312: break;
313: }
314: return true;
315: }
316:
317: private boolean r_adjectival() {
318: int among_var;
319: int v_1;
320: int v_2;
321: // (, line 140
322: // call adjective, line 141
323: if (!r_adjective()) {
324: return false;
325: }
326: // try, line 148
327: v_1 = limit - cursor;
328: lab0: do {
329: // (, line 148
330: // [, line 149
331: ket = cursor;
332: // substring, line 149
333: among_var = find_among_b(a_2, 8);
334: if (among_var == 0) {
335: cursor = limit - v_1;
336: break lab0;
337: }
338: // ], line 149
339: bra = cursor;
340: switch (among_var) {
341: case 0:
342: cursor = limit - v_1;
343: break lab0;
344: case 1:
345: // (, line 154
346: // or, line 154
347: lab1: do {
348: v_2 = limit - cursor;
349: lab2: do {
350: // literal, line 154
351: if (!(eq_s_b(1, "\u00C1"))) {
352: break lab2;
353: }
354: break lab1;
355: } while (false);
356: cursor = limit - v_2;
357: // literal, line 154
358: if (!(eq_s_b(1, "\u00D1"))) {
359: cursor = limit - v_1;
360: break lab0;
361: }
362: } while (false);
363: // delete, line 154
364: slice_del();
365: break;
366: case 2:
367: // (, line 161
368: // delete, line 161
369: slice_del();
370: break;
371: }
372: } while (false);
373: return true;
374: }
375:
376: private boolean r_reflexive() {
377: int among_var;
378: // (, line 167
379: // [, line 168
380: ket = cursor;
381: // substring, line 168
382: among_var = find_among_b(a_3, 2);
383: if (among_var == 0) {
384: return false;
385: }
386: // ], line 168
387: bra = cursor;
388: switch (among_var) {
389: case 0:
390: return false;
391: case 1:
392: // (, line 171
393: // delete, line 171
394: slice_del();
395: break;
396: }
397: return true;
398: }
399:
400: private boolean r_verb() {
401: int among_var;
402: int v_1;
403: // (, line 175
404: // [, line 176
405: ket = cursor;
406: // substring, line 176
407: among_var = find_among_b(a_4, 46);
408: if (among_var == 0) {
409: return false;
410: }
411: // ], line 176
412: bra = cursor;
413: switch (among_var) {
414: case 0:
415: return false;
416: case 1:
417: // (, line 182
418: // or, line 182
419: lab0: do {
420: v_1 = limit - cursor;
421: lab1: do {
422: // literal, line 182
423: if (!(eq_s_b(1, "\u00C1"))) {
424: break lab1;
425: }
426: break lab0;
427: } while (false);
428: cursor = limit - v_1;
429: // literal, line 182
430: if (!(eq_s_b(1, "\u00D1"))) {
431: return false;
432: }
433: } while (false);
434: // delete, line 182
435: slice_del();
436: break;
437: case 2:
438: // (, line 190
439: // delete, line 190
440: slice_del();
441: break;
442: }
443: return true;
444: }
445:
446: private boolean r_noun() {
447: int among_var;
448: // (, line 198
449: // [, line 199
450: ket = cursor;
451: // substring, line 199
452: among_var = find_among_b(a_5, 36);
453: if (among_var == 0) {
454: return false;
455: }
456: // ], line 199
457: bra = cursor;
458: switch (among_var) {
459: case 0:
460: return false;
461: case 1:
462: // (, line 206
463: // delete, line 206
464: slice_del();
465: break;
466: }
467: return true;
468: }
469:
470: private boolean r_derivational() {
471: int among_var;
472: // (, line 214
473: // [, line 215
474: ket = cursor;
475: // substring, line 215
476: among_var = find_among_b(a_6, 2);
477: if (among_var == 0) {
478: return false;
479: }
480: // ], line 215
481: bra = cursor;
482: // call R2, line 215
483: if (!r_R2()) {
484: return false;
485: }
486: switch (among_var) {
487: case 0:
488: return false;
489: case 1:
490: // (, line 218
491: // delete, line 218
492: slice_del();
493: break;
494: }
495: return true;
496: }
497:
498: private boolean r_tidy_up() {
499: int among_var;
500: // (, line 222
501: // [, line 223
502: ket = cursor;
503: // substring, line 223
504: among_var = find_among_b(a_7, 4);
505: if (among_var == 0) {
506: return false;
507: }
508: // ], line 223
509: bra = cursor;
510: switch (among_var) {
511: case 0:
512: return false;
513: case 1:
514: // (, line 227
515: // delete, line 227
516: slice_del();
517: // [, line 228
518: ket = cursor;
519: // literal, line 228
520: if (!(eq_s_b(1, "\u00CE"))) {
521: return false;
522: }
523: // ], line 228
524: bra = cursor;
525: // literal, line 228
526: if (!(eq_s_b(1, "\u00CE"))) {
527: return false;
528: }
529: // delete, line 228
530: slice_del();
531: break;
532: case 2:
533: // (, line 231
534: // literal, line 231
535: if (!(eq_s_b(1, "\u00CE"))) {
536: return false;
537: }
538: // delete, line 231
539: slice_del();
540: break;
541: case 3:
542: // (, line 233
543: // delete, line 233
544: slice_del();
545: break;
546: }
547: return true;
548: }
549:
550: public boolean stem() {
551: int v_1;
552: int v_2;
553: int v_3;
554: int v_4;
555: int v_5;
556: int v_6;
557: int v_7;
558: int v_8;
559: int v_9;
560: int v_10;
561: // (, line 238
562: // do, line 240
563: v_1 = cursor;
564: lab0: do {
565: // call mark_regions, line 240
566: if (!r_mark_regions()) {
567: break lab0;
568: }
569: } while (false);
570: cursor = v_1;
571: // backwards, line 241
572: limit_backward = cursor;
573: cursor = limit;
574: // setlimit, line 241
575: v_2 = limit - cursor;
576: // tomark, line 241
577: if (cursor < I_pV) {
578: return false;
579: }
580: cursor = I_pV;
581: v_3 = limit_backward;
582: limit_backward = cursor;
583: cursor = limit - v_2;
584: // (, line 241
585: // do, line 242
586: v_4 = limit - cursor;
587: lab1: do {
588: // (, line 242
589: // or, line 243
590: lab2: do {
591: v_5 = limit - cursor;
592: lab3: do {
593: // call perfective_gerund, line 243
594: if (!r_perfective_gerund()) {
595: break lab3;
596: }
597: break lab2;
598: } while (false);
599: cursor = limit - v_5;
600: // (, line 244
601: // try, line 244
602: v_6 = limit - cursor;
603: lab4: do {
604: // call reflexive, line 244
605: if (!r_reflexive()) {
606: cursor = limit - v_6;
607: break lab4;
608: }
609: } while (false);
610: // or, line 245
611: lab5: do {
612: v_7 = limit - cursor;
613: lab6: do {
614: // call adjectival, line 245
615: if (!r_adjectival()) {
616: break lab6;
617: }
618: break lab5;
619: } while (false);
620: cursor = limit - v_7;
621: lab7: do {
622: // call verb, line 245
623: if (!r_verb()) {
624: break lab7;
625: }
626: break lab5;
627: } while (false);
628: cursor = limit - v_7;
629: // call noun, line 245
630: if (!r_noun()) {
631: break lab1;
632: }
633: } while (false);
634: } while (false);
635: } while (false);
636: cursor = limit - v_4;
637: // try, line 248
638: v_8 = limit - cursor;
639: lab8: do {
640: // (, line 248
641: // [, line 248
642: ket = cursor;
643: // literal, line 248
644: if (!(eq_s_b(1, "\u00C9"))) {
645: cursor = limit - v_8;
646: break lab8;
647: }
648: // ], line 248
649: bra = cursor;
650: // delete, line 248
651: slice_del();
652: } while (false);
653: // do, line 251
654: v_9 = limit - cursor;
655: lab9: do {
656: // call derivational, line 251
657: if (!r_derivational()) {
658: break lab9;
659: }
660: } while (false);
661: cursor = limit - v_9;
662: // do, line 252
663: v_10 = limit - cursor;
664: lab10: do {
665: // call tidy_up, line 252
666: if (!r_tidy_up()) {
667: break lab10;
668: }
669: } while (false);
670: cursor = limit - v_10;
671: limit_backward = v_3;
672: cursor = limit_backward;
673: return true;
674: }
675:
676: }
|