Source Code Cross Referenced for German2Stemmer.java in  » Search-Engine » mg4j » it » unimi » dsi » mg4j » index » snowball » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » mg4j » it.unimi.dsi.mg4j.index.snowball 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // This file was generated automatically by the Snowball to Java compiler
002:
003:        package it.unimi.dsi.mg4j.index.snowball;
004:
005:        import it.unimi.dsi.mg4j.index.snowball.Among;
006:
007:        /**
008:         * This class was automatically generated by a Snowball to Java compiler 
009:         * It implements the stemming algorithm defined by a snowball script.
010:         */
011:
012:        public class German2Stemmer extends
013:                it.unimi.dsi.mg4j.index.snowball.AbstractSnowballTermProcessor {
014:
015:            private static final long serialVersionUID = 1L;
016:
017:            private final static German2Stemmer methodObject = new German2Stemmer();
018:
019:            private final static Among a_0[] = {
020:                    new Among("", -1, 6, "", methodObject),
021:                    new Among("ae", 0, 2, "", methodObject),
022:                    new Among("oe", 0, 3, "", methodObject),
023:                    new Among("qu", 0, 5, "", methodObject),
024:                    new Among("ue", 0, 4, "", methodObject),
025:                    new Among("\u00DF", 0, 1, "", methodObject) };
026:
027:            private final static Among a_1[] = {
028:                    new Among("", -1, 6, "", methodObject),
029:                    new Among("U", 0, 2, "", methodObject),
030:                    new Among("Y", 0, 1, "", methodObject),
031:                    new Among("\u00E4", 0, 3, "", methodObject),
032:                    new Among("\u00F6", 0, 4, "", methodObject),
033:                    new Among("\u00FC", 0, 5, "", methodObject) };
034:
035:            private final static Among a_2[] = {
036:                    new Among("e", -1, 1, "", methodObject),
037:                    new Among("em", -1, 1, "", methodObject),
038:                    new Among("en", -1, 1, "", methodObject),
039:                    new Among("ern", -1, 1, "", methodObject),
040:                    new Among("er", -1, 1, "", methodObject),
041:                    new Among("s", -1, 2, "", methodObject),
042:                    new Among("es", 5, 1, "", methodObject) };
043:
044:            private final static Among a_3[] = {
045:                    new Among("en", -1, 1, "", methodObject),
046:                    new Among("er", -1, 1, "", methodObject),
047:                    new Among("st", -1, 2, "", methodObject),
048:                    new Among("est", 2, 1, "", methodObject) };
049:
050:            private final static Among a_4[] = {
051:                    new Among("ig", -1, 1, "", methodObject),
052:                    new Among("lich", -1, 1, "", methodObject) };
053:
054:            private final static Among a_5[] = {
055:                    new Among("end", -1, 1, "", methodObject),
056:                    new Among("ig", -1, 2, "", methodObject),
057:                    new Among("ung", -1, 1, "", methodObject),
058:                    new Among("lich", -1, 3, "", methodObject),
059:                    new Among("isch", -1, 2, "", methodObject),
060:                    new Among("ik", -1, 2, "", methodObject),
061:                    new Among("heit", -1, 3, "", methodObject),
062:                    new Among("keit", -1, 4, "", methodObject) };
063:
064:            private static final char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0,
065:                    0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
066:
067:            private static final char g_s_ending[] = { 117, 30, 5 };
068:
069:            private static final char g_st_ending[] = { 117, 30, 4 };
070:
071:            private int I_x;
072:            private int I_p2;
073:            private int I_p1;
074:
075:            private boolean r_prelude() {
076:                int among_var;
077:                int v_1;
078:                int v_2;
079:                int v_3;
080:                int v_4;
081:                int v_5;
082:                // (, line 28
083:                // test, line 30
084:                v_1 = cursor;
085:                // repeat, line 30
086:                replab0: while (true) {
087:                    v_2 = cursor;
088:                    lab1: do {
089:                        // goto, line 30
090:                        golab2: while (true) {
091:                            v_3 = cursor;
092:                            lab3: do {
093:                                // (, line 30
094:                                if (!(in_grouping(g_v, 97, 252))) {
095:                                    break lab3;
096:                                }
097:                                // [, line 31
098:                                bra = cursor;
099:                                // or, line 31
100:                                lab4: do {
101:                                    v_4 = cursor;
102:                                    lab5: do {
103:                                        // (, line 31
104:                                        // literal, line 31
105:                                        if (!(eq_s(1, "u"))) {
106:                                            break lab5;
107:                                        }
108:                                        // ], line 31
109:                                        ket = cursor;
110:                                        if (!(in_grouping(g_v, 97, 252))) {
111:                                            break lab5;
112:                                        }
113:                                        // <-, line 31
114:                                        slice_from("U");
115:                                        break lab4;
116:                                    } while (false);
117:                                    cursor = v_4;
118:                                    // (, line 32
119:                                    // literal, line 32
120:                                    if (!(eq_s(1, "y"))) {
121:                                        break lab3;
122:                                    }
123:                                    // ], line 32
124:                                    ket = cursor;
125:                                    if (!(in_grouping(g_v, 97, 252))) {
126:                                        break lab3;
127:                                    }
128:                                    // <-, line 32
129:                                    slice_from("Y");
130:                                } while (false);
131:                                cursor = v_3;
132:                                break golab2;
133:                            } while (false);
134:                            cursor = v_3;
135:                            if (cursor >= limit) {
136:                                break lab1;
137:                            }
138:                            cursor++;
139:                        }
140:                        continue replab0;
141:                    } while (false);
142:                    cursor = v_2;
143:                    break replab0;
144:                }
145:                cursor = v_1;
146:                // repeat, line 35
147:                replab6: while (true) {
148:                    v_5 = cursor;
149:                    lab7: do {
150:                        // (, line 35
151:                        // [, line 36
152:                        bra = cursor;
153:                        // substring, line 36
154:                        among_var = find_among(a_0, 6);
155:                        if (among_var == 0) {
156:                            break lab7;
157:                        }
158:                        // ], line 36
159:                        ket = cursor;
160:                        switch (among_var) {
161:                        case 0:
162:                            break lab7;
163:                        case 1:
164:                            // (, line 37
165:                            // <-, line 37
166:                            slice_from("ss");
167:                            break;
168:                        case 2:
169:                            // (, line 38
170:                            // <-, line 38
171:                            slice_from("\u00E4");
172:                            break;
173:                        case 3:
174:                            // (, line 39
175:                            // <-, line 39
176:                            slice_from("\u00F6");
177:                            break;
178:                        case 4:
179:                            // (, line 40
180:                            // <-, line 40
181:                            slice_from("\u00FC");
182:                            break;
183:                        case 5:
184:                            // (, line 41
185:                            // hop, line 41
186:                        {
187:                            int c = cursor + 2;
188:                            if (0 > c || c > limit) {
189:                                break lab7;
190:                            }
191:                            cursor = c;
192:                        }
193:                            break;
194:                        case 6:
195:                            // (, line 42
196:                            // next, line 42
197:                            if (cursor >= limit) {
198:                                break lab7;
199:                            }
200:                            cursor++;
201:                            break;
202:                        }
203:                        continue replab6;
204:                    } while (false);
205:                    cursor = v_5;
206:                    break replab6;
207:                }
208:                return true;
209:            }
210:
211:            private boolean r_mark_regions() {
212:                int v_1;
213:                // (, line 48
214:                I_p1 = limit;
215:                I_p2 = limit;
216:                // test, line 53
217:                v_1 = cursor;
218:                // (, line 53
219:                // hop, line 53
220:                {
221:                    int c = cursor + 3;
222:                    if (0 > c || c > limit) {
223:                        return false;
224:                    }
225:                    cursor = c;
226:                }
227:                // setmark x, line 53
228:                I_x = cursor;
229:                cursor = v_1;
230:                // gopast, line 55
231:                golab0: while (true) {
232:                    lab1: do {
233:                        if (!(in_grouping(g_v, 97, 252))) {
234:                            break lab1;
235:                        }
236:                        break golab0;
237:                    } while (false);
238:                    if (cursor >= limit) {
239:                        return false;
240:                    }
241:                    cursor++;
242:                }
243:                // gopast, line 55
244:                golab2: while (true) {
245:                    lab3: do {
246:                        if (!(out_grouping(g_v, 97, 252))) {
247:                            break lab3;
248:                        }
249:                        break golab2;
250:                    } while (false);
251:                    if (cursor >= limit) {
252:                        return false;
253:                    }
254:                    cursor++;
255:                }
256:                // setmark p1, line 55
257:                I_p1 = cursor;
258:                // try, line 56
259:                lab4: do {
260:                    // (, line 56
261:                    if (!(I_p1 < I_x)) {
262:                        break lab4;
263:                    }
264:                    I_p1 = I_x;
265:                } while (false);
266:                // gopast, line 57
267:                golab5: while (true) {
268:                    lab6: do {
269:                        if (!(in_grouping(g_v, 97, 252))) {
270:                            break lab6;
271:                        }
272:                        break golab5;
273:                    } while (false);
274:                    if (cursor >= limit) {
275:                        return false;
276:                    }
277:                    cursor++;
278:                }
279:                // gopast, line 57
280:                golab7: while (true) {
281:                    lab8: do {
282:                        if (!(out_grouping(g_v, 97, 252))) {
283:                            break lab8;
284:                        }
285:                        break golab7;
286:                    } while (false);
287:                    if (cursor >= limit) {
288:                        return false;
289:                    }
290:                    cursor++;
291:                }
292:                // setmark p2, line 57
293:                I_p2 = cursor;
294:                return true;
295:            }
296:
297:            private boolean r_postlude() {
298:                int among_var;
299:                int v_1;
300:                // repeat, line 61
301:                replab0: while (true) {
302:                    v_1 = cursor;
303:                    lab1: do {
304:                        // (, line 61
305:                        // [, line 63
306:                        bra = cursor;
307:                        // substring, line 63
308:                        among_var = find_among(a_1, 6);
309:                        if (among_var == 0) {
310:                            break lab1;
311:                        }
312:                        // ], line 63
313:                        ket = cursor;
314:                        switch (among_var) {
315:                        case 0:
316:                            break lab1;
317:                        case 1:
318:                            // (, line 64
319:                            // <-, line 64
320:                            slice_from("y");
321:                            break;
322:                        case 2:
323:                            // (, line 65
324:                            // <-, line 65
325:                            slice_from("u");
326:                            break;
327:                        case 3:
328:                            // (, line 66
329:                            // <-, line 66
330:                            slice_from("a");
331:                            break;
332:                        case 4:
333:                            // (, line 67
334:                            // <-, line 67
335:                            slice_from("o");
336:                            break;
337:                        case 5:
338:                            // (, line 68
339:                            // <-, line 68
340:                            slice_from("u");
341:                            break;
342:                        case 6:
343:                            // (, line 69
344:                            // next, line 69
345:                            if (cursor >= limit) {
346:                                break lab1;
347:                            }
348:                            cursor++;
349:                            break;
350:                        }
351:                        continue replab0;
352:                    } while (false);
353:                    cursor = v_1;
354:                    break replab0;
355:                }
356:                return true;
357:            }
358:
359:            private boolean r_R1() {
360:                if (!(I_p1 <= cursor)) {
361:                    return false;
362:                }
363:                return true;
364:            }
365:
366:            private boolean r_R2() {
367:                if (!(I_p2 <= cursor)) {
368:                    return false;
369:                }
370:                return true;
371:            }
372:
373:            private boolean r_standard_suffix() {
374:                int among_var;
375:                int v_1;
376:                int v_2;
377:                int v_3;
378:                int v_4;
379:                int v_5;
380:                int v_6;
381:                int v_7;
382:                int v_8;
383:                int v_9;
384:                // (, line 79
385:                // do, line 80
386:                v_1 = limit - cursor;
387:                lab0: do {
388:                    // (, line 80
389:                    // [, line 81
390:                    ket = cursor;
391:                    // substring, line 81
392:                    among_var = find_among_b(a_2, 7);
393:                    if (among_var == 0) {
394:                        break lab0;
395:                    }
396:                    // ], line 81
397:                    bra = cursor;
398:                    // call R1, line 81
399:                    if (!r_R1()) {
400:                        break lab0;
401:                    }
402:                    switch (among_var) {
403:                    case 0:
404:                        break lab0;
405:                    case 1:
406:                        // (, line 83
407:                        // delete, line 83
408:                        slice_del();
409:                        break;
410:                    case 2:
411:                        // (, line 86
412:                        if (!(in_grouping_b(g_s_ending, 98, 116))) {
413:                            break lab0;
414:                        }
415:                        // delete, line 86
416:                        slice_del();
417:                        break;
418:                    }
419:                } while (false);
420:                cursor = limit - v_1;
421:                // do, line 90
422:                v_2 = limit - cursor;
423:                lab1: do {
424:                    // (, line 90
425:                    // [, line 91
426:                    ket = cursor;
427:                    // substring, line 91
428:                    among_var = find_among_b(a_3, 4);
429:                    if (among_var == 0) {
430:                        break lab1;
431:                    }
432:                    // ], line 91
433:                    bra = cursor;
434:                    // call R1, line 91
435:                    if (!r_R1()) {
436:                        break lab1;
437:                    }
438:                    switch (among_var) {
439:                    case 0:
440:                        break lab1;
441:                    case 1:
442:                        // (, line 93
443:                        // delete, line 93
444:                        slice_del();
445:                        break;
446:                    case 2:
447:                        // (, line 96
448:                        if (!(in_grouping_b(g_st_ending, 98, 116))) {
449:                            break lab1;
450:                        }
451:                        // hop, line 96
452:                        {
453:                            int c = cursor - 3;
454:                            if (limit_backward > c || c > limit) {
455:                                break lab1;
456:                            }
457:                            cursor = c;
458:                        }
459:                        // delete, line 96
460:                        slice_del();
461:                        break;
462:                    }
463:                } while (false);
464:                cursor = limit - v_2;
465:                // do, line 100
466:                v_3 = limit - cursor;
467:                lab2: do {
468:                    // (, line 100
469:                    // [, line 101
470:                    ket = cursor;
471:                    // substring, line 101
472:                    among_var = find_among_b(a_5, 8);
473:                    if (among_var == 0) {
474:                        break lab2;
475:                    }
476:                    // ], line 101
477:                    bra = cursor;
478:                    // call R2, line 101
479:                    if (!r_R2()) {
480:                        break lab2;
481:                    }
482:                    switch (among_var) {
483:                    case 0:
484:                        break lab2;
485:                    case 1:
486:                        // (, line 103
487:                        // delete, line 103
488:                        slice_del();
489:                        // try, line 104
490:                        v_4 = limit - cursor;
491:                        lab3: do {
492:                            // (, line 104
493:                            // [, line 104
494:                            ket = cursor;
495:                            // literal, line 104
496:                            if (!(eq_s_b(2, "ig"))) {
497:                                cursor = limit - v_4;
498:                                break lab3;
499:                            }
500:                            // ], line 104
501:                            bra = cursor;
502:                            // not, line 104
503:                            {
504:                                v_5 = limit - cursor;
505:                                lab4: do {
506:                                    // literal, line 104
507:                                    if (!(eq_s_b(1, "e"))) {
508:                                        break lab4;
509:                                    }
510:                                    cursor = limit - v_4;
511:                                    break lab3;
512:                                } while (false);
513:                                cursor = limit - v_5;
514:                            }
515:                            // call R2, line 104
516:                            if (!r_R2()) {
517:                                cursor = limit - v_4;
518:                                break lab3;
519:                            }
520:                            // delete, line 104
521:                            slice_del();
522:                        } while (false);
523:                        break;
524:                    case 2:
525:                        // (, line 107
526:                        // not, line 107
527:                    {
528:                        v_6 = limit - cursor;
529:                        lab5: do {
530:                            // literal, line 107
531:                            if (!(eq_s_b(1, "e"))) {
532:                                break lab5;
533:                            }
534:                            break lab2;
535:                        } while (false);
536:                        cursor = limit - v_6;
537:                    }
538:                        // delete, line 107
539:                        slice_del();
540:                        break;
541:                    case 3:
542:                        // (, line 110
543:                        // delete, line 110
544:                        slice_del();
545:                        // try, line 111
546:                        v_7 = limit - cursor;
547:                        lab6: do {
548:                            // (, line 111
549:                            // [, line 112
550:                            ket = cursor;
551:                            // or, line 112
552:                            lab7: do {
553:                                v_8 = limit - cursor;
554:                                lab8: do {
555:                                    // literal, line 112
556:                                    if (!(eq_s_b(2, "er"))) {
557:                                        break lab8;
558:                                    }
559:                                    break lab7;
560:                                } while (false);
561:                                cursor = limit - v_8;
562:                                // literal, line 112
563:                                if (!(eq_s_b(2, "en"))) {
564:                                    cursor = limit - v_7;
565:                                    break lab6;
566:                                }
567:                            } while (false);
568:                            // ], line 112
569:                            bra = cursor;
570:                            // call R1, line 112
571:                            if (!r_R1()) {
572:                                cursor = limit - v_7;
573:                                break lab6;
574:                            }
575:                            // delete, line 112
576:                            slice_del();
577:                        } while (false);
578:                        break;
579:                    case 4:
580:                        // (, line 116
581:                        // delete, line 116
582:                        slice_del();
583:                        // try, line 117
584:                        v_9 = limit - cursor;
585:                        lab9: do {
586:                            // (, line 117
587:                            // [, line 118
588:                            ket = cursor;
589:                            // substring, line 118
590:                            among_var = find_among_b(a_4, 2);
591:                            if (among_var == 0) {
592:                                cursor = limit - v_9;
593:                                break lab9;
594:                            }
595:                            // ], line 118
596:                            bra = cursor;
597:                            // call R2, line 118
598:                            if (!r_R2()) {
599:                                cursor = limit - v_9;
600:                                break lab9;
601:                            }
602:                            switch (among_var) {
603:                            case 0:
604:                                cursor = limit - v_9;
605:                                break lab9;
606:                            case 1:
607:                                // (, line 120
608:                                // delete, line 120
609:                                slice_del();
610:                                break;
611:                            }
612:                        } while (false);
613:                        break;
614:                    }
615:                } while (false);
616:                cursor = limit - v_3;
617:                return true;
618:            }
619:
620:            public boolean stem() {
621:                int v_1;
622:                int v_2;
623:                int v_3;
624:                int v_4;
625:                // (, line 130
626:                // do, line 131
627:                v_1 = cursor;
628:                lab0: do {
629:                    // call prelude, line 131
630:                    if (!r_prelude()) {
631:                        break lab0;
632:                    }
633:                } while (false);
634:                cursor = v_1;
635:                // do, line 132
636:                v_2 = cursor;
637:                lab1: do {
638:                    // call mark_regions, line 132
639:                    if (!r_mark_regions()) {
640:                        break lab1;
641:                    }
642:                } while (false);
643:                cursor = v_2;
644:                // backwards, line 133
645:                limit_backward = cursor;
646:                cursor = limit;
647:                // do, line 134
648:                v_3 = limit - cursor;
649:                lab2: do {
650:                    // call standard_suffix, line 134
651:                    if (!r_standard_suffix()) {
652:                        break lab2;
653:                    }
654:                } while (false);
655:                cursor = limit - v_3;
656:                cursor = limit_backward; // do, line 135
657:                v_4 = cursor;
658:                lab3: do {
659:                    // call postlude, line 135
660:                    if (!r_postlude()) {
661:                        break lab3;
662:                    }
663:                } while (false);
664:                cursor = v_4;
665:                return true;
666:            }
667:
668:            public boolean equals(Object o) {
669:                return o instanceof  German2Stemmer;
670:            }
671:
672:            public int hashCode() {
673:                return German2Stemmer.class.getName().hashCode();
674:            }
675:
676:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.