Source Code Cross Referenced for German2Stemmer.java in  » Net » lucene-connector » net » sf » snowball » ext » 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 » Net » lucene connector » net.sf.snowball.ext 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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