summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/misc/oktavia/src/stemmer/russian-stemmer.jsx
blob: 2b7d30a9e29f328dc03756b8a7185fef2cb5254e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
// This file was generated automatically by the Snowball to JSX compiler

import "base-stemmer.jsx";
import "among.jsx";

 /**
  * This class was automatically generated by a Snowball to JSX compiler
  * It implements the stemming algorithm defined by a snowball script.
  */

class RussianStemmer extends BaseStemmer
{
    static const serialVersionUID = 1;
    static const methodObject = new RussianStemmer();

    static const a_0 = [
        new Among("\u0432", -1, 1),
        new Among("\u0438\u0432", 0, 2),
        new Among("\u044B\u0432", 0, 2),
        new Among("\u0432\u0448\u0438", -1, 1),
        new Among("\u0438\u0432\u0448\u0438", 3, 2),
        new Among("\u044B\u0432\u0448\u0438", 3, 2),
        new Among("\u0432\u0448\u0438\u0441\u044C", -1, 1),
        new Among("\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2),
        new Among("\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2)
    ];

    static const a_1 = [
        new Among("\u0435\u0435", -1, 1),
        new Among("\u0438\u0435", -1, 1),
        new Among("\u043E\u0435", -1, 1),
        new Among("\u044B\u0435", -1, 1),
        new Among("\u0438\u043C\u0438", -1, 1),
        new Among("\u044B\u043C\u0438", -1, 1),
        new Among("\u0435\u0439", -1, 1),
        new Among("\u0438\u0439", -1, 1),
        new Among("\u043E\u0439", -1, 1),
        new Among("\u044B\u0439", -1, 1),
        new Among("\u0435\u043C", -1, 1),
        new Among("\u0438\u043C", -1, 1),
        new Among("\u043E\u043C", -1, 1),
        new Among("\u044B\u043C", -1, 1),
        new Among("\u0435\u0433\u043E", -1, 1),
        new Among("\u043E\u0433\u043E", -1, 1),
        new Among("\u0435\u043C\u0443", -1, 1),
        new Among("\u043E\u043C\u0443", -1, 1),
        new Among("\u0438\u0445", -1, 1),
        new Among("\u044B\u0445", -1, 1),
        new Among("\u0435\u044E", -1, 1),
        new Among("\u043E\u044E", -1, 1),
        new Among("\u0443\u044E", -1, 1),
        new Among("\u044E\u044E", -1, 1),
        new Among("\u0430\u044F", -1, 1),
        new Among("\u044F\u044F", -1, 1)
    ];

    static const a_2 = [
        new Among("\u0435\u043C", -1, 1),
        new Among("\u043D\u043D", -1, 1),
        new Among("\u0432\u0448", -1, 1),
        new Among("\u0438\u0432\u0448", 2, 2),
        new Among("\u044B\u0432\u0448", 2, 2),
        new Among("\u0449", -1, 1),
        new Among("\u044E\u0449", 5, 1),
        new Among("\u0443\u044E\u0449", 6, 2)
    ];

    static const a_3 = [
        new Among("\u0441\u044C", -1, 1),
        new Among("\u0441\u044F", -1, 1)
    ];

    static const a_4 = [
        new Among("\u043B\u0430", -1, 1),
        new Among("\u0438\u043B\u0430", 0, 2),
        new Among("\u044B\u043B\u0430", 0, 2),
        new Among("\u043D\u0430", -1, 1),
        new Among("\u0435\u043D\u0430", 3, 2),
        new Among("\u0435\u0442\u0435", -1, 1),
        new Among("\u0438\u0442\u0435", -1, 2),
        new Among("\u0439\u0442\u0435", -1, 1),
        new Among("\u0435\u0439\u0442\u0435", 7, 2),
        new Among("\u0443\u0439\u0442\u0435", 7, 2),
        new Among("\u043B\u0438", -1, 1),
        new Among("\u0438\u043B\u0438", 10, 2),
        new Among("\u044B\u043B\u0438", 10, 2),
        new Among("\u0439", -1, 1),
        new Among("\u0435\u0439", 13, 2),
        new Among("\u0443\u0439", 13, 2),
        new Among("\u043B", -1, 1),
        new Among("\u0438\u043B", 16, 2),
        new Among("\u044B\u043B", 16, 2),
        new Among("\u0435\u043C", -1, 1),
        new Among("\u0438\u043C", -1, 2),
        new Among("\u044B\u043C", -1, 2),
        new Among("\u043D", -1, 1),
        new Among("\u0435\u043D", 22, 2),
        new Among("\u043B\u043E", -1, 1),
        new Among("\u0438\u043B\u043E", 24, 2),
        new Among("\u044B\u043B\u043E", 24, 2),
        new Among("\u043D\u043E", -1, 1),
        new Among("\u0435\u043D\u043E", 27, 2),
        new Among("\u043D\u043D\u043E", 27, 1),
        new Among("\u0435\u0442", -1, 1),
        new Among("\u0443\u0435\u0442", 30, 2),
        new Among("\u0438\u0442", -1, 2),
        new Among("\u044B\u0442", -1, 2),
        new Among("\u044E\u0442", -1, 1),
        new Among("\u0443\u044E\u0442", 34, 2),
        new Among("\u044F\u0442", -1, 2),
        new Among("\u043D\u044B", -1, 1),
        new Among("\u0435\u043D\u044B", 37, 2),
        new Among("\u0442\u044C", -1, 1),
        new Among("\u0438\u0442\u044C", 39, 2),
        new Among("\u044B\u0442\u044C", 39, 2),
        new Among("\u0435\u0448\u044C", -1, 1),
        new Among("\u0438\u0448\u044C", -1, 2),
        new Among("\u044E", -1, 2),
        new Among("\u0443\u044E", 44, 2)
    ];

    static const a_5 = [
        new Among("\u0430", -1, 1),
        new Among("\u0435\u0432", -1, 1),
        new Among("\u043E\u0432", -1, 1),
        new Among("\u0435", -1, 1),
        new Among("\u0438\u0435", 3, 1),
        new Among("\u044C\u0435", 3, 1),
        new Among("\u0438", -1, 1),
        new Among("\u0435\u0438", 6, 1),
        new Among("\u0438\u0438", 6, 1),
        new Among("\u0430\u043C\u0438", 6, 1),
        new Among("\u044F\u043C\u0438", 6, 1),
        new Among("\u0438\u044F\u043C\u0438", 10, 1),
        new Among("\u0439", -1, 1),
        new Among("\u0435\u0439", 12, 1),
        new Among("\u0438\u0435\u0439", 13, 1),
        new Among("\u0438\u0439", 12, 1),
        new Among("\u043E\u0439", 12, 1),
        new Among("\u0430\u043C", -1, 1),
        new Among("\u0435\u043C", -1, 1),
        new Among("\u0438\u0435\u043C", 18, 1),
        new Among("\u043E\u043C", -1, 1),
        new Among("\u044F\u043C", -1, 1),
        new Among("\u0438\u044F\u043C", 21, 1),
        new Among("\u043E", -1, 1),
        new Among("\u0443", -1, 1),
        new Among("\u0430\u0445", -1, 1),
        new Among("\u044F\u0445", -1, 1),
        new Among("\u0438\u044F\u0445", 26, 1),
        new Among("\u044B", -1, 1),
        new Among("\u044C", -1, 1),
        new Among("\u044E", -1, 1),
        new Among("\u0438\u044E", 30, 1),
        new Among("\u044C\u044E", 30, 1),
        new Among("\u044F", -1, 1),
        new Among("\u0438\u044F", 33, 1),
        new Among("\u044C\u044F", 33, 1)
    ];

    static const a_6 = [
        new Among("\u043E\u0441\u0442", -1, 1),
        new Among("\u043E\u0441\u0442\u044C", -1, 1)
    ];

    static const a_7 = [
        new Among("\u0435\u0439\u0448\u0435", -1, 1),
        new Among("\u043D", -1, 2),
        new Among("\u0435\u0439\u0448", -1, 1),
        new Among("\u044C", -1, 3)
    ];

    static const g_v = [33, 65, 8, 232] : int[];

    var I_p2 : int = 0;
    var I_pV : int = 0;

    function copy_from (other : RussianStemmer) : void
    {
        this.I_p2 = other.I_p2;
        this.I_pV = other.I_pV;
        super.copy_from(other);
    }

    function r_mark_regions () : boolean
    {
        var v_1 : int;
        // (, line 57
        this.I_pV = this.limit;
        this.I_p2 = this.limit;
        // do, line 61
        v_1 = this.cursor;
        var lab0 = true;
        lab0: while (lab0 == true)
        {
            lab0 = false;
            // (, line 61
            // gopast, line 62
            golab1: while(true)
            {
                var lab2 = true;
                lab2: while (lab2 == true)
                {
                    lab2 = false;
                    if (!(this.in_grouping(RussianStemmer.g_v, 1072, 1103)))
                    {
                        break lab2;
                    }
                    break golab1;
                }
                if (this.cursor >= this.limit)
                {
                    break lab0;
                }
                this.cursor++;
            }
            // setmark pV, line 62
            this.I_pV = this.cursor;
            // gopast, line 62
            golab3: while(true)
            {
                var lab4 = true;
                lab4: while (lab4 == true)
                {
                    lab4 = false;
                    if (!(this.out_grouping(RussianStemmer.g_v, 1072, 1103)))
                    {
                        break lab4;
                    }
                    break golab3;
                }
                if (this.cursor >= this.limit)
                {
                    break lab0;
                }
                this.cursor++;
            }
            // gopast, line 63
            golab5: while(true)
            {
                var lab6 = true;
                lab6: while (lab6 == true)
                {
                    lab6 = false;
                    if (!(this.in_grouping(RussianStemmer.g_v, 1072, 1103)))
                    {
                        break lab6;
                    }
                    break golab5;
                }
                if (this.cursor >= this.limit)
                {
                    break lab0;
                }
                this.cursor++;
            }
            // gopast, line 63
            golab7: while(true)
            {
                var lab8 = true;
                lab8: while (lab8 == true)
                {
                    lab8 = false;
                    if (!(this.out_grouping(RussianStemmer.g_v, 1072, 1103)))
                    {
                        break lab8;
                    }
                    break golab7;
                }
                if (this.cursor >= this.limit)
                {
                    break lab0;
                }
                this.cursor++;
            }
            // setmark p2, line 63
            this.I_p2 = this.cursor;
        }
        this.cursor = v_1;
        return true;
    }

    function r_R2 () : boolean
    {
        if (!(this.I_p2 <= this.cursor))
        {
            return false;
        }
        return true;
    }

    function r_perfective_gerund () : boolean
    {
        var among_var : int;
        var v_1 : int;
        // (, line 71
        // [, line 72
        this.ket = this.cursor;
        // substring, line 72
        among_var = this.find_among_b(RussianStemmer.a_0, 9);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 72
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 76
                // or, line 76
                var lab0 = true;
                lab0: while (lab0 == true)
                {
                    lab0 = false;
                    v_1 = this.limit - this.cursor;
                    var lab1 = true;
                    lab1: while (lab1 == true)
                    {
                        lab1 = false;
                        // literal, line 76
                        if (!(this.eq_s_b(1, "\u0430")))
                        {
                            break lab1;
                        }
                        break lab0;
                    }
                    this.cursor = this.limit - v_1;
                    // literal, line 76
                    if (!(this.eq_s_b(1, "\u044F")))
                    {
                        return false;
                    }
                }
                // delete, line 76
                if (!this.slice_del())
                {
                    return false;
                }
                break;
            case 2:
                // (, line 83
                // delete, line 83
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_adjective () : boolean
    {
        var among_var : int;
        // (, line 87
        // [, line 88
        this.ket = this.cursor;
        // substring, line 88
        among_var = this.find_among_b(RussianStemmer.a_1, 26);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 88
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 97
                // delete, line 97
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_adjectival () : boolean
    {
        var among_var : int;
        var v_1 : int;
        var v_2 : int;
        // (, line 101
        // call adjective, line 102
        if (!this.r_adjective())
        {
            return false;
        }
        // try, line 109
        v_1 = this.limit - this.cursor;
        var lab0 = true;
        lab0: while (lab0 == true)
        {
            lab0 = false;
            // (, line 109
            // [, line 110
            this.ket = this.cursor;
            // substring, line 110
            among_var = this.find_among_b(RussianStemmer.a_2, 8);
            if (among_var == 0)
            {
                this.cursor = this.limit - v_1;
                break lab0;
            }
            // ], line 110
            this.bra = this.cursor;
            switch (among_var) {
                case 0:
                    this.cursor = this.limit - v_1;
                    break lab0;
                case 1:
                    // (, line 115
                    // or, line 115
                    var lab1 = true;
                    lab1: while (lab1 == true)
                    {
                        lab1 = false;
                        v_2 = this.limit - this.cursor;
                        var lab2 = true;
                        lab2: while (lab2 == true)
                        {
                            lab2 = false;
                            // literal, line 115
                            if (!(this.eq_s_b(1, "\u0430")))
                            {
                                break lab2;
                            }
                            break lab1;
                        }
                        this.cursor = this.limit - v_2;
                        // literal, line 115
                        if (!(this.eq_s_b(1, "\u044F")))
                        {
                            this.cursor = this.limit - v_1;
                            break lab0;
                        }
                    }
                    // delete, line 115
                    if (!this.slice_del())
                    {
                        return false;
                    }
                    break;
                case 2:
                    // (, line 122
                    // delete, line 122
                    if (!this.slice_del())
                    {
                        return false;
                    }
                    break;
            }
        }
        return true;
    }

    function r_reflexive () : boolean
    {
        var among_var : int;
        // (, line 128
        // [, line 129
        this.ket = this.cursor;
        // substring, line 129
        among_var = this.find_among_b(RussianStemmer.a_3, 2);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 129
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 132
                // delete, line 132
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_verb () : boolean
    {
        var among_var : int;
        var v_1 : int;
        // (, line 136
        // [, line 137
        this.ket = this.cursor;
        // substring, line 137
        among_var = this.find_among_b(RussianStemmer.a_4, 46);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 137
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 143
                // or, line 143
                var lab0 = true;
                lab0: while (lab0 == true)
                {
                    lab0 = false;
                    v_1 = this.limit - this.cursor;
                    var lab1 = true;
                    lab1: while (lab1 == true)
                    {
                        lab1 = false;
                        // literal, line 143
                        if (!(this.eq_s_b(1, "\u0430")))
                        {
                            break lab1;
                        }
                        break lab0;
                    }
                    this.cursor = this.limit - v_1;
                    // literal, line 143
                    if (!(this.eq_s_b(1, "\u044F")))
                    {
                        return false;
                    }
                }
                // delete, line 143
                if (!this.slice_del())
                {
                    return false;
                }
                break;
            case 2:
                // (, line 151
                // delete, line 151
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_noun () : boolean
    {
        var among_var : int;
        // (, line 159
        // [, line 160
        this.ket = this.cursor;
        // substring, line 160
        among_var = this.find_among_b(RussianStemmer.a_5, 36);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 160
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 167
                // delete, line 167
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_derivational () : boolean
    {
        var among_var : int;
        // (, line 175
        // [, line 176
        this.ket = this.cursor;
        // substring, line 176
        among_var = this.find_among_b(RussianStemmer.a_6, 2);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 176
        this.bra = this.cursor;
        // call R2, line 176
        if (!this.r_R2())
        {
            return false;
        }
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 179
                // delete, line 179
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    function r_tidy_up () : boolean
    {
        var among_var : int;
        // (, line 183
        // [, line 184
        this.ket = this.cursor;
        // substring, line 184
        among_var = this.find_among_b(RussianStemmer.a_7, 4);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 184
        this.bra = this.cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 188
                // delete, line 188
                if (!this.slice_del())
                {
                    return false;
                }
                // [, line 189
                this.ket = this.cursor;
                // literal, line 189
                if (!(this.eq_s_b(1, "\u043D")))
                {
                    return false;
                }
                // ], line 189
                this.bra = this.cursor;
                // literal, line 189
                if (!(this.eq_s_b(1, "\u043D")))
                {
                    return false;
                }
                // delete, line 189
                if (!this.slice_del())
                {
                    return false;
                }
                break;
            case 2:
                // (, line 192
                // literal, line 192
                if (!(this.eq_s_b(1, "\u043D")))
                {
                    return false;
                }
                // delete, line 192
                if (!this.slice_del())
                {
                    return false;
                }
                break;
            case 3:
                // (, line 194
                // delete, line 194
                if (!this.slice_del())
                {
                    return false;
                }
                break;
        }
        return true;
    }

    override function stem () : boolean
    {
        var v_1 : int;
        var v_2 : int;
        var v_3 : int;
        var v_4 : int;
        var v_5 : int;
        var v_6 : int;
        var v_7 : int;
        var v_8 : int;
        var v_9 : int;
        var v_10 : int;
        // (, line 199
        // do, line 201
        v_1 = this.cursor;
        var lab0 = true;
        lab0: while (lab0 == true)
        {
            lab0 = false;
            // call mark_regions, line 201
            if (!this.r_mark_regions())
            {
                break lab0;
            }
        }
        this.cursor = v_1;
        // backwards, line 202
        this.limit_backward = this.cursor; this.cursor = this.limit;
        // setlimit, line 202
        v_2 = this.limit - this.cursor;
        // tomark, line 202
        if (this.cursor < this.I_pV)
        {
            return false;
        }
        this.cursor = this.I_pV;
        v_3 = this.limit_backward;
        this.limit_backward = this.cursor;
        this.cursor = this.limit - v_2;
        // (, line 202
        // do, line 203
        v_4 = this.limit - this.cursor;
        var lab1 = true;
        lab1: while (lab1 == true)
        {
            lab1 = false;
            // (, line 203
            // or, line 204
            var lab2 = true;
            lab2: while (lab2 == true)
            {
                lab2 = false;
                v_5 = this.limit - this.cursor;
                var lab3 = true;
                lab3: while (lab3 == true)
                {
                    lab3 = false;
                    // call perfective_gerund, line 204
                    if (!this.r_perfective_gerund())
                    {
                        break lab3;
                    }
                    break lab2;
                }
                this.cursor = this.limit - v_5;
                // (, line 205
                // try, line 205
                v_6 = this.limit - this.cursor;
                var lab4 = true;
                lab4: while (lab4 == true)
                {
                    lab4 = false;
                    // call reflexive, line 205
                    if (!this.r_reflexive())
                    {
                        this.cursor = this.limit - v_6;
                        break lab4;
                    }
                }
                // or, line 206
                var lab5 = true;
                lab5: while (lab5 == true)
                {
                    lab5 = false;
                    v_7 = this.limit - this.cursor;
                    var lab6 = true;
                    lab6: while (lab6 == true)
                    {
                        lab6 = false;
                        // call adjectival, line 206
                        if (!this.r_adjectival())
                        {
                            break lab6;
                        }
                        break lab5;
                    }
                    this.cursor = this.limit - v_7;
                    var lab7 = true;
                    lab7: while (lab7 == true)
                    {
                        lab7 = false;
                        // call verb, line 206
                        if (!this.r_verb())
                        {
                            break lab7;
                        }
                        break lab5;
                    }
                    this.cursor = this.limit - v_7;
                    // call noun, line 206
                    if (!this.r_noun())
                    {
                        break lab1;
                    }
                }
            }
        }
        this.cursor = this.limit - v_4;
        // try, line 209
        v_8 = this.limit - this.cursor;
        var lab8 = true;
        lab8: while (lab8 == true)
        {
            lab8 = false;
            // (, line 209
            // [, line 209
            this.ket = this.cursor;
            // literal, line 209
            if (!(this.eq_s_b(1, "\u0438")))
            {
                this.cursor = this.limit - v_8;
                break lab8;
            }
            // ], line 209
            this.bra = this.cursor;
            // delete, line 209
            if (!this.slice_del())
            {
                return false;
            }
        }
        // do, line 212
        v_9 = this.limit - this.cursor;
        var lab9 = true;
        lab9: while (lab9 == true)
        {
            lab9 = false;
            // call derivational, line 212
            if (!this.r_derivational())
            {
                break lab9;
            }
        }
        this.cursor = this.limit - v_9;
        // do, line 213
        v_10 = this.limit - this.cursor;
        var lab10 = true;
        lab10: while (lab10 == true)
        {
            lab10 = false;
            // call tidy_up, line 213
            if (!this.r_tidy_up())
            {
                break lab10;
            }
        }
        this.cursor = this.limit - v_10;
        this.limit_backward = v_3;
        this.cursor = this.limit_backward;        return true;
    }

    function equals (o : variant) : boolean {
        return o instanceof RussianStemmer;
    }

    function hashCode() : int
    {
        //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
        var classname = "RussianStemmer";
        var hash = 0;
        if (classname.length == 0) return hash;
        for (var i = 0; i < classname.length; i++) {
            var char = classname.charCodeAt(i);
            hash = ((hash << 5) - hash) + char;
            hash = hash & hash; // Convert to 32bit integer
        }
        return hash;
    }

}