Coverage Report - org.tartarus.snowball.ext.germanStemmer
 
Classes in this File Line Coverage Branch Coverage Complexity
germanStemmer
0%
0/241
0%
0/117
11.6
 
 1  
 // This file was generated automatically by the Snowball to Java compiler
 2  
 
 3  
 package org.tartarus.snowball.ext;
 4  
 
 5  
 import org.tartarus.snowball.Among;
 6  
 
 7  
  /**
 8  
   * This class was automatically generated by a Snowball to Java compiler 
 9  
   * It implements the stemming algorithm defined by a snowball script.
 10  
   */
 11  
 
 12  0
 public class germanStemmer extends org.tartarus.snowball.SnowballStemmer {
 13  
 
 14  
 private static final long serialVersionUID = 1L;
 15  
 
 16  0
         private final static germanStemmer methodObject = new germanStemmer ();
 17  
 
 18  0
                 private final static Among a_0[] = {
 19  
                     new Among ( "", -1, 6, "", methodObject ),
 20  
                     new Among ( "U", 0, 2, "", methodObject ),
 21  
                     new Among ( "Y", 0, 1, "", methodObject ),
 22  
                     new Among ( "\u00E4", 0, 3, "", methodObject ),
 23  
                     new Among ( "\u00F6", 0, 4, "", methodObject ),
 24  
                     new Among ( "\u00FC", 0, 5, "", methodObject )
 25  
                 };
 26  
 
 27  0
                 private final static Among a_1[] = {
 28  
                     new Among ( "e", -1, 1, "", methodObject ),
 29  
                     new Among ( "em", -1, 1, "", methodObject ),
 30  
                     new Among ( "en", -1, 1, "", methodObject ),
 31  
                     new Among ( "ern", -1, 1, "", methodObject ),
 32  
                     new Among ( "er", -1, 1, "", methodObject ),
 33  
                     new Among ( "s", -1, 2, "", methodObject ),
 34  
                     new Among ( "es", 5, 1, "", methodObject )
 35  
                 };
 36  
 
 37  0
                 private final static Among a_2[] = {
 38  
                     new Among ( "en", -1, 1, "", methodObject ),
 39  
                     new Among ( "er", -1, 1, "", methodObject ),
 40  
                     new Among ( "st", -1, 2, "", methodObject ),
 41  
                     new Among ( "est", 2, 1, "", methodObject )
 42  
                 };
 43  
 
 44  0
                 private final static Among a_3[] = {
 45  
                     new Among ( "ig", -1, 1, "", methodObject ),
 46  
                     new Among ( "lich", -1, 1, "", methodObject )
 47  
                 };
 48  
 
 49  0
                 private final static Among a_4[] = {
 50  
                     new Among ( "end", -1, 1, "", methodObject ),
 51  
                     new Among ( "ig", -1, 2, "", methodObject ),
 52  
                     new Among ( "ung", -1, 1, "", methodObject ),
 53  
                     new Among ( "lich", -1, 3, "", methodObject ),
 54  
                     new Among ( "isch", -1, 2, "", methodObject ),
 55  
                     new Among ( "ik", -1, 2, "", methodObject ),
 56  
                     new Among ( "heit", -1, 3, "", methodObject ),
 57  
                     new Among ( "keit", -1, 4, "", methodObject )
 58  
                 };
 59  
 
 60  0
                 private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
 61  
 
 62  0
                 private static final char g_s_ending[] = {117, 30, 5 };
 63  
 
 64  0
                 private static final char g_st_ending[] = {117, 30, 4 };
 65  
 
 66  
         private int I_x;
 67  
         private int I_p2;
 68  
         private int I_p1;
 69  
 
 70  
                 private void copy_from(germanStemmer other) {
 71  0
                     I_x = other.I_x;
 72  0
                     I_p2 = other.I_p2;
 73  0
                     I_p1 = other.I_p1;
 74  0
                     super.copy_from(other);
 75  0
                 }
 76  
 
 77  
                 private boolean r_prelude() {
 78  
             int v_1;
 79  
             int v_2;
 80  
             int v_3;
 81  
             int v_4;
 82  
             int v_5;
 83  
             int v_6;
 84  
                     // (, line 28
 85  
                     // test, line 30
 86  0
                     v_1 = cursor;
 87  
                     // repeat, line 30
 88  
                     replab0: while(true)
 89  
                     {
 90  0
                         v_2 = cursor;
 91  
                         lab1: do {
 92  
                             // (, line 30
 93  
                             // or, line 33
 94  
                             lab2: do {
 95  0
                                 v_3 = cursor;
 96  
                                 lab3: do {
 97  
                                     // (, line 31
 98  
                                     // [, line 32
 99  0
                                     bra = cursor;
 100  
                                     // literal, line 32
 101  0
                                     if (!(eq_s(1, "\u00DF")))
 102  
                                     {
 103  0
                                         break lab3;
 104  
                                     }
 105  
                                     // ], line 32
 106  0
                                     ket = cursor;
 107  
                                     // <-, line 32
 108  0
                                     slice_from("ss");
 109  0
                                     break lab2;
 110  
                                 } while (false);
 111  0
                                 cursor = v_3;
 112  
                                 // next, line 33
 113  0
                                 if (cursor >= limit)
 114  
                                 {
 115  0
                                     break lab1;
 116  
                                 }
 117  0
                                 cursor++;
 118  
                             } while (false);
 119  0
                             continue replab0;
 120  
                         } while (false);
 121  0
                         cursor = v_2;
 122  0
                         break replab0;
 123  
                     }
 124  0
                     cursor = v_1;
 125  
                     // repeat, line 36
 126  
                     replab4: while(true)
 127  
                     {
 128  0
                         v_4 = cursor;
 129  
                         lab5: do {
 130  
                             // goto, line 36
 131  
                             golab6: while(true)
 132  
                             {
 133  0
                                 v_5 = cursor;
 134  
                                 lab7: do {
 135  
                                     // (, line 36
 136  0
                                     if (!(in_grouping(g_v, 97, 252)))
 137  
                                     {
 138  0
                                         break lab7;
 139  
                                     }
 140  
                                     // [, line 37
 141  0
                                     bra = cursor;
 142  
                                     // or, line 37
 143  
                                     lab8: do {
 144  0
                                         v_6 = cursor;
 145  
                                         lab9: do {
 146  
                                             // (, line 37
 147  
                                             // literal, line 37
 148  0
                                             if (!(eq_s(1, "u")))
 149  
                                             {
 150  0
                                                 break lab9;
 151  
                                             }
 152  
                                             // ], line 37
 153  0
                                             ket = cursor;
 154  0
                                             if (!(in_grouping(g_v, 97, 252)))
 155  
                                             {
 156  0
                                                 break lab9;
 157  
                                             }
 158  
                                             // <-, line 37
 159  0
                                             slice_from("U");
 160  0
                                             break lab8;
 161  
                                         } while (false);
 162  0
                                         cursor = v_6;
 163  
                                         // (, line 38
 164  
                                         // literal, line 38
 165  0
                                         if (!(eq_s(1, "y")))
 166  
                                         {
 167  0
                                             break lab7;
 168  
                                         }
 169  
                                         // ], line 38
 170  0
                                         ket = cursor;
 171  0
                                         if (!(in_grouping(g_v, 97, 252)))
 172  
                                         {
 173  0
                                             break lab7;
 174  
                                         }
 175  
                                         // <-, line 38
 176  0
                                         slice_from("Y");
 177  
                                     } while (false);
 178  0
                                     cursor = v_5;
 179  0
                                     break golab6;
 180  
                                 } while (false);
 181  0
                                 cursor = v_5;
 182  0
                                 if (cursor >= limit)
 183  
                                 {
 184  0
                                     break lab5;
 185  
                                 }
 186  0
                                 cursor++;
 187  
                             }
 188  
                             continue replab4;
 189  
                         } while (false);
 190  0
                         cursor = v_4;
 191  0
                         break replab4;
 192  
                     }
 193  0
                     return true;
 194  
                 }
 195  
 
 196  
                 private boolean r_mark_regions() {
 197  
             int v_1;
 198  
                     // (, line 42
 199  0
                     I_p1 = limit;
 200  0
                     I_p2 = limit;
 201  
                     // test, line 47
 202  0
                     v_1 = cursor;
 203  
                     // (, line 47
 204  
                     // hop, line 47
 205  
                     {
 206  0
                         int c = cursor + 3;
 207  0
                         if (0 > c || c > limit)
 208  
                         {
 209  0
                             return false;
 210  
                         }
 211  0
                         cursor = c;
 212  
                     }
 213  
                     // setmark x, line 47
 214  0
                     I_x = cursor;
 215  0
                     cursor = v_1;
 216  
                     // gopast, line 49
 217  
                     golab0: while(true)
 218  
                     {
 219  
                         lab1: do {
 220  0
                             if (!(in_grouping(g_v, 97, 252)))
 221  
                             {
 222  
                                 break lab1;
 223  
                             }
 224  
                             break golab0;
 225  
                         } while (false);
 226  0
                         if (cursor >= limit)
 227  
                         {
 228  0
                             return false;
 229  
                         }
 230  0
                         cursor++;
 231  
                     }
 232  
                     // gopast, line 49
 233  
                     golab2: while(true)
 234  
                     {
 235  
                         lab3: do {
 236  0
                             if (!(out_grouping(g_v, 97, 252)))
 237  
                             {
 238  
                                 break lab3;
 239  
                             }
 240  
                             break golab2;
 241  
                         } while (false);
 242  0
                         if (cursor >= limit)
 243  
                         {
 244  0
                             return false;
 245  
                         }
 246  0
                         cursor++;
 247  
                     }
 248  
                     // setmark p1, line 49
 249  0
                     I_p1 = cursor;
 250  
                     // try, line 50
 251  
                     lab4: do {
 252  
                         // (, line 50
 253  0
                         if (!(I_p1 < I_x))
 254  
                         {
 255  0
                             break lab4;
 256  
                         }
 257  0
                         I_p1 = I_x;
 258  
                     } while (false);
 259  
                     // gopast, line 51
 260  
                     golab5: while(true)
 261  
                     {
 262  
                         lab6: do {
 263  0
                             if (!(in_grouping(g_v, 97, 252)))
 264  
                             {
 265  
                                 break lab6;
 266  
                             }
 267  
                             break golab5;
 268  
                         } while (false);
 269  0
                         if (cursor >= limit)
 270  
                         {
 271  0
                             return false;
 272  
                         }
 273  0
                         cursor++;
 274  
                     }
 275  
                     // gopast, line 51
 276  
                     golab7: while(true)
 277  
                     {
 278  
                         lab8: do {
 279  0
                             if (!(out_grouping(g_v, 97, 252)))
 280  
                             {
 281  
                                 break lab8;
 282  
                             }
 283  
                             break golab7;
 284  
                         } while (false);
 285  0
                         if (cursor >= limit)
 286  
                         {
 287  0
                             return false;
 288  
                         }
 289  0
                         cursor++;
 290  
                     }
 291  
                     // setmark p2, line 51
 292  0
                     I_p2 = cursor;
 293  0
                     return true;
 294  
                 }
 295  
 
 296  
                 private boolean r_postlude() {
 297  
             int among_var;
 298  
             int v_1;
 299  
                     // repeat, line 55
 300  
                     replab0: while(true)
 301  
                     {
 302  0
                         v_1 = cursor;
 303  
                         lab1: do {
 304  
                             // (, line 55
 305  
                             // [, line 57
 306  0
                             bra = cursor;
 307  
                             // substring, line 57
 308  0
                             among_var = find_among(a_0, 6);
 309  0
                             if (among_var == 0)
 310  
                             {
 311  0
                                 break lab1;
 312  
                             }
 313  
                             // ], line 57
 314  0
                             ket = cursor;
 315  0
                             switch(among_var) {
 316  
                                 case 0:
 317  0
                                     break lab1;
 318  
                                 case 1:
 319  
                                     // (, line 58
 320  
                                     // <-, line 58
 321  0
                                     slice_from("y");
 322  0
                                     break;
 323  
                                 case 2:
 324  
                                     // (, line 59
 325  
                                     // <-, line 59
 326  0
                                     slice_from("u");
 327  0
                                     break;
 328  
                                 case 3:
 329  
                                     // (, line 60
 330  
                                     // <-, line 60
 331  0
                                     slice_from("a");
 332  0
                                     break;
 333  
                                 case 4:
 334  
                                     // (, line 61
 335  
                                     // <-, line 61
 336  0
                                     slice_from("o");
 337  0
                                     break;
 338  
                                 case 5:
 339  
                                     // (, line 62
 340  
                                     // <-, line 62
 341  0
                                     slice_from("u");
 342  0
                                     break;
 343  
                                 case 6:
 344  
                                     // (, line 63
 345  
                                     // next, line 63
 346  0
                                     if (cursor >= limit)
 347  
                                     {
 348  0
                                         break lab1;
 349  
                                     }
 350  0
                                     cursor++;
 351  
                                     break;
 352  
                             }
 353  0
                             continue replab0;
 354  
                         } while (false);
 355  0
                         cursor = v_1;
 356  0
                         break replab0;
 357  
                     }
 358  0
                     return true;
 359  
                 }
 360  
 
 361  
                 private boolean r_R1() {
 362  0
                     if (!(I_p1 <= cursor))
 363  
                     {
 364  0
                         return false;
 365  
                     }
 366  0
                     return true;
 367  
                 }
 368  
 
 369  
                 private boolean r_R2() {
 370  0
                     if (!(I_p2 <= cursor))
 371  
                     {
 372  0
                         return false;
 373  
                     }
 374  0
                     return true;
 375  
                 }
 376  
 
 377  
                 private boolean r_standard_suffix() {
 378  
             int among_var;
 379  
             int v_1;
 380  
             int v_2;
 381  
             int v_3;
 382  
             int v_4;
 383  
             int v_5;
 384  
             int v_6;
 385  
             int v_7;
 386  
             int v_8;
 387  
             int v_9;
 388  
                     // (, line 73
 389  
                     // do, line 74
 390  0
                     v_1 = limit - cursor;
 391  
                     lab0: do {
 392  
                         // (, line 74
 393  
                         // [, line 75
 394  0
                         ket = cursor;
 395  
                         // substring, line 75
 396  0
                         among_var = find_among_b(a_1, 7);
 397  0
                         if (among_var == 0)
 398  
                         {
 399  0
                             break lab0;
 400  
                         }
 401  
                         // ], line 75
 402  0
                         bra = cursor;
 403  
                         // call R1, line 75
 404  0
                         if (!r_R1())
 405  
                         {
 406  0
                             break lab0;
 407  
                         }
 408  0
                         switch(among_var) {
 409  
                             case 0:
 410  0
                                 break lab0;
 411  
                             case 1:
 412  
                                 // (, line 77
 413  
                                 // delete, line 77
 414  0
                                 slice_del();
 415  0
                                 break;
 416  
                             case 2:
 417  
                                 // (, line 80
 418  0
                                 if (!(in_grouping_b(g_s_ending, 98, 116)))
 419  
                                 {
 420  0
                                     break lab0;
 421  
                                 }
 422  
                                 // delete, line 80
 423  0
                                 slice_del();
 424  
                                 break;
 425  
                         }
 426  
                     } while (false);
 427  0
                     cursor = limit - v_1;
 428  
                     // do, line 84
 429  0
                     v_2 = limit - cursor;
 430  
                     lab1: do {
 431  
                         // (, line 84
 432  
                         // [, line 85
 433  0
                         ket = cursor;
 434  
                         // substring, line 85
 435  0
                         among_var = find_among_b(a_2, 4);
 436  0
                         if (among_var == 0)
 437  
                         {
 438  0
                             break lab1;
 439  
                         }
 440  
                         // ], line 85
 441  0
                         bra = cursor;
 442  
                         // call R1, line 85
 443  0
                         if (!r_R1())
 444  
                         {
 445  0
                             break lab1;
 446  
                         }
 447  0
                         switch(among_var) {
 448  
                             case 0:
 449  0
                                 break lab1;
 450  
                             case 1:
 451  
                                 // (, line 87
 452  
                                 // delete, line 87
 453  0
                                 slice_del();
 454  0
                                 break;
 455  
                             case 2:
 456  
                                 // (, line 90
 457  0
                                 if (!(in_grouping_b(g_st_ending, 98, 116)))
 458  
                                 {
 459  0
                                     break lab1;
 460  
                                 }
 461  
                                 // hop, line 90
 462  
                                 {
 463  0
                                     int c = cursor - 3;
 464  0
                                     if (limit_backward > c || c > limit)
 465  
                                     {
 466  0
                                         break lab1;
 467  
                                     }
 468  0
                                     cursor = c;
 469  
                                 }
 470  
                                 // delete, line 90
 471  0
                                 slice_del();
 472  
                                 break;
 473  
                         }
 474  
                     } while (false);
 475  0
                     cursor = limit - v_2;
 476  
                     // do, line 94
 477  0
                     v_3 = limit - cursor;
 478  
                     lab2: do {
 479  
                         // (, line 94
 480  
                         // [, line 95
 481  0
                         ket = cursor;
 482  
                         // substring, line 95
 483  0
                         among_var = find_among_b(a_4, 8);
 484  0
                         if (among_var == 0)
 485  
                         {
 486  0
                             break lab2;
 487  
                         }
 488  
                         // ], line 95
 489  0
                         bra = cursor;
 490  
                         // call R2, line 95
 491  0
                         if (!r_R2())
 492  
                         {
 493  0
                             break lab2;
 494  
                         }
 495  0
                         switch(among_var) {
 496  
                             case 0:
 497  0
                                 break lab2;
 498  
                             case 1:
 499  
                                 // (, line 97
 500  
                                 // delete, line 97
 501  0
                                 slice_del();
 502  
                                 // try, line 98
 503  0
                                 v_4 = limit - cursor;
 504  
                                 lab3: do {
 505  
                                     // (, line 98
 506  
                                     // [, line 98
 507  0
                                     ket = cursor;
 508  
                                     // literal, line 98
 509  0
                                     if (!(eq_s_b(2, "ig")))
 510  
                                     {
 511  0
                                         cursor = limit - v_4;
 512  0
                                         break lab3;
 513  
                                     }
 514  
                                     // ], line 98
 515  0
                                     bra = cursor;
 516  
                                     // not, line 98
 517  
                                     {
 518  0
                                         v_5 = limit - cursor;
 519  
                                         lab4: do {
 520  
                                             // literal, line 98
 521  0
                                             if (!(eq_s_b(1, "e")))
 522  
                                             {
 523  0
                                                 break lab4;
 524  
                                             }
 525  0
                                             cursor = limit - v_4;
 526  0
                                             break lab3;
 527  
                                         } while (false);
 528  0
                                         cursor = limit - v_5;
 529  
                                     }
 530  
                                     // call R2, line 98
 531  0
                                     if (!r_R2())
 532  
                                     {
 533  0
                                         cursor = limit - v_4;
 534  0
                                         break lab3;
 535  
                                     }
 536  
                                     // delete, line 98
 537  0
                                     slice_del();
 538  
                                 } while (false);
 539  0
                                 break;
 540  
                             case 2:
 541  
                                 // (, line 101
 542  
                                 // not, line 101
 543  
                                 {
 544  0
                                     v_6 = limit - cursor;
 545  
                                     lab5: do {
 546  
                                         // literal, line 101
 547  0
                                         if (!(eq_s_b(1, "e")))
 548  
                                         {
 549  
                                             break lab5;
 550  
                                         }
 551  
                                         break lab2;
 552  
                                     } while (false);
 553  0
                                     cursor = limit - v_6;
 554  
                                 }
 555  
                                 // delete, line 101
 556  0
                                 slice_del();
 557  0
                                 break;
 558  
                             case 3:
 559  
                                 // (, line 104
 560  
                                 // delete, line 104
 561  0
                                 slice_del();
 562  
                                 // try, line 105
 563  0
                                 v_7 = limit - cursor;
 564  
                                 lab6: do {
 565  
                                     // (, line 105
 566  
                                     // [, line 106
 567  0
                                     ket = cursor;
 568  
                                     // or, line 106
 569  
                                     lab7: do {
 570  0
                                         v_8 = limit - cursor;
 571  
                                         lab8: do {
 572  
                                             // literal, line 106
 573  0
                                             if (!(eq_s_b(2, "er")))
 574  
                                             {
 575  
                                                 break lab8;
 576  
                                             }
 577  
                                             break lab7;
 578  
                                         } while (false);
 579  0
                                         cursor = limit - v_8;
 580  
                                         // literal, line 106
 581  0
                                         if (!(eq_s_b(2, "en")))
 582  
                                         {
 583  0
                                             cursor = limit - v_7;
 584  0
                                             break lab6;
 585  
                                         }
 586  
                                     } while (false);
 587  
                                     // ], line 106
 588  0
                                     bra = cursor;
 589  
                                     // call R1, line 106
 590  0
                                     if (!r_R1())
 591  
                                     {
 592  0
                                         cursor = limit - v_7;
 593  0
                                         break lab6;
 594  
                                     }
 595  
                                     // delete, line 106
 596  0
                                     slice_del();
 597  
                                 } while (false);
 598  0
                                 break;
 599  
                             case 4:
 600  
                                 // (, line 110
 601  
                                 // delete, line 110
 602  0
                                 slice_del();
 603  
                                 // try, line 111
 604  0
                                 v_9 = limit - cursor;
 605  
                                 lab9: do {
 606  
                                     // (, line 111
 607  
                                     // [, line 112
 608  0
                                     ket = cursor;
 609  
                                     // substring, line 112
 610  0
                                     among_var = find_among_b(a_3, 2);
 611  0
                                     if (among_var == 0)
 612  
                                     {
 613  0
                                         cursor = limit - v_9;
 614  0
                                         break lab9;
 615  
                                     }
 616  
                                     // ], line 112
 617  0
                                     bra = cursor;
 618  
                                     // call R2, line 112
 619  0
                                     if (!r_R2())
 620  
                                     {
 621  0
                                         cursor = limit - v_9;
 622  0
                                         break lab9;
 623  
                                     }
 624  0
                                     switch(among_var) {
 625  
                                         case 0:
 626  0
                                             cursor = limit - v_9;
 627  0
                                             break lab9;
 628  
                                         case 1:
 629  
                                             // (, line 114
 630  
                                             // delete, line 114
 631  0
                                             slice_del();
 632  
                                             break;
 633  
                                     }
 634  
                                 } while (false);
 635  
                                 break;
 636  
                         }
 637  
                     } while (false);
 638  0
                     cursor = limit - v_3;
 639  0
                     return true;
 640  
                 }
 641  
 
 642  
                 public boolean stem() {
 643  
             int v_1;
 644  
             int v_2;
 645  
             int v_3;
 646  
             int v_4;
 647  
                     // (, line 124
 648  
                     // do, line 125
 649  0
                     v_1 = cursor;
 650  
                     lab0: do {
 651  
                         // call prelude, line 125
 652  0
                         if (!r_prelude())
 653  
                         {
 654  
                             break lab0;
 655  
                         }
 656  
                     } while (false);
 657  0
                     cursor = v_1;
 658  
                     // do, line 126
 659  0
                     v_2 = cursor;
 660  
                     lab1: do {
 661  
                         // call mark_regions, line 126
 662  0
                         if (!r_mark_regions())
 663  
                         {
 664  
                             break lab1;
 665  
                         }
 666  
                     } while (false);
 667  0
                     cursor = v_2;
 668  
                     // backwards, line 127
 669  0
                     limit_backward = cursor; cursor = limit;
 670  
                     // do, line 128
 671  0
                     v_3 = limit - cursor;
 672  
                     lab2: do {
 673  
                         // call standard_suffix, line 128
 674  0
                         if (!r_standard_suffix())
 675  
                         {
 676  
                             break lab2;
 677  
                         }
 678  
                     } while (false);
 679  0
                     cursor = limit - v_3;
 680  0
                     cursor = limit_backward;                    // do, line 129
 681  0
                     v_4 = cursor;
 682  
                     lab3: do {
 683  
                         // call postlude, line 129
 684  0
                         if (!r_postlude())
 685  
                         {
 686  
                             break lab3;
 687  
                         }
 688  
                     } while (false);
 689  0
                     cursor = v_4;
 690  0
                     return true;
 691  
                 }
 692  
 
 693  
         public boolean equals( Object o ) {
 694  0
             return o instanceof germanStemmer;
 695  
         }
 696  
 
 697  
         public int hashCode() {
 698  0
             return germanStemmer.class.getName().hashCode();
 699  
         }
 700  
 
 701  
 
 702  
 
 703  
 }
 704