/usr/lib/python2.7/dist-packages/snowballstemmer/french_stemmer.py is in python-snowballstemmer 1.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 | # self file was generated automatically by the Snowball to Python interpreter
from .basestemmer import BaseStemmer
from .among import Among
class FrenchStemmer(BaseStemmer):
'''
self class was automatically generated by a Snowball to Python interpreter
It implements the stemming algorithm defined by a snowball script.
'''
serialVersionUID = 1
a_0 = [
Among(u"col", -1, -1),
Among(u"par", -1, -1),
Among(u"tap", -1, -1)
]
a_1 = [
Among(u"", -1, 4),
Among(u"I", 0, 1),
Among(u"U", 0, 2),
Among(u"Y", 0, 3)
]
a_2 = [
Among(u"iqU", -1, 3),
Among(u"abl", -1, 3),
Among(u"I\u00E8r", -1, 4),
Among(u"i\u00E8r", -1, 4),
Among(u"eus", -1, 2),
Among(u"iv", -1, 1)
]
a_3 = [
Among(u"ic", -1, 2),
Among(u"abil", -1, 1),
Among(u"iv", -1, 3)
]
a_4 = [
Among(u"iqUe", -1, 1),
Among(u"atrice", -1, 2),
Among(u"ance", -1, 1),
Among(u"ence", -1, 5),
Among(u"logie", -1, 3),
Among(u"able", -1, 1),
Among(u"isme", -1, 1),
Among(u"euse", -1, 11),
Among(u"iste", -1, 1),
Among(u"ive", -1, 8),
Among(u"if", -1, 8),
Among(u"usion", -1, 4),
Among(u"ation", -1, 2),
Among(u"ution", -1, 4),
Among(u"ateur", -1, 2),
Among(u"iqUes", -1, 1),
Among(u"atrices", -1, 2),
Among(u"ances", -1, 1),
Among(u"ences", -1, 5),
Among(u"logies", -1, 3),
Among(u"ables", -1, 1),
Among(u"ismes", -1, 1),
Among(u"euses", -1, 11),
Among(u"istes", -1, 1),
Among(u"ives", -1, 8),
Among(u"ifs", -1, 8),
Among(u"usions", -1, 4),
Among(u"ations", -1, 2),
Among(u"utions", -1, 4),
Among(u"ateurs", -1, 2),
Among(u"ments", -1, 15),
Among(u"ements", 30, 6),
Among(u"issements", 31, 12),
Among(u"it\u00E9s", -1, 7),
Among(u"ment", -1, 15),
Among(u"ement", 34, 6),
Among(u"issement", 35, 12),
Among(u"amment", 34, 13),
Among(u"emment", 34, 14),
Among(u"aux", -1, 10),
Among(u"eaux", 39, 9),
Among(u"eux", -1, 1),
Among(u"it\u00E9", -1, 7)
]
a_5 = [
Among(u"ira", -1, 1),
Among(u"ie", -1, 1),
Among(u"isse", -1, 1),
Among(u"issante", -1, 1),
Among(u"i", -1, 1),
Among(u"irai", 4, 1),
Among(u"ir", -1, 1),
Among(u"iras", -1, 1),
Among(u"ies", -1, 1),
Among(u"\u00EEmes", -1, 1),
Among(u"isses", -1, 1),
Among(u"issantes", -1, 1),
Among(u"\u00EEtes", -1, 1),
Among(u"is", -1, 1),
Among(u"irais", 13, 1),
Among(u"issais", 13, 1),
Among(u"irions", -1, 1),
Among(u"issions", -1, 1),
Among(u"irons", -1, 1),
Among(u"issons", -1, 1),
Among(u"issants", -1, 1),
Among(u"it", -1, 1),
Among(u"irait", 21, 1),
Among(u"issait", 21, 1),
Among(u"issant", -1, 1),
Among(u"iraIent", -1, 1),
Among(u"issaIent", -1, 1),
Among(u"irent", -1, 1),
Among(u"issent", -1, 1),
Among(u"iront", -1, 1),
Among(u"\u00EEt", -1, 1),
Among(u"iriez", -1, 1),
Among(u"issiez", -1, 1),
Among(u"irez", -1, 1),
Among(u"issez", -1, 1)
]
a_6 = [
Among(u"a", -1, 3),
Among(u"era", 0, 2),
Among(u"asse", -1, 3),
Among(u"ante", -1, 3),
Among(u"\u00E9e", -1, 2),
Among(u"ai", -1, 3),
Among(u"erai", 5, 2),
Among(u"er", -1, 2),
Among(u"as", -1, 3),
Among(u"eras", 8, 2),
Among(u"\u00E2mes", -1, 3),
Among(u"asses", -1, 3),
Among(u"antes", -1, 3),
Among(u"\u00E2tes", -1, 3),
Among(u"\u00E9es", -1, 2),
Among(u"ais", -1, 3),
Among(u"erais", 15, 2),
Among(u"ions", -1, 1),
Among(u"erions", 17, 2),
Among(u"assions", 17, 3),
Among(u"erons", -1, 2),
Among(u"ants", -1, 3),
Among(u"\u00E9s", -1, 2),
Among(u"ait", -1, 3),
Among(u"erait", 23, 2),
Among(u"ant", -1, 3),
Among(u"aIent", -1, 3),
Among(u"eraIent", 26, 2),
Among(u"\u00E8rent", -1, 2),
Among(u"assent", -1, 3),
Among(u"eront", -1, 2),
Among(u"\u00E2t", -1, 3),
Among(u"ez", -1, 2),
Among(u"iez", 32, 2),
Among(u"eriez", 33, 2),
Among(u"assiez", 33, 3),
Among(u"erez", 32, 2),
Among(u"\u00E9", -1, 2)
]
a_7 = [
Among(u"e", -1, 3),
Among(u"I\u00E8re", 0, 2),
Among(u"i\u00E8re", 0, 2),
Among(u"ion", -1, 1),
Among(u"Ier", -1, 2),
Among(u"ier", -1, 2),
Among(u"\u00EB", -1, 4)
]
a_8 = [
Among(u"ell", -1, -1),
Among(u"eill", -1, -1),
Among(u"enn", -1, -1),
Among(u"onn", -1, -1),
Among(u"ett", -1, -1)
]
g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 130, 103, 8, 5]
g_keep_with_s = [1, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]
I_p2 = 0
I_p1 = 0
I_pV = 0
def copy_from(self, other):
self.I_p2 = other.I_p2
self.I_p1 = other.I_p1
self.I_pV = other.I_pV
super.copy_from(other)
def r_prelude(self):
# repeat, line 38
try:
while True:
try:
v_1 = self.cursor
try:
# goto, line 38
try:
while True:
v_2 = self.cursor
try:
# (, line 38
# or, line 44
try:
v_3 = self.cursor
try:
# (, line 40
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab6()
# [, line 40
self.bra = self.cursor
# or, line 40
try:
v_4 = self.cursor
try:
# (, line 40
# literal, line 40
if not self.eq_s(1, u"u"):
raise lab8()
# ], line 40
self.ket = self.cursor
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab8()
# <-, line 40
if not self.slice_from(u"U"):
return False
raise lab7()
except lab8: pass
self.cursor = v_4
try:
# (, line 41
# literal, line 41
if not self.eq_s(1, u"i"):
raise lab9()
# ], line 41
self.ket = self.cursor
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab9()
# <-, line 41
if not self.slice_from(u"I"):
return False
raise lab7()
except lab9: pass
self.cursor = v_4
# (, line 42
# literal, line 42
if not self.eq_s(1, u"y"):
raise lab6()
# ], line 42
self.ket = self.cursor
# <-, line 42
if not self.slice_from(u"Y"):
return False
except lab7: pass
raise lab5()
except lab6: pass
self.cursor = v_3
try:
# (, line 45
# [, line 45
self.bra = self.cursor
# literal, line 45
if not self.eq_s(1, u"y"):
raise lab10()
# ], line 45
self.ket = self.cursor
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab10()
# <-, line 45
if not self.slice_from(u"Y"):
return False
raise lab5()
except lab10: pass
self.cursor = v_3
# (, line 47
# literal, line 47
if not self.eq_s(1, u"q"):
raise lab4()
# [, line 47
self.bra = self.cursor
# literal, line 47
if not self.eq_s(1, u"u"):
raise lab4()
# ], line 47
self.ket = self.cursor
# <-, line 47
if not self.slice_from(u"U"):
return False
except lab5: pass
self.cursor = v_2
raise lab3()
except lab4: pass
self.cursor = v_2
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
except lab3: pass
raise lab1()
except lab2: pass
self.cursor = v_1
raise lab0()
except lab1: pass
except lab0: pass
return True
def r_mark_regions(self):
# (, line 50
self.I_pV = self.limit;
self.I_p1 = self.limit;
self.I_p2 = self.limit;
# do, line 56
v_1 = self.cursor
try:
# (, line 56
# or, line 58
try:
v_2 = self.cursor
try:
# (, line 57
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
# next, line 57
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
raise lab1()
except lab2: pass
self.cursor = v_2
try:
# among, line 59
if self.find_among(FrenchStemmer.a_0, 3) == 0:
raise lab3()
raise lab1()
except lab3: pass
self.cursor = v_2
# (, line 66
# next, line 66
if self.cursor >= self.limit:
raise lab0()
self.cursor += 1
# gopast, line 66
try:
while True:
try:
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab5()
raise lab4()
except lab5: pass
if self.cursor >= self.limit:
raise lab0()
self.cursor += 1
except lab4: pass
except lab1: pass
# setmark pV, line 67
self.I_pV = self.cursor
except lab0: pass
self.cursor = v_1
# do, line 69
v_4 = self.cursor
try:
# (, line 69
# gopast, line 70
try:
while True:
try:
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab8()
raise lab7()
except lab8: pass
if self.cursor >= self.limit:
raise lab6()
self.cursor += 1
except lab7: pass
# gopast, line 70
try:
while True:
try:
if not self.out_grouping(FrenchStemmer.g_v, 97, 251):
raise lab10()
raise lab9()
except lab10: pass
if self.cursor >= self.limit:
raise lab6()
self.cursor += 1
except lab9: pass
# setmark p1, line 70
self.I_p1 = self.cursor
# gopast, line 71
try:
while True:
try:
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab12()
raise lab11()
except lab12: pass
if self.cursor >= self.limit:
raise lab6()
self.cursor += 1
except lab11: pass
# gopast, line 71
try:
while True:
try:
if not self.out_grouping(FrenchStemmer.g_v, 97, 251):
raise lab14()
raise lab13()
except lab14: pass
if self.cursor >= self.limit:
raise lab6()
self.cursor += 1
except lab13: pass
# setmark p2, line 71
self.I_p2 = self.cursor
except lab6: pass
self.cursor = v_4
return True
def r_postlude(self):
# repeat, line 75
try:
while True:
try:
v_1 = self.cursor
try:
# (, line 75
# [, line 77
self.bra = self.cursor
# substring, line 77
among_var = self.find_among(FrenchStemmer.a_1, 4)
if among_var == 0:
raise lab2()
# ], line 77
self.ket = self.cursor
if among_var == 0:
raise lab2()
elif among_var == 1:
# (, line 78
# <-, line 78
if not self.slice_from(u"i"):
return False
elif among_var == 2:
# (, line 79
# <-, line 79
if not self.slice_from(u"u"):
return False
elif among_var == 3:
# (, line 80
# <-, line 80
if not self.slice_from(u"y"):
return False
elif among_var == 4:
# (, line 81
# next, line 81
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
raise lab1()
except lab2: pass
self.cursor = v_1
raise lab0()
except lab1: pass
except lab0: pass
return True
def r_RV(self):
if not self.I_pV <= self.cursor:
return False
return True
def r_R1(self):
if not self.I_p1 <= self.cursor:
return False
return True
def r_R2(self):
if not self.I_p2 <= self.cursor:
return False
return True
def r_standard_suffix(self):
# (, line 91
# [, line 92
self.ket = self.cursor
# substring, line 92
among_var = self.find_among_b(FrenchStemmer.a_4, 43)
if among_var == 0:
return False
# ], line 92
self.bra = self.cursor
if among_var == 0:
return False
elif among_var == 1:
# (, line 96
# call R2, line 96
if not self.r_R2():
return False
# delete, line 96
if not self.slice_del():
return False
elif among_var == 2:
# (, line 99
# call R2, line 99
if not self.r_R2():
return False
# delete, line 99
if not self.slice_del():
return False
# try, line 100
v_1 = self.limit - self.cursor
try:
# (, line 100
# [, line 100
self.ket = self.cursor
# literal, line 100
if not self.eq_s_b(2, u"ic"):
self.cursor = self.limit - v_1
raise lab0()
# ], line 100
self.bra = self.cursor
# or, line 100
try:
v_2 = self.limit - self.cursor
try:
# (, line 100
# call R2, line 100
if not self.r_R2():
raise lab2()
# delete, line 100
if not self.slice_del():
return False
raise lab1()
except lab2: pass
self.cursor = self.limit - v_2
# <-, line 100
if not self.slice_from(u"iqU"):
return False
except lab1: pass
except lab0: pass
elif among_var == 3:
# (, line 104
# call R2, line 104
if not self.r_R2():
return False
# <-, line 104
if not self.slice_from(u"log"):
return False
elif among_var == 4:
# (, line 107
# call R2, line 107
if not self.r_R2():
return False
# <-, line 107
if not self.slice_from(u"u"):
return False
elif among_var == 5:
# (, line 110
# call R2, line 110
if not self.r_R2():
return False
# <-, line 110
if not self.slice_from(u"ent"):
return False
elif among_var == 6:
# (, line 113
# call RV, line 114
if not self.r_RV():
return False
# delete, line 114
if not self.slice_del():
return False
# try, line 115
v_3 = self.limit - self.cursor
try:
# (, line 115
# [, line 116
self.ket = self.cursor
# substring, line 116
among_var = self.find_among_b(FrenchStemmer.a_2, 6)
if among_var == 0:
self.cursor = self.limit - v_3
raise lab3()
# ], line 116
self.bra = self.cursor
if among_var == 0:
self.cursor = self.limit - v_3
raise lab3()
elif among_var == 1:
# (, line 117
# call R2, line 117
if not self.r_R2():
self.cursor = self.limit - v_3
raise lab3()
# delete, line 117
if not self.slice_del():
return False
# [, line 117
self.ket = self.cursor
# literal, line 117
if not self.eq_s_b(2, u"at"):
self.cursor = self.limit - v_3
raise lab3()
# ], line 117
self.bra = self.cursor
# call R2, line 117
if not self.r_R2():
self.cursor = self.limit - v_3
raise lab3()
# delete, line 117
if not self.slice_del():
return False
elif among_var == 2:
# (, line 118
# or, line 118
try:
v_4 = self.limit - self.cursor
try:
# (, line 118
# call R2, line 118
if not self.r_R2():
raise lab5()
# delete, line 118
if not self.slice_del():
return False
raise lab4()
except lab5: pass
self.cursor = self.limit - v_4
# (, line 118
# call R1, line 118
if not self.r_R1():
self.cursor = self.limit - v_3
raise lab3()
# <-, line 118
if not self.slice_from(u"eux"):
return False
except lab4: pass
elif among_var == 3:
# (, line 120
# call R2, line 120
if not self.r_R2():
self.cursor = self.limit - v_3
raise lab3()
# delete, line 120
if not self.slice_del():
return False
elif among_var == 4:
# (, line 122
# call RV, line 122
if not self.r_RV():
self.cursor = self.limit - v_3
raise lab3()
# <-, line 122
if not self.slice_from(u"i"):
return False
except lab3: pass
elif among_var == 7:
# (, line 128
# call R2, line 129
if not self.r_R2():
return False
# delete, line 129
if not self.slice_del():
return False
# try, line 130
v_5 = self.limit - self.cursor
try:
# (, line 130
# [, line 131
self.ket = self.cursor
# substring, line 131
among_var = self.find_among_b(FrenchStemmer.a_3, 3)
if among_var == 0:
self.cursor = self.limit - v_5
raise lab6()
# ], line 131
self.bra = self.cursor
if among_var == 0:
self.cursor = self.limit - v_5
raise lab6()
elif among_var == 1:
# (, line 132
# or, line 132
try:
v_6 = self.limit - self.cursor
try:
# (, line 132
# call R2, line 132
if not self.r_R2():
raise lab8()
# delete, line 132
if not self.slice_del():
return False
raise lab7()
except lab8: pass
self.cursor = self.limit - v_6
# <-, line 132
if not self.slice_from(u"abl"):
return False
except lab7: pass
elif among_var == 2:
# (, line 133
# or, line 133
try:
v_7 = self.limit - self.cursor
try:
# (, line 133
# call R2, line 133
if not self.r_R2():
raise lab10()
# delete, line 133
if not self.slice_del():
return False
raise lab9()
except lab10: pass
self.cursor = self.limit - v_7
# <-, line 133
if not self.slice_from(u"iqU"):
return False
except lab9: pass
elif among_var == 3:
# (, line 134
# call R2, line 134
if not self.r_R2():
self.cursor = self.limit - v_5
raise lab6()
# delete, line 134
if not self.slice_del():
return False
except lab6: pass
elif among_var == 8:
# (, line 140
# call R2, line 141
if not self.r_R2():
return False
# delete, line 141
if not self.slice_del():
return False
# try, line 142
v_8 = self.limit - self.cursor
try:
# (, line 142
# [, line 142
self.ket = self.cursor
# literal, line 142
if not self.eq_s_b(2, u"at"):
self.cursor = self.limit - v_8
raise lab11()
# ], line 142
self.bra = self.cursor
# call R2, line 142
if not self.r_R2():
self.cursor = self.limit - v_8
raise lab11()
# delete, line 142
if not self.slice_del():
return False
# [, line 142
self.ket = self.cursor
# literal, line 142
if not self.eq_s_b(2, u"ic"):
self.cursor = self.limit - v_8
raise lab11()
# ], line 142
self.bra = self.cursor
# or, line 142
try:
v_9 = self.limit - self.cursor
try:
# (, line 142
# call R2, line 142
if not self.r_R2():
raise lab13()
# delete, line 142
if not self.slice_del():
return False
raise lab12()
except lab13: pass
self.cursor = self.limit - v_9
# <-, line 142
if not self.slice_from(u"iqU"):
return False
except lab12: pass
except lab11: pass
elif among_var == 9:
# (, line 144
# <-, line 144
if not self.slice_from(u"eau"):
return False
elif among_var == 10:
# (, line 145
# call R1, line 145
if not self.r_R1():
return False
# <-, line 145
if not self.slice_from(u"al"):
return False
elif among_var == 11:
# (, line 147
# or, line 147
try:
v_10 = self.limit - self.cursor
try:
# (, line 147
# call R2, line 147
if not self.r_R2():
raise lab15()
# delete, line 147
if not self.slice_del():
return False
raise lab14()
except lab15: pass
self.cursor = self.limit - v_10
# (, line 147
# call R1, line 147
if not self.r_R1():
return False
# <-, line 147
if not self.slice_from(u"eux"):
return False
except lab14: pass
elif among_var == 12:
# (, line 150
# call R1, line 150
if not self.r_R1():
return False
if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
return False
# delete, line 150
if not self.slice_del():
return False
elif among_var == 13:
# (, line 155
# call RV, line 155
if not self.r_RV():
return False
# fail, line 155
# (, line 155
# <-, line 155
if not self.slice_from(u"ant"):
return False
return False
elif among_var == 14:
# (, line 156
# call RV, line 156
if not self.r_RV():
return False
# fail, line 156
# (, line 156
# <-, line 156
if not self.slice_from(u"ent"):
return False
return False
elif among_var == 15:
# (, line 158
# test, line 158
v_11 = self.limit - self.cursor
# (, line 158
if not self.in_grouping_b(FrenchStemmer.g_v, 97, 251):
return False
# call RV, line 158
if not self.r_RV():
return False
self.cursor = self.limit - v_11
# fail, line 158
# (, line 158
# delete, line 158
if not self.slice_del():
return False
return False
return True
def r_i_verb_suffix(self):
# setlimit, line 163
v_1 = self.limit - self.cursor
# tomark, line 163
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_2 = self.limit_backward
self.limit_backward = self.cursor
self.cursor = self.limit - v_1
# (, line 163
# [, line 164
self.ket = self.cursor
# substring, line 164
among_var = self.find_among_b(FrenchStemmer.a_5, 35)
if among_var == 0:
self.limit_backward = v_2
return False
# ], line 164
self.bra = self.cursor
if among_var == 0:
self.limit_backward = v_2
return False
elif among_var == 1:
# (, line 170
if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
self.limit_backward = v_2
return False
# delete, line 170
if not self.slice_del():
return False
self.limit_backward = v_2
return True
def r_verb_suffix(self):
# setlimit, line 174
v_1 = self.limit - self.cursor
# tomark, line 174
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_2 = self.limit_backward
self.limit_backward = self.cursor
self.cursor = self.limit - v_1
# (, line 174
# [, line 175
self.ket = self.cursor
# substring, line 175
among_var = self.find_among_b(FrenchStemmer.a_6, 38)
if among_var == 0:
self.limit_backward = v_2
return False
# ], line 175
self.bra = self.cursor
if among_var == 0:
self.limit_backward = v_2
return False
elif among_var == 1:
# (, line 177
# call R2, line 177
if not self.r_R2():
self.limit_backward = v_2
return False
# delete, line 177
if not self.slice_del():
return False
elif among_var == 2:
# (, line 185
# delete, line 185
if not self.slice_del():
return False
elif among_var == 3:
# (, line 190
# delete, line 190
if not self.slice_del():
return False
# try, line 191
v_3 = self.limit - self.cursor
try:
# (, line 191
# [, line 191
self.ket = self.cursor
# literal, line 191
if not self.eq_s_b(1, u"e"):
self.cursor = self.limit - v_3
raise lab0()
# ], line 191
self.bra = self.cursor
# delete, line 191
if not self.slice_del():
return False
except lab0: pass
self.limit_backward = v_2
return True
def r_residual_suffix(self):
# (, line 198
# try, line 199
v_1 = self.limit - self.cursor
try:
# (, line 199
# [, line 199
self.ket = self.cursor
# literal, line 199
if not self.eq_s_b(1, u"s"):
self.cursor = self.limit - v_1
raise lab0()
# ], line 199
self.bra = self.cursor
# test, line 199
v_2 = self.limit - self.cursor
if not self.out_grouping_b(FrenchStemmer.g_keep_with_s, 97, 232):
self.cursor = self.limit - v_1
raise lab0()
self.cursor = self.limit - v_2
# delete, line 199
if not self.slice_del():
return False
except lab0: pass
# setlimit, line 200
v_3 = self.limit - self.cursor
# tomark, line 200
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_4 = self.limit_backward
self.limit_backward = self.cursor
self.cursor = self.limit - v_3
# (, line 200
# [, line 201
self.ket = self.cursor
# substring, line 201
among_var = self.find_among_b(FrenchStemmer.a_7, 7)
if among_var == 0:
self.limit_backward = v_4
return False
# ], line 201
self.bra = self.cursor
if among_var == 0:
self.limit_backward = v_4
return False
elif among_var == 1:
# (, line 202
# call R2, line 202
if not self.r_R2():
self.limit_backward = v_4
return False
# or, line 202
try:
v_5 = self.limit - self.cursor
try:
# literal, line 202
if not self.eq_s_b(1, u"s"):
raise lab2()
raise lab1()
except lab2: pass
self.cursor = self.limit - v_5
# literal, line 202
if not self.eq_s_b(1, u"t"):
self.limit_backward = v_4
return False
except lab1: pass
# delete, line 202
if not self.slice_del():
return False
elif among_var == 2:
# (, line 204
# <-, line 204
if not self.slice_from(u"i"):
return False
elif among_var == 3:
# (, line 205
# delete, line 205
if not self.slice_del():
return False
elif among_var == 4:
# (, line 206
# literal, line 206
if not self.eq_s_b(2, u"gu"):
self.limit_backward = v_4
return False
# delete, line 206
if not self.slice_del():
return False
self.limit_backward = v_4
return True
def r_un_double(self):
# (, line 211
# test, line 212
v_1 = self.limit - self.cursor
# among, line 212
if self.find_among_b(FrenchStemmer.a_8, 5) == 0:
return False
self.cursor = self.limit - v_1
# [, line 212
self.ket = self.cursor
# next, line 212
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# ], line 212
self.bra = self.cursor
# delete, line 212
if not self.slice_del():
return False
return True
def r_un_accent(self):
# (, line 215
# atleast, line 216
v_1 = 1
# atleast, line 216
try:
while True:
try:
try:
if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
raise lab2()
v_1 -= 1
raise lab1()
except lab2: pass
raise lab0()
except lab1: pass
except lab0: pass
if v_1 > 0:
return False
# [, line 217
self.ket = self.cursor
# or, line 217
try:
v_3 = self.limit - self.cursor
try:
# literal, line 217
if not self.eq_s_b(1, u"\u00E9"):
raise lab4()
raise lab3()
except lab4: pass
self.cursor = self.limit - v_3
# literal, line 217
if not self.eq_s_b(1, u"\u00E8"):
return False
except lab3: pass
# ], line 217
self.bra = self.cursor
# <-, line 217
if not self.slice_from(u"e"):
return False
return True
def _stem(self):
# (, line 221
# do, line 223
v_1 = self.cursor
try:
# call prelude, line 223
if not self.r_prelude():
raise lab0()
except lab0: pass
self.cursor = v_1
# do, line 224
v_2 = self.cursor
try:
# call mark_regions, line 224
if not self.r_mark_regions():
raise lab1()
except lab1: pass
self.cursor = v_2
# backwards, line 225
self.limit_backward = self.cursor
self.cursor = self.limit
# (, line 225
# do, line 227
v_3 = self.limit - self.cursor
try:
# (, line 227
# or, line 237
try:
v_4 = self.limit - self.cursor
try:
# (, line 228
# and, line 233
v_5 = self.limit - self.cursor
# (, line 229
# or, line 229
try:
v_6 = self.limit - self.cursor
try:
# call standard_suffix, line 229
if not self.r_standard_suffix():
raise lab6()
raise lab5()
except lab6: pass
self.cursor = self.limit - v_6
try:
# call i_verb_suffix, line 230
if not self.r_i_verb_suffix():
raise lab7()
raise lab5()
except lab7: pass
self.cursor = self.limit - v_6
# call verb_suffix, line 231
if not self.r_verb_suffix():
raise lab4()
except lab5: pass
self.cursor = self.limit - v_5
# try, line 234
v_7 = self.limit - self.cursor
try:
# (, line 234
# [, line 234
self.ket = self.cursor
# or, line 234
try:
v_8 = self.limit - self.cursor
try:
# (, line 234
# literal, line 234
if not self.eq_s_b(1, u"Y"):
raise lab10()
# ], line 234
self.bra = self.cursor
# <-, line 234
if not self.slice_from(u"i"):
return False
raise lab9()
except lab10: pass
self.cursor = self.limit - v_8
# (, line 235
# literal, line 235
if not self.eq_s_b(1, u"\u00E7"):
self.cursor = self.limit - v_7
raise lab8()
# ], line 235
self.bra = self.cursor
# <-, line 235
if not self.slice_from(u"c"):
return False
except lab9: pass
except lab8: pass
raise lab3()
except lab4: pass
self.cursor = self.limit - v_4
# call residual_suffix, line 238
if not self.r_residual_suffix():
raise lab2()
except lab3: pass
except lab2: pass
self.cursor = self.limit - v_3
# do, line 243
v_9 = self.limit - self.cursor
try:
# call un_double, line 243
if not self.r_un_double():
raise lab11()
except lab11: pass
self.cursor = self.limit - v_9
# do, line 244
v_10 = self.limit - self.cursor
try:
# call un_accent, line 244
if not self.r_un_accent():
raise lab12()
except lab12: pass
self.cursor = self.limit - v_10
self.cursor = self.limit_backward
# do, line 246
v_11 = self.cursor
try:
# call postlude, line 246
if not self.r_postlude():
raise lab13()
except lab13: pass
self.cursor = v_11
return True
def equals(self, o):
return isinstance(o, FrenchStemmer)
def hashCode(self):
return hash("FrenchStemmer")
class lab0(BaseException): pass
class lab1(BaseException): pass
class lab2(BaseException): pass
class lab3(BaseException): pass
class lab4(BaseException): pass
class lab5(BaseException): pass
class lab6(BaseException): pass
class lab7(BaseException): pass
class lab8(BaseException): pass
class lab9(BaseException): pass
class lab10(BaseException): pass
class lab11(BaseException): pass
class lab12(BaseException): pass
class lab13(BaseException): pass
class lab14(BaseException): pass
class lab15(BaseException): pass
|