Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
RomanianStemmer.cs
Go to the documentation of this file.
1 /*
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements. See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership. The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied. See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20 */
21 
22 /*
23 
24 Copyright (c) 2001, Dr Martin Porter
25 Copyright (c) 2002, Richard Boulton
26 All rights reserved.
27 
28 Redistribution and use in source and binary forms, with or without
29 modification, are permitted provided that the following conditions are met:
30 
31  * Redistributions of source code must retain the above copyright notice,
32  * this list of conditions and the following disclaimer.
33  * Redistributions in binary form must reproduce the above copyright
34  * notice, this list of conditions and the following disclaimer in the
35  * documentation and/or other materials provided with the distribution.
36  * Neither the name of the copyright holders nor the names of its contributors
37  * may be used to endorse or promote products derived from this software
38  * without specific prior written permission.
39 
40 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
41 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
44 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
46 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
47 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
48 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 
51  */
52 
53 
54 using System;
55 using Among = SF.Snowball.Among;
56 using SnowballProgram = SF.Snowball.SnowballProgram;
57 namespace SF.Snowball.Ext
58 {
59  /*
60  * Generated class implementing code defined by a snowball script.
61  */
63  {
64 
65  public RomanianStemmer()
66  {
67  a_0 = new Among[] {
68  new Among("", -1, 3, "", null),
69  new Among("I", 0, 1, "", null),
70  new Among("U", 0, 2, "", null)
71  };
72 
73  a_1 = new Among[] {
74  new Among("ea", -1, 3, "", null),
75  new Among("a\u0163ia", -1, 7, "", null),
76  new Among("aua", -1, 2, "", null),
77  new Among("iua", -1, 4, "", null),
78  new Among("a\u0163ie", -1, 7, "", null),
79  new Among("ele", -1, 3, "", null),
80  new Among("ile", -1, 5, "", null),
81  new Among("iile", 6, 4, "", null),
82  new Among("iei", -1, 4, "", null),
83  new Among("atei", -1, 6, "", null),
84  new Among("ii", -1, 4, "", null),
85  new Among("ului", -1, 1, "", null),
86  new Among("ul", -1, 1, "", null),
87  new Among("elor", -1, 3, "", null),
88  new Among("ilor", -1, 4, "", null),
89  new Among("iilor", 14, 4, "", null)
90  };
91 
92  a_2 = new Among[] {
93  new Among("icala", -1, 4, "", null),
94  new Among("iciva", -1, 4, "", null),
95  new Among("ativa", -1, 5, "", null),
96  new Among("itiva", -1, 6, "", null),
97  new Among("icale", -1, 4, "", null),
98  new Among("a\u0163iune", -1, 5, "", null),
99  new Among("i\u0163iune", -1, 6, "", null),
100  new Among("atoare", -1, 5, "", null),
101  new Among("itoare", -1, 6, "", null),
102  new Among("\u0103toare", -1, 5, "", null),
103  new Among("icitate", -1, 4, "", null),
104  new Among("abilitate", -1, 1, "", null),
105  new Among("ibilitate", -1, 2, "", null),
106  new Among("ivitate", -1, 3, "", null),
107  new Among("icive", -1, 4, "", null),
108  new Among("ative", -1, 5, "", null),
109  new Among("itive", -1, 6, "", null),
110  new Among("icali", -1, 4, "", null),
111  new Among("atori", -1, 5, "", null),
112  new Among("icatori", 18, 4, "", null),
113  new Among("itori", -1, 6, "", null),
114  new Among("\u0103tori", -1, 5, "", null),
115  new Among("icitati", -1, 4, "", null),
116  new Among("abilitati", -1, 1, "", null),
117  new Among("ivitati", -1, 3, "", null),
118  new Among("icivi", -1, 4, "", null),
119  new Among("ativi", -1, 5, "", null),
120  new Among("itivi", -1, 6, "", null),
121  new Among("icit\u0103i", -1, 4, "", null),
122  new Among("abilit\u0103i", -1, 1, "", null),
123  new Among("ivit\u0103i", -1, 3, "", null),
124  new Among("icit\u0103\u0163i", -1, 4, "", null),
125  new Among("abilit\u0103\u0163i", -1, 1, "", null),
126  new Among("ivit\u0103\u0163i", -1, 3, "", null),
127  new Among("ical", -1, 4, "", null),
128  new Among("ator", -1, 5, "", null),
129  new Among("icator", 35, 4, "", null),
130  new Among("itor", -1, 6, "", null),
131  new Among("\u0103tor", -1, 5, "", null),
132  new Among("iciv", -1, 4, "", null),
133  new Among("ativ", -1, 5, "", null),
134  new Among("itiv", -1, 6, "", null),
135  new Among("ical\u0103", -1, 4, "", null),
136  new Among("iciv\u0103", -1, 4, "", null),
137  new Among("ativ\u0103", -1, 5, "", null),
138  new Among("itiv\u0103", -1, 6, "", null)
139  };
140 
141  a_3 = new Among[] {
142  new Among("ica", -1, 1, "", null),
143  new Among("abila", -1, 1, "", null),
144  new Among("ibila", -1, 1, "", null),
145  new Among("oasa", -1, 1, "", null),
146  new Among("ata", -1, 1, "", null),
147  new Among("ita", -1, 1, "", null),
148  new Among("anta", -1, 1, "", null),
149  new Among("ista", -1, 3, "", null),
150  new Among("uta", -1, 1, "", null),
151  new Among("iva", -1, 1, "", null),
152  new Among("ic", -1, 1, "", null),
153  new Among("ice", -1, 1, "", null),
154  new Among("abile", -1, 1, "", null),
155  new Among("ibile", -1, 1, "", null),
156  new Among("isme", -1, 3, "", null),
157  new Among("iune", -1, 2, "", null),
158  new Among("oase", -1, 1, "", null),
159  new Among("ate", -1, 1, "", null),
160  new Among("itate", 17, 1, "", null),
161  new Among("ite", -1, 1, "", null),
162  new Among("ante", -1, 1, "", null),
163  new Among("iste", -1, 3, "", null),
164  new Among("ute", -1, 1, "", null),
165  new Among("ive", -1, 1, "", null),
166  new Among("ici", -1, 1, "", null),
167  new Among("abili", -1, 1, "", null),
168  new Among("ibili", -1, 1, "", null),
169  new Among("iuni", -1, 2, "", null),
170  new Among("atori", -1, 1, "", null),
171  new Among("osi", -1, 1, "", null),
172  new Among("ati", -1, 1, "", null),
173  new Among("itati", 30, 1, "", null),
174  new Among("iti", -1, 1, "", null),
175  new Among("anti", -1, 1, "", null),
176  new Among("isti", -1, 3, "", null),
177  new Among("uti", -1, 1, "", null),
178  new Among("i\u015Fti", -1, 3, "", null),
179  new Among("ivi", -1, 1, "", null),
180  new Among("it\u0103i", -1, 1, "", null),
181  new Among("o\u015Fi", -1, 1, "", null),
182  new Among("it\u0103\u0163i", -1, 1, "", null),
183  new Among("abil", -1, 1, "", null),
184  new Among("ibil", -1, 1, "", null),
185  new Among("ism", -1, 3, "", null),
186  new Among("ator", -1, 1, "", null),
187  new Among("os", -1, 1, "", null),
188  new Among("at", -1, 1, "", null),
189  new Among("it", -1, 1, "", null),
190  new Among("ant", -1, 1, "", null),
191  new Among("ist", -1, 3, "", null),
192  new Among("ut", -1, 1, "", null),
193  new Among("iv", -1, 1, "", null),
194  new Among("ic\u0103", -1, 1, "", null),
195  new Among("abil\u0103", -1, 1, "", null),
196  new Among("ibil\u0103", -1, 1, "", null),
197  new Among("oas\u0103", -1, 1, "", null),
198  new Among("at\u0103", -1, 1, "", null),
199  new Among("it\u0103", -1, 1, "", null),
200  new Among("ant\u0103", -1, 1, "", null),
201  new Among("ist\u0103", -1, 3, "", null),
202  new Among("ut\u0103", -1, 1, "", null),
203  new Among("iv\u0103", -1, 1, "", null)
204  };
205 
206  a_4 = new Among[] {
207  new Among("ea", -1, 1, "", null),
208  new Among("ia", -1, 1, "", null),
209  new Among("esc", -1, 1, "", null),
210  new Among("\u0103sc", -1, 1, "", null),
211  new Among("ind", -1, 1, "", null),
212  new Among("\u00E2nd", -1, 1, "", null),
213  new Among("are", -1, 1, "", null),
214  new Among("ere", -1, 1, "", null),
215  new Among("ire", -1, 1, "", null),
216  new Among("\u00E2re", -1, 1, "", null),
217  new Among("se", -1, 2, "", null),
218  new Among("ase", 10, 1, "", null),
219  new Among("sese", 10, 2, "", null),
220  new Among("ise", 10, 1, "", null),
221  new Among("use", 10, 1, "", null),
222  new Among("\u00E2se", 10, 1, "", null),
223  new Among("e\u015Fte", -1, 1, "", null),
224  new Among("\u0103\u015Fte", -1, 1, "", null),
225  new Among("eze", -1, 1, "", null),
226  new Among("ai", -1, 1, "", null),
227  new Among("eai", 19, 1, "", null),
228  new Among("iai", 19, 1, "", null),
229  new Among("sei", -1, 2, "", null),
230  new Among("e\u015Fti", -1, 1, "", null),
231  new Among("\u0103\u015Fti", -1, 1, "", null),
232  new Among("ui", -1, 1, "", null),
233  new Among("ezi", -1, 1, "", null),
234  new Among("\u00E2i", -1, 1, "", null),
235  new Among("a\u015Fi", -1, 1, "", null),
236  new Among("se\u015Fi", -1, 2, "", null),
237  new Among("ase\u015Fi", 29, 1, "", null),
238  new Among("sese\u015Fi", 29, 2, "", null),
239  new Among("ise\u015Fi", 29, 1, "", null),
240  new Among("use\u015Fi", 29, 1, "", null),
241  new Among("\u00E2se\u015Fi", 29, 1, "", null),
242  new Among("i\u015Fi", -1, 1, "", null),
243  new Among("u\u015Fi", -1, 1, "", null),
244  new Among("\u00E2\u015Fi", -1, 1, "", null),
245  new Among("a\u0163i", -1, 2, "", null),
246  new Among("ea\u0163i", 38, 1, "", null),
247  new Among("ia\u0163i", 38, 1, "", null),
248  new Among("e\u0163i", -1, 2, "", null),
249  new Among("i\u0163i", -1, 2, "", null),
250  new Among("\u00E2\u0163i", -1, 2, "", null),
251  new Among("ar\u0103\u0163i", -1, 1, "", null),
252  new Among("ser\u0103\u0163i", -1, 2, "", null),
253  new Among("aser\u0103\u0163i", 45, 1, "", null),
254  new Among("seser\u0103\u0163i", 45, 2, "", null),
255  new Among("iser\u0103\u0163i", 45, 1, "", null),
256  new Among("user\u0103\u0163i", 45, 1, "", null),
257  new Among("\u00E2ser\u0103\u0163i", 45, 1, "", null),
258  new Among("ir\u0103\u0163i", -1, 1, "", null),
259  new Among("ur\u0103\u0163i", -1, 1, "", null),
260  new Among("\u00E2r\u0103\u0163i", -1, 1, "", null),
261  new Among("am", -1, 1, "", null),
262  new Among("eam", 54, 1, "", null),
263  new Among("iam", 54, 1, "", null),
264  new Among("em", -1, 2, "", null),
265  new Among("asem", 57, 1, "", null),
266  new Among("sesem", 57, 2, "", null),
267  new Among("isem", 57, 1, "", null),
268  new Among("usem", 57, 1, "", null),
269  new Among("\u00E2sem", 57, 1, "", null),
270  new Among("im", -1, 2, "", null),
271  new Among("\u00E2m", -1, 2, "", null),
272  new Among("\u0103m", -1, 2, "", null),
273  new Among("ar\u0103m", 65, 1, "", null),
274  new Among("ser\u0103m", 65, 2, "", null),
275  new Among("aser\u0103m", 67, 1, "", null),
276  new Among("seser\u0103m", 67, 2, "", null),
277  new Among("iser\u0103m", 67, 1, "", null),
278  new Among("user\u0103m", 67, 1, "", null),
279  new Among("\u00E2ser\u0103m", 67, 1, "", null),
280  new Among("ir\u0103m", 65, 1, "", null),
281  new Among("ur\u0103m", 65, 1, "", null),
282  new Among("\u00E2r\u0103m", 65, 1, "", null),
283  new Among("au", -1, 1, "", null),
284  new Among("eau", 76, 1, "", null),
285  new Among("iau", 76, 1, "", null),
286  new Among("indu", -1, 1, "", null),
287  new Among("\u00E2ndu", -1, 1, "", null),
288  new Among("ez", -1, 1, "", null),
289  new Among("easc\u0103", -1, 1, "", null),
290  new Among("ar\u0103", -1, 1, "", null),
291  new Among("ser\u0103", -1, 2, "", null),
292  new Among("aser\u0103", 84, 1, "", null),
293  new Among("seser\u0103", 84, 2, "", null),
294  new Among("iser\u0103", 84, 1, "", null),
295  new Among("user\u0103", 84, 1, "", null),
296  new Among("\u00E2ser\u0103", 84, 1, "", null),
297  new Among("ir\u0103", -1, 1, "", null),
298  new Among("ur\u0103", -1, 1, "", null),
299  new Among("\u00E2r\u0103", -1, 1, "", null),
300  new Among("eaz\u0103", -1, 1, "", null)
301  };
302 
303  a_5 = new Among[] {
304  new Among("a", -1, 1, "", null),
305  new Among("e", -1, 1, "", null),
306  new Among("ie", 1, 1, "", null),
307  new Among("i", -1, 1, "", null),
308  new Among("\u0103", -1, 1, "", null)
309  };
310 
311  }
312 
313  private Among[] a_0;
314  private Among[] a_1;
315  private Among[] a_2;
316  private Among[] a_3;
317  private Among[] a_4;
318  private Among[] a_5;
319  private static readonly char[] g_v = new char[] { (char)17, (char)65, (char)16, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)2, (char)32, (char)0, (char)0, (char)4 };
320 
321  private bool B_standard_suffix_removed;
322  private int I_p2;
323  private int I_p1;
324  private int I_pV;
325 
326  private void copy_from(RomanianStemmer other)
327  {
328  B_standard_suffix_removed = other.B_standard_suffix_removed;
329  I_p2 = other.I_p2;
330  I_p1 = other.I_p1;
331  I_pV = other.I_pV;
332  base.copy_from(other);
333  }
334 
335  private bool r_prelude()
336  {
337  int v_1;
338  int v_2;
339  int v_3;
340  // (, line 31
341  // repeat, line 32
342  replab0:
343  v_1 = cursor;
344  // goto, line 32
345  while (true)
346  {
347  v_2 = cursor;
348  // (, line 32
349  if (!(in_grouping(g_v, 97, 259)))
350  {
351  goto lab3;
352  }
353  // [, line 33
354  bra = cursor;
355  // or, line 33
356  v_3 = cursor;
357  // (, line 33
358  // literal, line 33
359  if (!(eq_s(1, "u")))
360  {
361  goto lab5;
362  }
363  // ], line 33
364  ket = cursor;
365  if (!(in_grouping(g_v, 97, 259)))
366  {
367  goto lab5;
368  }
369  // <-, line 33
370  slice_from("U");
371  goto lab4;
372  lab5:
373  cursor = v_3;
374  // (, line 34
375  // literal, line 34
376  if (!(eq_s(1, "i")))
377  {
378  goto lab3;
379  }
380  // ], line 34
381  ket = cursor;
382  if (!(in_grouping(g_v, 97, 259)))
383  {
384  goto lab3;
385  }
386  // <-, line 34
387  slice_from("I");
388  lab4:
389  cursor = v_2;
390  goto golab2;
391  lab3:
392  cursor = v_2;
393  if (cursor >= limit)
394  {
395  goto lab1;
396  }
397  cursor++;
398  }
399  golab2:
400  goto replab0;
401  lab1:
402  cursor = v_1;
403  return true;
404  }
405 
406  private bool r_mark_regions()
407  {
408  int v_1;
409  int v_2;
410  int v_3;
411  int v_6;
412  int v_8;
413  // (, line 38
414  I_pV = limit;
415  I_p1 = limit;
416  I_p2 = limit;
417  // do, line 44
418  v_1 = cursor;
419  // (, line 44
420  // or, line 46
421  v_2 = cursor;
422  // (, line 45
423  if (!(in_grouping(g_v, 97, 259)))
424  {
425  goto lab2;
426  }
427  // or, line 45
428  v_3 = cursor;
429  // (, line 45
430  if (!(out_grouping(g_v, 97, 259)))
431  {
432  goto lab4;
433  }
434  // gopast, line 45
435  while (true)
436  {
437  if (!(in_grouping(g_v, 97, 259)))
438  {
439  goto lab6;
440  }
441  goto golab5;
442  lab6:
443  if (cursor >= limit)
444  {
445  goto lab4;
446  }
447  cursor++;
448  }
449  golab5:
450  goto lab3;
451  lab4:
452  cursor = v_3;
453  // (, line 45
454  if (!(in_grouping(g_v, 97, 259)))
455  {
456  goto lab2;
457  }
458  // gopast, line 45
459  while (true)
460  {
461  if (!(out_grouping(g_v, 97, 259)))
462  {
463  goto lab8;
464  }
465  goto golab7;
466  lab8:
467  if (cursor >= limit)
468  {
469  goto lab2;
470  }
471  cursor++;
472  }
473  golab7:
474  lab3:
475  goto lab1;
476  lab2:
477  cursor = v_2;
478  // (, line 47
479  if (!(out_grouping(g_v, 97, 259)))
480  {
481  goto lab0;
482  }
483  // or, line 47
484  v_6 = cursor;
485  // (, line 47
486  if (!(out_grouping(g_v, 97, 259)))
487  {
488  goto lab10;
489  }
490  // gopast, line 47
491  while (true)
492  {
493  if (!(in_grouping(g_v, 97, 259)))
494  {
495  goto lab12;
496  }
497  goto golab11;
498  lab12:
499  if (cursor >= limit)
500  {
501  goto lab10;
502  }
503  cursor++;
504  }
505  golab11:
506  goto lab9;
507  lab10:
508  cursor = v_6;
509  // (, line 47
510  if (!(in_grouping(g_v, 97, 259)))
511  {
512  goto lab0;
513  }
514  // next, line 47
515  if (cursor >= limit)
516  {
517  goto lab0;
518  }
519  cursor++;
520  lab9:
521  lab1:
522  // setmark pV, line 48
523  I_pV = cursor;
524  lab0:
525  cursor = v_1;
526  // do, line 50
527  v_8 = cursor;
528  // (, line 50
529  // gopast, line 51
530  while (true)
531  {
532  if (!(in_grouping(g_v, 97, 259)))
533  {
534  goto lab15;
535  }
536  goto golab14;
537  lab15:
538  if (cursor >= limit)
539  {
540  goto lab13;
541  }
542  cursor++;
543  }
544  golab14:
545  // gopast, line 51
546  while (true)
547  {
548  if (!(out_grouping(g_v, 97, 259)))
549  {
550  goto lab17;
551  }
552  goto golab16;
553  lab17:
554  if (cursor >= limit)
555  {
556  goto lab13;
557  }
558  cursor++;
559  }
560  golab16:
561  // setmark p1, line 51
562  I_p1 = cursor;
563  // gopast, line 52
564  while (true)
565  {
566  if (!(in_grouping(g_v, 97, 259)))
567  {
568  goto lab19;
569  }
570  goto golab18;
571  lab19:
572  if (cursor >= limit)
573  {
574  goto lab13;
575  }
576  cursor++;
577  }
578  golab18:
579  // gopast, line 52
580  while (true)
581  {
582  if (!(out_grouping(g_v, 97, 259)))
583  {
584  goto lab21;
585  }
586  goto golab20;
587  lab21:
588  if (cursor >= limit)
589  {
590  goto lab13;
591  }
592  cursor++;
593  }
594  golab20:
595  // setmark p2, line 52
596  I_p2 = cursor;
597  lab13:
598  cursor = v_8;
599  return true;
600  }
601 
602  private bool r_postlude()
603  {
604  int among_var;
605  int v_1;
606  // repeat, line 56
607  replab0:
608  v_1 = cursor;
609  // (, line 56
610  // [, line 58
611  bra = cursor;
612  // substring, line 58
613  among_var = find_among(a_0, 3);
614  if (among_var == 0)
615  {
616  goto lab1;
617  }
618  // ], line 58
619  ket = cursor;
620  switch (among_var)
621  {
622  case 0:
623  goto lab1;
624  case 1:
625  // (, line 59
626  // <-, line 59
627  slice_from("i");
628  break;
629  case 2:
630  // (, line 60
631  // <-, line 60
632  slice_from("u");
633  break;
634  case 3:
635  // (, line 61
636  // next, line 61
637  if (cursor >= limit)
638  {
639  goto lab1;
640  }
641  cursor++;
642  break;
643  }
644  goto replab0;
645  lab1:
646  cursor = v_1;
647  return true;
648  }
649 
650  private bool r_RV()
651  {
652  if (!(I_pV <= cursor))
653  {
654  return false;
655  }
656  return true;
657  }
658 
659  private bool r_R1()
660  {
661  if (!(I_p1 <= cursor))
662  {
663  return false;
664  }
665  return true;
666  }
667 
668  private bool r_R2()
669  {
670  if (!(I_p2 <= cursor))
671  {
672  return false;
673  }
674  return true;
675  }
676 
677  private bool r_step_0()
678  {
679  int among_var;
680  int v_1;
681  // (, line 72
682  // [, line 73
683  ket = cursor;
684  // substring, line 73
685  among_var = find_among_b(a_1, 16);
686  if (among_var == 0)
687  {
688  return false;
689  }
690  // ], line 73
691  bra = cursor;
692  // call R1, line 73
693  if (!r_R1())
694  {
695  return false;
696  }
697  switch (among_var)
698  {
699  case 0:
700  return false;
701  case 1:
702  // (, line 75
703  // delete, line 75
704  slice_del();
705  break;
706  case 2:
707  // (, line 77
708  // <-, line 77
709  slice_from("a");
710  break;
711  case 3:
712  // (, line 79
713  // <-, line 79
714  slice_from("e");
715  break;
716  case 4:
717  // (, line 81
718  // <-, line 81
719  slice_from("i");
720  break;
721  case 5:
722  // (, line 83
723  // not, line 83
724  {
725  v_1 = limit - cursor;
726  // literal, line 83
727  if (!(eq_s_b(2, "ab")))
728  {
729  goto lab0;
730  }
731  return false;
732  lab0:
733  cursor = limit - v_1;
734  }
735  // <-, line 83
736  slice_from("i");
737  break;
738  case 6:
739  // (, line 85
740  // <-, line 85
741  slice_from("at");
742  break;
743  case 7:
744  // (, line 87
745  // <-, line 87
746  slice_from("a\u0163i");
747  break;
748  }
749  return true;
750  }
751 
752  private bool r_combo_suffix()
753  {
754  int among_var;
755  int v_1;
756  // test, line 91
757  v_1 = limit - cursor;
758  // (, line 91
759  // [, line 92
760  ket = cursor;
761  // substring, line 92
762  among_var = find_among_b(a_2, 46);
763  if (among_var == 0)
764  {
765  return false;
766  }
767  // ], line 92
768  bra = cursor;
769  // call R1, line 92
770  if (!r_R1())
771  {
772  return false;
773  }
774  // (, line 92
775  switch (among_var)
776  {
777  case 0:
778  return false;
779  case 1:
780  // (, line 100
781  // <-, line 101
782  slice_from("abil");
783  break;
784  case 2:
785  // (, line 103
786  // <-, line 104
787  slice_from("ibil");
788  break;
789  case 3:
790  // (, line 106
791  // <-, line 107
792  slice_from("iv");
793  break;
794  case 4:
795  // (, line 112
796  // <-, line 113
797  slice_from("ic");
798  break;
799  case 5:
800  // (, line 117
801  // <-, line 118
802  slice_from("at");
803  break;
804  case 6:
805  // (, line 121
806  // <-, line 122
807  slice_from("it");
808  break;
809  }
810  // set standard_suffix_removed, line 125
811  B_standard_suffix_removed = true;
812  cursor = limit - v_1;
813  return true;
814  }
815 
816  private bool r_standard_suffix()
817  {
818  int among_var;
819  int v_1;
820  // (, line 129
821  // unset standard_suffix_removed, line 130
822  B_standard_suffix_removed = false;
823  // repeat, line 131
824  replab0:
825  v_1 = limit - cursor;
826  // call combo_suffix, line 131
827  if (!r_combo_suffix())
828  {
829  goto lab1;
830  }
831  goto replab0;
832  lab1:
833  cursor = limit - v_1;
834  // [, line 132
835  ket = cursor;
836  // substring, line 132
837  among_var = find_among_b(a_3, 62);
838  if (among_var == 0)
839  {
840  return false;
841  }
842  // ], line 132
843  bra = cursor;
844  // call R2, line 132
845  if (!r_R2())
846  {
847  return false;
848  }
849  // (, line 132
850  switch (among_var)
851  {
852  case 0:
853  return false;
854  case 1:
855  // (, line 148
856  // delete, line 149
857  slice_del();
858  break;
859  case 2:
860  // (, line 151
861  // literal, line 152
862  if (!(eq_s_b(1, "\u0163")))
863  {
864  return false;
865  }
866  // ], line 152
867  bra = cursor;
868  // <-, line 152
869  slice_from("t");
870  break;
871  case 3:
872  // (, line 155
873  // <-, line 156
874  slice_from("ist");
875  break;
876  }
877  // set standard_suffix_removed, line 160
878  B_standard_suffix_removed = true;
879  return true;
880  }
881 
882  private bool r_verb_suffix()
883  {
884  int among_var;
885  int v_1;
886  int v_2;
887  int v_3;
888  // setlimit, line 164
889  v_1 = limit - cursor;
890  // tomark, line 164
891  if (cursor < I_pV)
892  {
893  return false;
894  }
895  cursor = I_pV;
896  v_2 = limit_backward;
897  limit_backward = cursor;
898  cursor = limit - v_1;
899  // (, line 164
900  // [, line 165
901  ket = cursor;
902  // substring, line 165
903  among_var = find_among_b(a_4, 94);
904  if (among_var == 0)
905  {
906  limit_backward = v_2;
907  return false;
908  }
909  // ], line 165
910  bra = cursor;
911  switch (among_var)
912  {
913  case 0:
914  limit_backward = v_2;
915  return false;
916  case 1:
917  // (, line 200
918  // or, line 200
919  v_3 = limit - cursor;
920  if (!(out_grouping_b(g_v, 97, 259)))
921  {
922  goto lab1;
923  }
924  goto lab0;
925  lab1:
926  cursor = limit - v_3;
927  // literal, line 200
928  if (!(eq_s_b(1, "u")))
929  {
930  limit_backward = v_2;
931  return false;
932  }
933  lab0:
934  // delete, line 200
935  slice_del();
936  break;
937  case 2:
938  // (, line 214
939  // delete, line 214
940  slice_del();
941  break;
942  }
943  limit_backward = v_2;
944  return true;
945  }
946 
947  private bool r_vowel_suffix()
948  {
949  int among_var;
950  // (, line 218
951  // [, line 219
952  ket = cursor;
953  // substring, line 219
954  among_var = find_among_b(a_5, 5);
955  if (among_var == 0)
956  {
957  return false;
958  }
959  // ], line 219
960  bra = cursor;
961  // call RV, line 219
962  if (!r_RV())
963  {
964  return false;
965  }
966  switch (among_var)
967  {
968  case 0:
969  return false;
970  case 1:
971  // (, line 220
972  // delete, line 220
973  slice_del();
974  break;
975  }
976  return true;
977  }
978 
979  public override bool Stem()
980  {
981  int v_1;
982  int v_2;
983  int v_3;
984  int v_4;
985  int v_5;
986  int v_6;
987  int v_7;
988  int v_8;
989  // (, line 225
990  // do, line 226
991  v_1 = cursor;
992  // call prelude, line 226
993  if (!r_prelude())
994  {
995  goto lab0;
996  }
997  lab0:
998  cursor = v_1;
999  // do, line 227
1000  v_2 = cursor;
1001  // call mark_regions, line 227
1002  if (!r_mark_regions())
1003  {
1004  goto lab1;
1005  }
1006  lab1:
1007  cursor = v_2;
1008  // backwards, line 228
1009  limit_backward = cursor; cursor = limit;
1010  // (, line 228
1011  // do, line 229
1012  v_3 = limit - cursor;
1013  // call step_0, line 229
1014  if (!r_step_0())
1015  {
1016  goto lab2;
1017  }
1018  lab2:
1019  cursor = limit - v_3;
1020  // do, line 230
1021  v_4 = limit - cursor;
1022  // call standard_suffix, line 230
1023  if (!r_standard_suffix())
1024  {
1025  goto lab3;
1026  }
1027  lab3:
1028  cursor = limit - v_4;
1029  // do, line 231
1030  v_5 = limit - cursor;
1031  // (, line 231
1032  // or, line 231
1033  v_6 = limit - cursor;
1034  // Boolean test standard_suffix_removed, line 231
1035  if (!(B_standard_suffix_removed))
1036  {
1037  goto lab6;
1038  }
1039  goto lab5;
1040  lab6:
1041  cursor = limit - v_6;
1042  // call verb_suffix, line 231
1043  if (!r_verb_suffix())
1044  {
1045  goto lab4;
1046  }
1047  lab5:
1048  lab4:
1049  cursor = limit - v_5;
1050  // do, line 232
1051  v_7 = limit - cursor;
1052  // call vowel_suffix, line 232
1053  if (!r_vowel_suffix())
1054  {
1055  goto lab7;
1056  }
1057  lab7:
1058  cursor = limit - v_7;
1059  cursor = limit_backward;
1060  // do, line 234
1061  v_8 = cursor;
1062  // call postlude, line 234
1063  if (!r_postlude())
1064  {
1065  goto lab8;
1066  }
1067  lab8:
1068  cursor = v_8;
1069  return true;
1070  }
1071  }
1072 }