-
Notifications
You must be signed in to change notification settings - Fork 6
/
arabic_stemmer.go
1966 lines (1919 loc) · 43.6 KB
/
arabic_stemmer.go
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
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//! This file was generated automatically by the Snowball to Go compiler
//! http://snowballstem.org/
package arabic
import (
snowballRuntime "github.com/blevesearch/snowballstem"
)
var A_0 = []*snowballRuntime.Among{
{Str: "\u0640", A: -1, B: 2, F: nil},
{Str: "\u064B", A: -1, B: 1, F: nil},
{Str: "\u064C", A: -1, B: 1, F: nil},
{Str: "\u064D", A: -1, B: 1, F: nil},
{Str: "\u064E", A: -1, B: 1, F: nil},
{Str: "\u064F", A: -1, B: 1, F: nil},
{Str: "\u0650", A: -1, B: 1, F: nil},
{Str: "\u0651", A: -1, B: 1, F: nil},
{Str: "\u0652", A: -1, B: 1, F: nil},
{Str: "\u0660", A: -1, B: 3, F: nil},
{Str: "\u0661", A: -1, B: 4, F: nil},
{Str: "\u0662", A: -1, B: 5, F: nil},
{Str: "\u0663", A: -1, B: 6, F: nil},
{Str: "\u0664", A: -1, B: 7, F: nil},
{Str: "\u0665", A: -1, B: 8, F: nil},
{Str: "\u0666", A: -1, B: 9, F: nil},
{Str: "\u0667", A: -1, B: 10, F: nil},
{Str: "\u0668", A: -1, B: 11, F: nil},
{Str: "\u0669", A: -1, B: 12, F: nil},
{Str: "\uFE80", A: -1, B: 13, F: nil},
{Str: "\uFE81", A: -1, B: 17, F: nil},
{Str: "\uFE82", A: -1, B: 17, F: nil},
{Str: "\uFE83", A: -1, B: 14, F: nil},
{Str: "\uFE84", A: -1, B: 14, F: nil},
{Str: "\uFE85", A: -1, B: 18, F: nil},
{Str: "\uFE86", A: -1, B: 18, F: nil},
{Str: "\uFE87", A: -1, B: 15, F: nil},
{Str: "\uFE88", A: -1, B: 15, F: nil},
{Str: "\uFE89", A: -1, B: 16, F: nil},
{Str: "\uFE8A", A: -1, B: 16, F: nil},
{Str: "\uFE8B", A: -1, B: 16, F: nil},
{Str: "\uFE8C", A: -1, B: 16, F: nil},
{Str: "\uFE8D", A: -1, B: 19, F: nil},
{Str: "\uFE8E", A: -1, B: 19, F: nil},
{Str: "\uFE8F", A: -1, B: 20, F: nil},
{Str: "\uFE90", A: -1, B: 20, F: nil},
{Str: "\uFE91", A: -1, B: 20, F: nil},
{Str: "\uFE92", A: -1, B: 20, F: nil},
{Str: "\uFE93", A: -1, B: 21, F: nil},
{Str: "\uFE94", A: -1, B: 21, F: nil},
{Str: "\uFE95", A: -1, B: 22, F: nil},
{Str: "\uFE96", A: -1, B: 22, F: nil},
{Str: "\uFE97", A: -1, B: 22, F: nil},
{Str: "\uFE98", A: -1, B: 22, F: nil},
{Str: "\uFE99", A: -1, B: 23, F: nil},
{Str: "\uFE9A", A: -1, B: 23, F: nil},
{Str: "\uFE9B", A: -1, B: 23, F: nil},
{Str: "\uFE9C", A: -1, B: 23, F: nil},
{Str: "\uFE9D", A: -1, B: 24, F: nil},
{Str: "\uFE9E", A: -1, B: 24, F: nil},
{Str: "\uFE9F", A: -1, B: 24, F: nil},
{Str: "\uFEA0", A: -1, B: 24, F: nil},
{Str: "\uFEA1", A: -1, B: 25, F: nil},
{Str: "\uFEA2", A: -1, B: 25, F: nil},
{Str: "\uFEA3", A: -1, B: 25, F: nil},
{Str: "\uFEA4", A: -1, B: 25, F: nil},
{Str: "\uFEA5", A: -1, B: 26, F: nil},
{Str: "\uFEA6", A: -1, B: 26, F: nil},
{Str: "\uFEA7", A: -1, B: 26, F: nil},
{Str: "\uFEA8", A: -1, B: 26, F: nil},
{Str: "\uFEA9", A: -1, B: 27, F: nil},
{Str: "\uFEAA", A: -1, B: 27, F: nil},
{Str: "\uFEAB", A: -1, B: 28, F: nil},
{Str: "\uFEAC", A: -1, B: 28, F: nil},
{Str: "\uFEAD", A: -1, B: 29, F: nil},
{Str: "\uFEAE", A: -1, B: 29, F: nil},
{Str: "\uFEAF", A: -1, B: 30, F: nil},
{Str: "\uFEB0", A: -1, B: 30, F: nil},
{Str: "\uFEB1", A: -1, B: 31, F: nil},
{Str: "\uFEB2", A: -1, B: 31, F: nil},
{Str: "\uFEB3", A: -1, B: 31, F: nil},
{Str: "\uFEB4", A: -1, B: 31, F: nil},
{Str: "\uFEB5", A: -1, B: 32, F: nil},
{Str: "\uFEB6", A: -1, B: 32, F: nil},
{Str: "\uFEB7", A: -1, B: 32, F: nil},
{Str: "\uFEB8", A: -1, B: 32, F: nil},
{Str: "\uFEB9", A: -1, B: 33, F: nil},
{Str: "\uFEBA", A: -1, B: 33, F: nil},
{Str: "\uFEBB", A: -1, B: 33, F: nil},
{Str: "\uFEBC", A: -1, B: 33, F: nil},
{Str: "\uFEBD", A: -1, B: 34, F: nil},
{Str: "\uFEBE", A: -1, B: 34, F: nil},
{Str: "\uFEBF", A: -1, B: 34, F: nil},
{Str: "\uFEC0", A: -1, B: 34, F: nil},
{Str: "\uFEC1", A: -1, B: 35, F: nil},
{Str: "\uFEC2", A: -1, B: 35, F: nil},
{Str: "\uFEC3", A: -1, B: 35, F: nil},
{Str: "\uFEC4", A: -1, B: 35, F: nil},
{Str: "\uFEC5", A: -1, B: 36, F: nil},
{Str: "\uFEC6", A: -1, B: 36, F: nil},
{Str: "\uFEC7", A: -1, B: 36, F: nil},
{Str: "\uFEC8", A: -1, B: 36, F: nil},
{Str: "\uFEC9", A: -1, B: 37, F: nil},
{Str: "\uFECA", A: -1, B: 37, F: nil},
{Str: "\uFECB", A: -1, B: 37, F: nil},
{Str: "\uFECC", A: -1, B: 37, F: nil},
{Str: "\uFECD", A: -1, B: 38, F: nil},
{Str: "\uFECE", A: -1, B: 38, F: nil},
{Str: "\uFECF", A: -1, B: 38, F: nil},
{Str: "\uFED0", A: -1, B: 38, F: nil},
{Str: "\uFED1", A: -1, B: 39, F: nil},
{Str: "\uFED2", A: -1, B: 39, F: nil},
{Str: "\uFED3", A: -1, B: 39, F: nil},
{Str: "\uFED4", A: -1, B: 39, F: nil},
{Str: "\uFED5", A: -1, B: 40, F: nil},
{Str: "\uFED6", A: -1, B: 40, F: nil},
{Str: "\uFED7", A: -1, B: 40, F: nil},
{Str: "\uFED8", A: -1, B: 40, F: nil},
{Str: "\uFED9", A: -1, B: 41, F: nil},
{Str: "\uFEDA", A: -1, B: 41, F: nil},
{Str: "\uFEDB", A: -1, B: 41, F: nil},
{Str: "\uFEDC", A: -1, B: 41, F: nil},
{Str: "\uFEDD", A: -1, B: 42, F: nil},
{Str: "\uFEDE", A: -1, B: 42, F: nil},
{Str: "\uFEDF", A: -1, B: 42, F: nil},
{Str: "\uFEE0", A: -1, B: 42, F: nil},
{Str: "\uFEE1", A: -1, B: 43, F: nil},
{Str: "\uFEE2", A: -1, B: 43, F: nil},
{Str: "\uFEE3", A: -1, B: 43, F: nil},
{Str: "\uFEE4", A: -1, B: 43, F: nil},
{Str: "\uFEE5", A: -1, B: 44, F: nil},
{Str: "\uFEE6", A: -1, B: 44, F: nil},
{Str: "\uFEE7", A: -1, B: 44, F: nil},
{Str: "\uFEE8", A: -1, B: 44, F: nil},
{Str: "\uFEE9", A: -1, B: 45, F: nil},
{Str: "\uFEEA", A: -1, B: 45, F: nil},
{Str: "\uFEEB", A: -1, B: 45, F: nil},
{Str: "\uFEEC", A: -1, B: 45, F: nil},
{Str: "\uFEED", A: -1, B: 46, F: nil},
{Str: "\uFEEE", A: -1, B: 46, F: nil},
{Str: "\uFEEF", A: -1, B: 47, F: nil},
{Str: "\uFEF0", A: -1, B: 47, F: nil},
{Str: "\uFEF1", A: -1, B: 48, F: nil},
{Str: "\uFEF2", A: -1, B: 48, F: nil},
{Str: "\uFEF3", A: -1, B: 48, F: nil},
{Str: "\uFEF4", A: -1, B: 48, F: nil},
{Str: "\uFEF5", A: -1, B: 52, F: nil},
{Str: "\uFEF6", A: -1, B: 52, F: nil},
{Str: "\uFEF7", A: -1, B: 50, F: nil},
{Str: "\uFEF8", A: -1, B: 50, F: nil},
{Str: "\uFEF9", A: -1, B: 51, F: nil},
{Str: "\uFEFA", A: -1, B: 51, F: nil},
{Str: "\uFEFB", A: -1, B: 49, F: nil},
{Str: "\uFEFC", A: -1, B: 49, F: nil},
}
var A_1 = []*snowballRuntime.Among{
{Str: "\u0622", A: -1, B: 1, F: nil},
{Str: "\u0623", A: -1, B: 1, F: nil},
{Str: "\u0624", A: -1, B: 2, F: nil},
{Str: "\u0625", A: -1, B: 1, F: nil},
{Str: "\u0626", A: -1, B: 3, F: nil},
}
var A_2 = []*snowballRuntime.Among{
{Str: "\u0622", A: -1, B: 1, F: nil},
{Str: "\u0623", A: -1, B: 1, F: nil},
{Str: "\u0624", A: -1, B: 2, F: nil},
{Str: "\u0625", A: -1, B: 1, F: nil},
{Str: "\u0626", A: -1, B: 3, F: nil},
}
var A_3 = []*snowballRuntime.Among{
{Str: "\u0627\u0644", A: -1, B: 2, F: nil},
{Str: "\u0628\u0627\u0644", A: -1, B: 1, F: nil},
{Str: "\u0643\u0627\u0644", A: -1, B: 1, F: nil},
{Str: "\u0644\u0644", A: -1, B: 2, F: nil},
}
var A_4 = []*snowballRuntime.Among{
{Str: "\u0623\u0622", A: -1, B: 2, F: nil},
{Str: "\u0623\u0623", A: -1, B: 1, F: nil},
{Str: "\u0623\u0624", A: -1, B: 3, F: nil},
{Str: "\u0623\u0625", A: -1, B: 5, F: nil},
{Str: "\u0623\u0627", A: -1, B: 4, F: nil},
}
var A_5 = []*snowballRuntime.Among{
{Str: "\u0641", A: -1, B: 1, F: nil},
{Str: "\u0648", A: -1, B: 2, F: nil},
}
var A_6 = []*snowballRuntime.Among{
{Str: "\u0627\u0644", A: -1, B: 2, F: nil},
{Str: "\u0628\u0627\u0644", A: -1, B: 1, F: nil},
{Str: "\u0643\u0627\u0644", A: -1, B: 1, F: nil},
{Str: "\u0644\u0644", A: -1, B: 2, F: nil},
}
var A_7 = []*snowballRuntime.Among{
{Str: "\u0628", A: -1, B: 1, F: nil},
{Str: "\u0628\u0628", A: 0, B: 2, F: nil},
{Str: "\u0643\u0643", A: -1, B: 3, F: nil},
}
var A_8 = []*snowballRuntime.Among{
{Str: "\u0633\u0623", A: -1, B: 4, F: nil},
{Str: "\u0633\u062A", A: -1, B: 2, F: nil},
{Str: "\u0633\u0646", A: -1, B: 3, F: nil},
{Str: "\u0633\u064A", A: -1, B: 1, F: nil},
}
var A_9 = []*snowballRuntime.Among{
{Str: "\u062A\u0633\u062A", A: -1, B: 1, F: nil},
{Str: "\u0646\u0633\u062A", A: -1, B: 1, F: nil},
{Str: "\u064A\u0633\u062A", A: -1, B: 1, F: nil},
}
var A_10 = []*snowballRuntime.Among{
{Str: "\u0643", A: -1, B: 1, F: nil},
{Str: "\u0643\u0645", A: -1, B: 2, F: nil},
{Str: "\u0647\u0645", A: -1, B: 2, F: nil},
{Str: "\u0647\u0646", A: -1, B: 2, F: nil},
{Str: "\u0647", A: -1, B: 1, F: nil},
{Str: "\u064A", A: -1, B: 1, F: nil},
{Str: "\u0643\u0645\u0627", A: -1, B: 3, F: nil},
{Str: "\u0647\u0645\u0627", A: -1, B: 3, F: nil},
{Str: "\u0646\u0627", A: -1, B: 2, F: nil},
{Str: "\u0647\u0627", A: -1, B: 2, F: nil},
}
var A_11 = []*snowballRuntime.Among{
{Str: "\u0646", A: -1, B: 1, F: nil},
}
var A_12 = []*snowballRuntime.Among{
{Str: "\u0648", A: -1, B: 1, F: nil},
{Str: "\u064A", A: -1, B: 1, F: nil},
{Str: "\u0627", A: -1, B: 1, F: nil},
}
var A_13 = []*snowballRuntime.Among{
{Str: "\u0627\u062A", A: -1, B: 1, F: nil},
}
var A_14 = []*snowballRuntime.Among{
{Str: "\u062A", A: -1, B: 1, F: nil},
}
var A_15 = []*snowballRuntime.Among{
{Str: "\u0629", A: -1, B: 1, F: nil},
}
var A_16 = []*snowballRuntime.Among{
{Str: "\u064A", A: -1, B: 1, F: nil},
}
var A_17 = []*snowballRuntime.Among{
{Str: "\u0643", A: -1, B: 1, F: nil},
{Str: "\u0643\u0645", A: -1, B: 2, F: nil},
{Str: "\u0647\u0645", A: -1, B: 2, F: nil},
{Str: "\u0643\u0646", A: -1, B: 2, F: nil},
{Str: "\u0647\u0646", A: -1, B: 2, F: nil},
{Str: "\u0647", A: -1, B: 1, F: nil},
{Str: "\u0643\u0645\u0648", A: -1, B: 3, F: nil},
{Str: "\u0646\u064A", A: -1, B: 2, F: nil},
{Str: "\u0643\u0645\u0627", A: -1, B: 3, F: nil},
{Str: "\u0647\u0645\u0627", A: -1, B: 3, F: nil},
{Str: "\u0646\u0627", A: -1, B: 2, F: nil},
{Str: "\u0647\u0627", A: -1, B: 2, F: nil},
}
var A_18 = []*snowballRuntime.Among{
{Str: "\u0646", A: -1, B: 2, F: nil},
{Str: "\u0648\u0646", A: 0, B: 4, F: nil},
{Str: "\u064A\u0646", A: 0, B: 4, F: nil},
{Str: "\u0627\u0646", A: 0, B: 4, F: nil},
{Str: "\u062A\u0646", A: 0, B: 3, F: nil},
{Str: "\u064A", A: -1, B: 2, F: nil},
{Str: "\u0627", A: -1, B: 2, F: nil},
{Str: "\u062A\u0645\u0627", A: 6, B: 5, F: nil},
{Str: "\u0646\u0627", A: 6, B: 3, F: nil},
{Str: "\u062A\u0627", A: 6, B: 3, F: nil},
{Str: "\u062A", A: -1, B: 1, F: nil},
}
var A_19 = []*snowballRuntime.Among{
{Str: "\u062A\u0645", A: -1, B: 1, F: nil},
{Str: "\u0648\u0627", A: -1, B: 1, F: nil},
}
var A_20 = []*snowballRuntime.Among{
{Str: "\u0648", A: -1, B: 1, F: nil},
{Str: "\u062A\u0645\u0648", A: 0, B: 2, F: nil},
}
var A_21 = []*snowballRuntime.Among{
{Str: "\u0649", A: -1, B: 1, F: nil},
}
type Context struct {
b_is_defined bool
b_is_verb bool
b_is_noun bool
i_word_len int
}
func r_Normalize_pre(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 251
// loop, line 252
for range make([]struct{}, snowballRuntime.RuneCountInString(env.Current())) {
// (, line 252
// or, line 316
lab0:
for {
var v_2 = env.Cursor
lab1:
for {
// (, line 253
// [, line 254
env.Bra = env.Cursor
// substring, line 254
among_var = env.FindAmong(A_0, context)
if among_var == 0 {
break lab1
}
// ], line 254
env.Ket = env.Cursor
if among_var == 0 {
break lab1
} else if among_var == 1 {
// (, line 255
// delete, line 255
if !env.SliceDel() {
return false
}
} else if among_var == 2 {
// (, line 256
// delete, line 256
if !env.SliceDel() {
return false
}
} else if among_var == 3 {
// (, line 259
// <-, line 259
if !env.SliceFrom("0") {
return false
}
} else if among_var == 4 {
// (, line 260
// <-, line 260
if !env.SliceFrom("1") {
return false
}
} else if among_var == 5 {
// (, line 261
// <-, line 261
if !env.SliceFrom("2") {
return false
}
} else if among_var == 6 {
// (, line 262
// <-, line 262
if !env.SliceFrom("3") {
return false
}
} else if among_var == 7 {
// (, line 263
// <-, line 263
if !env.SliceFrom("4") {
return false
}
} else if among_var == 8 {
// (, line 264
// <-, line 264
if !env.SliceFrom("5") {
return false
}
} else if among_var == 9 {
// (, line 265
// <-, line 265
if !env.SliceFrom("6") {
return false
}
} else if among_var == 10 {
// (, line 266
// <-, line 266
if !env.SliceFrom("7") {
return false
}
} else if among_var == 11 {
// (, line 267
// <-, line 267
if !env.SliceFrom("8") {
return false
}
} else if among_var == 12 {
// (, line 268
// <-, line 268
if !env.SliceFrom("9") {
return false
}
} else if among_var == 13 {
// (, line 271
// <-, line 271
if !env.SliceFrom("\u0621") {
return false
}
} else if among_var == 14 {
// (, line 272
// <-, line 272
if !env.SliceFrom("\u0623") {
return false
}
} else if among_var == 15 {
// (, line 273
// <-, line 273
if !env.SliceFrom("\u0625") {
return false
}
} else if among_var == 16 {
// (, line 274
// <-, line 274
if !env.SliceFrom("\u0626") {
return false
}
} else if among_var == 17 {
// (, line 275
// <-, line 275
if !env.SliceFrom("\u0622") {
return false
}
} else if among_var == 18 {
// (, line 276
// <-, line 276
if !env.SliceFrom("\u0624") {
return false
}
} else if among_var == 19 {
// (, line 277
// <-, line 277
if !env.SliceFrom("\u0627") {
return false
}
} else if among_var == 20 {
// (, line 278
// <-, line 278
if !env.SliceFrom("\u0628") {
return false
}
} else if among_var == 21 {
// (, line 279
// <-, line 279
if !env.SliceFrom("\u0629") {
return false
}
} else if among_var == 22 {
// (, line 280
// <-, line 280
if !env.SliceFrom("\u062A") {
return false
}
} else if among_var == 23 {
// (, line 281
// <-, line 281
if !env.SliceFrom("\u062B") {
return false
}
} else if among_var == 24 {
// (, line 282
// <-, line 282
if !env.SliceFrom("\u062C") {
return false
}
} else if among_var == 25 {
// (, line 283
// <-, line 283
if !env.SliceFrom("\u062D") {
return false
}
} else if among_var == 26 {
// (, line 284
// <-, line 284
if !env.SliceFrom("\u062E") {
return false
}
} else if among_var == 27 {
// (, line 285
// <-, line 285
if !env.SliceFrom("\u062F") {
return false
}
} else if among_var == 28 {
// (, line 286
// <-, line 286
if !env.SliceFrom("\u0630") {
return false
}
} else if among_var == 29 {
// (, line 287
// <-, line 287
if !env.SliceFrom("\u0631") {
return false
}
} else if among_var == 30 {
// (, line 288
// <-, line 288
if !env.SliceFrom("\u0632") {
return false
}
} else if among_var == 31 {
// (, line 289
// <-, line 289
if !env.SliceFrom("\u0633") {
return false
}
} else if among_var == 32 {
// (, line 290
// <-, line 290
if !env.SliceFrom("\u0634") {
return false
}
} else if among_var == 33 {
// (, line 291
// <-, line 291
if !env.SliceFrom("\u0635") {
return false
}
} else if among_var == 34 {
// (, line 292
// <-, line 292
if !env.SliceFrom("\u0636") {
return false
}
} else if among_var == 35 {
// (, line 293
// <-, line 293
if !env.SliceFrom("\u0637") {
return false
}
} else if among_var == 36 {
// (, line 294
// <-, line 294
if !env.SliceFrom("\u0638") {
return false
}
} else if among_var == 37 {
// (, line 295
// <-, line 295
if !env.SliceFrom("\u0639") {
return false
}
} else if among_var == 38 {
// (, line 296
// <-, line 296
if !env.SliceFrom("\u063A") {
return false
}
} else if among_var == 39 {
// (, line 297
// <-, line 297
if !env.SliceFrom("\u0641") {
return false
}
} else if among_var == 40 {
// (, line 298
// <-, line 298
if !env.SliceFrom("\u0642") {
return false
}
} else if among_var == 41 {
// (, line 299
// <-, line 299
if !env.SliceFrom("\u0643") {
return false
}
} else if among_var == 42 {
// (, line 300
// <-, line 300
if !env.SliceFrom("\u0644") {
return false
}
} else if among_var == 43 {
// (, line 301
// <-, line 301
if !env.SliceFrom("\u0645") {
return false
}
} else if among_var == 44 {
// (, line 302
// <-, line 302
if !env.SliceFrom("\u0646") {
return false
}
} else if among_var == 45 {
// (, line 303
// <-, line 303
if !env.SliceFrom("\u0647") {
return false
}
} else if among_var == 46 {
// (, line 304
// <-, line 304
if !env.SliceFrom("\u0648") {
return false
}
} else if among_var == 47 {
// (, line 305
// <-, line 305
if !env.SliceFrom("\u0649") {
return false
}
} else if among_var == 48 {
// (, line 306
// <-, line 306
if !env.SliceFrom("\u064A") {
return false
}
} else if among_var == 49 {
// (, line 309
// <-, line 309
if !env.SliceFrom("\u0644\u0627") {
return false
}
} else if among_var == 50 {
// (, line 310
// <-, line 310
if !env.SliceFrom("\u0644\u0623") {
return false
}
} else if among_var == 51 {
// (, line 311
// <-, line 311
if !env.SliceFrom("\u0644\u0625") {
return false
}
} else if among_var == 52 {
// (, line 312
// <-, line 312
if !env.SliceFrom("\u0644\u0622") {
return false
}
}
break lab0
}
env.Cursor = v_2
// next, line 317
if env.Cursor >= env.Limit {
return false
}
env.NextChar()
break lab0
}
}
return true
}
func r_Normalize_post(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 321
// do, line 323
var v_1 = env.Cursor
lab0:
for {
// (, line 323
// backwards, line 325
env.LimitBackward = env.Cursor
env.Cursor = env.Limit
// (, line 325
// [, line 326
env.Ket = env.Cursor
// substring, line 326
among_var = env.FindAmongB(A_1, context)
if among_var == 0 {
break lab0
}
// ], line 326
env.Bra = env.Cursor
if among_var == 0 {
break lab0
} else if among_var == 1 {
// (, line 327
// <-, line 327
if !env.SliceFrom("\u0621") {
return false
}
} else if among_var == 2 {
// (, line 328
// <-, line 328
if !env.SliceFrom("\u0621") {
return false
}
} else if among_var == 3 {
// (, line 329
// <-, line 329
if !env.SliceFrom("\u0621") {
return false
}
}
env.Cursor = env.LimitBackward
break lab0
}
env.Cursor = v_1
// do, line 334
var v_2 = env.Cursor
lab1:
for {
// loop, line 334
for range make([]struct{}, context.i_word_len) {
// (, line 334
// or, line 343
lab2:
for {
var v_4 = env.Cursor
lab3:
for {
// (, line 335
// [, line 337
env.Bra = env.Cursor
// substring, line 337
among_var = env.FindAmong(A_2, context)
if among_var == 0 {
break lab3
}
// ], line 337
env.Ket = env.Cursor
if among_var == 0 {
break lab3
} else if among_var == 1 {
// (, line 338
// <-, line 338
if !env.SliceFrom("\u0627") {
return false
}
} else if among_var == 2 {
// (, line 339
// <-, line 339
if !env.SliceFrom("\u0648") {
return false
}
} else if among_var == 3 {
// (, line 340
// <-, line 340
if !env.SliceFrom("\u064A") {
return false
}
}
break lab2
}
env.Cursor = v_4
// next, line 344
if env.Cursor >= env.Limit {
break lab1
}
env.NextChar()
break lab2
}
}
break lab1
}
env.Cursor = v_2
return true
}
func r_Checks1(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 349
context.i_word_len = snowballRuntime.RuneCountInString(env.Current())
// [, line 351
env.Bra = env.Cursor
// substring, line 351
among_var = env.FindAmong(A_3, context)
if among_var == 0 {
return false
}
// ], line 351
env.Ket = env.Cursor
if among_var == 0 {
return false
} else if among_var == 1 {
// (, line 352
if !(context.i_word_len > 4) {
return false
}
// set is_noun, line 352
context.b_is_noun = true
// unset is_verb, line 352
context.b_is_verb = false
// set is_defined, line 352
context.b_is_defined = true
} else if among_var == 2 {
// (, line 353
if !(context.i_word_len > 3) {
return false
}
// set is_noun, line 353
context.b_is_noun = true
// unset is_verb, line 353
context.b_is_verb = false
// set is_defined, line 353
context.b_is_defined = true
}
return true
}
func r_Prefix_Step1(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 359
context.i_word_len = snowballRuntime.RuneCountInString(env.Current())
// [, line 361
env.Bra = env.Cursor
// substring, line 361
among_var = env.FindAmong(A_4, context)
if among_var == 0 {
return false
}
// ], line 361
env.Ket = env.Cursor
if among_var == 0 {
return false
} else if among_var == 1 {
// (, line 362
if !(context.i_word_len > 3) {
return false
}
// <-, line 362
if !env.SliceFrom("\u0623") {
return false
}
} else if among_var == 2 {
// (, line 363
if !(context.i_word_len > 3) {
return false
}
// <-, line 363
if !env.SliceFrom("\u0622") {
return false
}
} else if among_var == 3 {
// (, line 364
if !(context.i_word_len > 3) {
return false
}
// <-, line 364
if !env.SliceFrom("\u0623") {
return false
}
} else if among_var == 4 {
// (, line 365
if !(context.i_word_len > 3) {
return false
}
// <-, line 365
if !env.SliceFrom("\u0627") {
return false
}
} else if among_var == 5 {
// (, line 366
if !(context.i_word_len > 3) {
return false
}
// <-, line 366
if !env.SliceFrom("\u0625") {
return false
}
}
return true
}
func r_Prefix_Step2(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 371
context.i_word_len = snowballRuntime.RuneCountInString(env.Current())
// not, line 373
var v_1 = env.Cursor
lab0:
for {
// literal, line 373
if !env.EqS("\u0641\u0627") {
break lab0
}
return false
}
env.Cursor = v_1
// not, line 374
var v_2 = env.Cursor
lab1:
for {
// literal, line 374
if !env.EqS("\u0648\u0627") {
break lab1
}
return false
}
env.Cursor = v_2
// [, line 375
env.Bra = env.Cursor
// substring, line 375
among_var = env.FindAmong(A_5, context)
if among_var == 0 {
return false
}
// ], line 375
env.Ket = env.Cursor
if among_var == 0 {
return false
} else if among_var == 1 {
// (, line 376
if !(context.i_word_len > 3) {
return false
}
// delete, line 376
if !env.SliceDel() {
return false
}
} else if among_var == 2 {
// (, line 377
if !(context.i_word_len > 3) {
return false
}
// delete, line 377
if !env.SliceDel() {
return false
}
}
return true
}
func r_Prefix_Step3a_Noun(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 381
context.i_word_len = snowballRuntime.RuneCountInString(env.Current())
// [, line 383
env.Bra = env.Cursor
// substring, line 383
among_var = env.FindAmong(A_6, context)
if among_var == 0 {
return false
}
// ], line 383
env.Ket = env.Cursor
if among_var == 0 {
return false
} else if among_var == 1 {
// (, line 384
if !(context.i_word_len > 5) {
return false
}
// delete, line 384
if !env.SliceDel() {
return false
}
} else if among_var == 2 {
// (, line 385
if !(context.i_word_len > 4) {
return false
}
// delete, line 385
if !env.SliceDel() {
return false
}
}
return true
}
func r_Prefix_Step3b_Noun(env *snowballRuntime.Env, ctx interface{}) bool {
context := ctx.(*Context)
_ = context
var among_var int32
// (, line 389
context.i_word_len = snowballRuntime.RuneCountInString(env.Current())
// not, line 391
var v_1 = env.Cursor
lab0:
for {
// literal, line 391
if !env.EqS("\u0628\u0627") {
break lab0
}
return false
}
env.Cursor = v_1
// [, line 392
env.Bra = env.Cursor
// substring, line 392
among_var = env.FindAmong(A_7, context)
if among_var == 0 {