ansible-later/env_27/lib/python2.7/site-packages/snowballstemmer/turkish_stemmer.py

2602 lines
93 KiB
Python
Raw Normal View History

2019-04-11 13:56:20 +00:00
# self file was generated automatically by the Snowball to Python interpreter
from .basestemmer import BaseStemmer
from .among import Among
class TurkishStemmer(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"m", -1, -1),
Among(u"n", -1, -1),
Among(u"miz", -1, -1),
Among(u"niz", -1, -1),
Among(u"muz", -1, -1),
Among(u"nuz", -1, -1),
Among(u"m\u00FCz", -1, -1),
Among(u"n\u00FCz", -1, -1),
Among(u"m\u0131z", -1, -1),
Among(u"n\u0131z", -1, -1)
]
a_1 = [
Among(u"leri", -1, -1),
Among(u"lar\u0131", -1, -1)
]
a_2 = [
Among(u"ni", -1, -1),
Among(u"nu", -1, -1),
Among(u"n\u00FC", -1, -1),
Among(u"n\u0131", -1, -1)
]
a_3 = [
Among(u"in", -1, -1),
Among(u"un", -1, -1),
Among(u"\u00FCn", -1, -1),
Among(u"\u0131n", -1, -1)
]
a_4 = [
Among(u"a", -1, -1),
Among(u"e", -1, -1)
]
a_5 = [
Among(u"na", -1, -1),
Among(u"ne", -1, -1)
]
a_6 = [
Among(u"da", -1, -1),
Among(u"ta", -1, -1),
Among(u"de", -1, -1),
Among(u"te", -1, -1)
]
a_7 = [
Among(u"nda", -1, -1),
Among(u"nde", -1, -1)
]
a_8 = [
Among(u"dan", -1, -1),
Among(u"tan", -1, -1),
Among(u"den", -1, -1),
Among(u"ten", -1, -1)
]
a_9 = [
Among(u"ndan", -1, -1),
Among(u"nden", -1, -1)
]
a_10 = [
Among(u"la", -1, -1),
Among(u"le", -1, -1)
]
a_11 = [
Among(u"ca", -1, -1),
Among(u"ce", -1, -1)
]
a_12 = [
Among(u"im", -1, -1),
Among(u"um", -1, -1),
Among(u"\u00FCm", -1, -1),
Among(u"\u0131m", -1, -1)
]
a_13 = [
Among(u"sin", -1, -1),
Among(u"sun", -1, -1),
Among(u"s\u00FCn", -1, -1),
Among(u"s\u0131n", -1, -1)
]
a_14 = [
Among(u"iz", -1, -1),
Among(u"uz", -1, -1),
Among(u"\u00FCz", -1, -1),
Among(u"\u0131z", -1, -1)
]
a_15 = [
Among(u"siniz", -1, -1),
Among(u"sunuz", -1, -1),
Among(u"s\u00FCn\u00FCz", -1, -1),
Among(u"s\u0131n\u0131z", -1, -1)
]
a_16 = [
Among(u"lar", -1, -1),
Among(u"ler", -1, -1)
]
a_17 = [
Among(u"niz", -1, -1),
Among(u"nuz", -1, -1),
Among(u"n\u00FCz", -1, -1),
Among(u"n\u0131z", -1, -1)
]
a_18 = [
Among(u"dir", -1, -1),
Among(u"tir", -1, -1),
Among(u"dur", -1, -1),
Among(u"tur", -1, -1),
Among(u"d\u00FCr", -1, -1),
Among(u"t\u00FCr", -1, -1),
Among(u"d\u0131r", -1, -1),
Among(u"t\u0131r", -1, -1)
]
a_19 = [
Among(u"cas\u0131na", -1, -1),
Among(u"cesine", -1, -1)
]
a_20 = [
Among(u"di", -1, -1),
Among(u"ti", -1, -1),
Among(u"dik", -1, -1),
Among(u"tik", -1, -1),
Among(u"duk", -1, -1),
Among(u"tuk", -1, -1),
Among(u"d\u00FCk", -1, -1),
Among(u"t\u00FCk", -1, -1),
Among(u"d\u0131k", -1, -1),
Among(u"t\u0131k", -1, -1),
Among(u"dim", -1, -1),
Among(u"tim", -1, -1),
Among(u"dum", -1, -1),
Among(u"tum", -1, -1),
Among(u"d\u00FCm", -1, -1),
Among(u"t\u00FCm", -1, -1),
Among(u"d\u0131m", -1, -1),
Among(u"t\u0131m", -1, -1),
Among(u"din", -1, -1),
Among(u"tin", -1, -1),
Among(u"dun", -1, -1),
Among(u"tun", -1, -1),
Among(u"d\u00FCn", -1, -1),
Among(u"t\u00FCn", -1, -1),
Among(u"d\u0131n", -1, -1),
Among(u"t\u0131n", -1, -1),
Among(u"du", -1, -1),
Among(u"tu", -1, -1),
Among(u"d\u00FC", -1, -1),
Among(u"t\u00FC", -1, -1),
Among(u"d\u0131", -1, -1),
Among(u"t\u0131", -1, -1)
]
a_21 = [
Among(u"sa", -1, -1),
Among(u"se", -1, -1),
Among(u"sak", -1, -1),
Among(u"sek", -1, -1),
Among(u"sam", -1, -1),
Among(u"sem", -1, -1),
Among(u"san", -1, -1),
Among(u"sen", -1, -1)
]
a_22 = [
Among(u"mi\u015F", -1, -1),
Among(u"mu\u015F", -1, -1),
Among(u"m\u00FC\u015F", -1, -1),
Among(u"m\u0131\u015F", -1, -1)
]
a_23 = [
Among(u"b", -1, 1),
Among(u"c", -1, 2),
Among(u"d", -1, 3),
Among(u"\u011F", -1, 4)
]
g_vowel = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1]
g_U = [1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1]
g_vowel1 = [1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
g_vowel2 = [17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130]
g_vowel3 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
g_vowel4 = [17]
g_vowel5 = [65]
g_vowel6 = [65]
B_continue_stemming_noun_suffixes = False
I_strlen = 0
def copy_from(self, other):
self.B_continue_stemming_noun_suffixes = other.B_continue_stemming_noun_suffixes
self.I_strlen = other.I_strlen
super.copy_from(other)
def r_check_vowel_harmony(self):
# (, line 111
# test, line 112
v_1 = self.limit - self.cursor
# (, line 113
# (, line 114
# goto, line 114
try:
while True:
v_2 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_2
raise lab0()
except lab1: pass
self.cursor = self.limit - v_2
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab0: pass
# (, line 115
# or, line 116
try:
v_3 = self.limit - self.cursor
try:
# (, line 116
# literal, line 116
if not self.eq_s_b(1, u"a"):
raise lab3()
# goto, line 116
try:
while True:
v_4 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel1, 97, 305):
raise lab5()
self.cursor = self.limit - v_4
raise lab4()
except lab5: pass
self.cursor = self.limit - v_4
if self.cursor <= self.limit_backward:
raise lab3()
self.cursor -= 1
except lab4: pass
raise lab2()
except lab3: pass
self.cursor = self.limit - v_3
try:
# (, line 117
# literal, line 117
if not self.eq_s_b(1, u"e"):
raise lab6()
# goto, line 117
try:
while True:
v_5 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel2, 101, 252):
raise lab8()
self.cursor = self.limit - v_5
raise lab7()
except lab8: pass
self.cursor = self.limit - v_5
if self.cursor <= self.limit_backward:
raise lab6()
self.cursor -= 1
except lab7: pass
raise lab2()
except lab6: pass
self.cursor = self.limit - v_3
try:
# (, line 118
# literal, line 118
if not self.eq_s_b(1, u"\u0131"):
raise lab9()
# goto, line 118
try:
while True:
v_6 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel3, 97, 305):
raise lab11()
self.cursor = self.limit - v_6
raise lab10()
except lab11: pass
self.cursor = self.limit - v_6
if self.cursor <= self.limit_backward:
raise lab9()
self.cursor -= 1
except lab10: pass
raise lab2()
except lab9: pass
self.cursor = self.limit - v_3
try:
# (, line 119
# literal, line 119
if not self.eq_s_b(1, u"i"):
raise lab12()
# goto, line 119
try:
while True:
v_7 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel4, 101, 105):
raise lab14()
self.cursor = self.limit - v_7
raise lab13()
except lab14: pass
self.cursor = self.limit - v_7
if self.cursor <= self.limit_backward:
raise lab12()
self.cursor -= 1
except lab13: pass
raise lab2()
except lab12: pass
self.cursor = self.limit - v_3
try:
# (, line 120
# literal, line 120
if not self.eq_s_b(1, u"o"):
raise lab15()
# goto, line 120
try:
while True:
v_8 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117):
raise lab17()
self.cursor = self.limit - v_8
raise lab16()
except lab17: pass
self.cursor = self.limit - v_8
if self.cursor <= self.limit_backward:
raise lab15()
self.cursor -= 1
except lab16: pass
raise lab2()
except lab15: pass
self.cursor = self.limit - v_3
try:
# (, line 121
# literal, line 121
if not self.eq_s_b(1, u"\u00F6"):
raise lab18()
# goto, line 121
try:
while True:
v_9 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252):
raise lab20()
self.cursor = self.limit - v_9
raise lab19()
except lab20: pass
self.cursor = self.limit - v_9
if self.cursor <= self.limit_backward:
raise lab18()
self.cursor -= 1
except lab19: pass
raise lab2()
except lab18: pass
self.cursor = self.limit - v_3
try:
# (, line 122
# literal, line 122
if not self.eq_s_b(1, u"u"):
raise lab21()
# goto, line 122
try:
while True:
v_10 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117):
raise lab23()
self.cursor = self.limit - v_10
raise lab22()
except lab23: pass
self.cursor = self.limit - v_10
if self.cursor <= self.limit_backward:
raise lab21()
self.cursor -= 1
except lab22: pass
raise lab2()
except lab21: pass
self.cursor = self.limit - v_3
# (, line 123
# literal, line 123
if not self.eq_s_b(1, u"\u00FC"):
return False
# goto, line 123
try:
while True:
v_11 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252):
raise lab25()
self.cursor = self.limit - v_11
raise lab24()
except lab25: pass
self.cursor = self.limit - v_11
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab24: pass
except lab2: pass
self.cursor = self.limit - v_1
return True
def r_mark_suffix_with_optional_n_consonant(self):
# (, line 132
# or, line 134
try:
v_1 = self.limit - self.cursor
try:
# (, line 133
# (, line 133
# test, line 133
v_2 = self.limit - self.cursor
# literal, line 133
if not self.eq_s_b(1, u"n"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 133
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 133
# test, line 133
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 135
# (, line 135
# not, line 135
v_4 = self.limit - self.cursor
try:
# (, line 135
# test, line 135
v_5 = self.limit - self.cursor
# literal, line 135
if not self.eq_s_b(1, u"n"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 135
v_6 = self.limit - self.cursor
# (, line 135
# next, line 135
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 135
# test, line 135
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_s_consonant(self):
# (, line 143
# or, line 145
try:
v_1 = self.limit - self.cursor
try:
# (, line 144
# (, line 144
# test, line 144
v_2 = self.limit - self.cursor
# literal, line 144
if not self.eq_s_b(1, u"s"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 144
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 144
# test, line 144
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 146
# (, line 146
# not, line 146
v_4 = self.limit - self.cursor
try:
# (, line 146
# test, line 146
v_5 = self.limit - self.cursor
# literal, line 146
if not self.eq_s_b(1, u"s"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 146
v_6 = self.limit - self.cursor
# (, line 146
# next, line 146
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 146
# test, line 146
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_y_consonant(self):
# (, line 153
# or, line 155
try:
v_1 = self.limit - self.cursor
try:
# (, line 154
# (, line 154
# test, line 154
v_2 = self.limit - self.cursor
# literal, line 154
if not self.eq_s_b(1, u"y"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 154
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 154
# test, line 154
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 156
# (, line 156
# not, line 156
v_4 = self.limit - self.cursor
try:
# (, line 156
# test, line 156
v_5 = self.limit - self.cursor
# literal, line 156
if not self.eq_s_b(1, u"y"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 156
v_6 = self.limit - self.cursor
# (, line 156
# next, line 156
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 156
# test, line 156
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_U_vowel(self):
# (, line 159
# or, line 161
try:
v_1 = self.limit - self.cursor
try:
# (, line 160
# (, line 160
# test, line 160
v_2 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
raise lab1()
self.cursor = self.limit - v_2
# next, line 160
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 160
# test, line 160
v_3 = self.limit - self.cursor
if not self.out_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 162
# (, line 162
# not, line 162
v_4 = self.limit - self.cursor
try:
# (, line 162
# test, line 162
v_5 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 162
v_6 = self.limit - self.cursor
# (, line 162
# next, line 162
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 162
# test, line 162
v_7 = self.limit - self.cursor
if not self.out_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_possessives(self):
# (, line 166
# among, line 167
if self.find_among_b(TurkishStemmer.a_0, 10) == 0:
return False
# (, line 169
# call mark_suffix_with_optional_U_vowel, line 169
if not self.r_mark_suffix_with_optional_U_vowel():
return False
return True
def r_mark_sU(self):
# (, line 172
# call check_vowel_harmony, line 173
if not self.r_check_vowel_harmony():
return False
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
return False
# (, line 175
# call mark_suffix_with_optional_s_consonant, line 175
if not self.r_mark_suffix_with_optional_s_consonant():
return False
return True
def r_mark_lArI(self):
# (, line 178
# among, line 179
if self.find_among_b(TurkishStemmer.a_1, 2) == 0:
return False
return True
def r_mark_yU(self):
# (, line 182
# call check_vowel_harmony, line 183
if not self.r_check_vowel_harmony():
return False
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
return False
# (, line 185
# call mark_suffix_with_optional_y_consonant, line 185
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_nU(self):
# (, line 188
# call check_vowel_harmony, line 189
if not self.r_check_vowel_harmony():
return False
# among, line 190
if self.find_among_b(TurkishStemmer.a_2, 4) == 0:
return False
return True
def r_mark_nUn(self):
# (, line 193
# call check_vowel_harmony, line 194
if not self.r_check_vowel_harmony():
return False
# among, line 195
if self.find_among_b(TurkishStemmer.a_3, 4) == 0:
return False
# (, line 196
# call mark_suffix_with_optional_n_consonant, line 196
if not self.r_mark_suffix_with_optional_n_consonant():
return False
return True
def r_mark_yA(self):
# (, line 199
# call check_vowel_harmony, line 200
if not self.r_check_vowel_harmony():
return False
# among, line 201
if self.find_among_b(TurkishStemmer.a_4, 2) == 0:
return False
# (, line 202
# call mark_suffix_with_optional_y_consonant, line 202
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_nA(self):
# (, line 205
# call check_vowel_harmony, line 206
if not self.r_check_vowel_harmony():
return False
# among, line 207
if self.find_among_b(TurkishStemmer.a_5, 2) == 0:
return False
return True
def r_mark_DA(self):
# (, line 210
# call check_vowel_harmony, line 211
if not self.r_check_vowel_harmony():
return False
# among, line 212
if self.find_among_b(TurkishStemmer.a_6, 4) == 0:
return False
return True
def r_mark_ndA(self):
# (, line 215
# call check_vowel_harmony, line 216
if not self.r_check_vowel_harmony():
return False
# among, line 217
if self.find_among_b(TurkishStemmer.a_7, 2) == 0:
return False
return True
def r_mark_DAn(self):
# (, line 220
# call check_vowel_harmony, line 221
if not self.r_check_vowel_harmony():
return False
# among, line 222
if self.find_among_b(TurkishStemmer.a_8, 4) == 0:
return False
return True
def r_mark_ndAn(self):
# (, line 225
# call check_vowel_harmony, line 226
if not self.r_check_vowel_harmony():
return False
# among, line 227
if self.find_among_b(TurkishStemmer.a_9, 2) == 0:
return False
return True
def r_mark_ylA(self):
# (, line 230
# call check_vowel_harmony, line 231
if not self.r_check_vowel_harmony():
return False
# among, line 232
if self.find_among_b(TurkishStemmer.a_10, 2) == 0:
return False
# (, line 233
# call mark_suffix_with_optional_y_consonant, line 233
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ki(self):
# (, line 236
# literal, line 237
if not self.eq_s_b(2, u"ki"):
return False
return True
def r_mark_ncA(self):
# (, line 240
# call check_vowel_harmony, line 241
if not self.r_check_vowel_harmony():
return False
# among, line 242
if self.find_among_b(TurkishStemmer.a_11, 2) == 0:
return False
# (, line 243
# call mark_suffix_with_optional_n_consonant, line 243
if not self.r_mark_suffix_with_optional_n_consonant():
return False
return True
def r_mark_yUm(self):
# (, line 246
# call check_vowel_harmony, line 247
if not self.r_check_vowel_harmony():
return False
# among, line 248
if self.find_among_b(TurkishStemmer.a_12, 4) == 0:
return False
# (, line 249
# call mark_suffix_with_optional_y_consonant, line 249
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_sUn(self):
# (, line 252
# call check_vowel_harmony, line 253
if not self.r_check_vowel_harmony():
return False
# among, line 254
if self.find_among_b(TurkishStemmer.a_13, 4) == 0:
return False
return True
def r_mark_yUz(self):
# (, line 257
# call check_vowel_harmony, line 258
if not self.r_check_vowel_harmony():
return False
# among, line 259
if self.find_among_b(TurkishStemmer.a_14, 4) == 0:
return False
# (, line 260
# call mark_suffix_with_optional_y_consonant, line 260
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_sUnUz(self):
# (, line 263
# among, line 264
if self.find_among_b(TurkishStemmer.a_15, 4) == 0:
return False
return True
def r_mark_lAr(self):
# (, line 267
# call check_vowel_harmony, line 268
if not self.r_check_vowel_harmony():
return False
# among, line 269
if self.find_among_b(TurkishStemmer.a_16, 2) == 0:
return False
return True
def r_mark_nUz(self):
# (, line 272
# call check_vowel_harmony, line 273
if not self.r_check_vowel_harmony():
return False
# among, line 274
if self.find_among_b(TurkishStemmer.a_17, 4) == 0:
return False
return True
def r_mark_DUr(self):
# (, line 277
# call check_vowel_harmony, line 278
if not self.r_check_vowel_harmony():
return False
# among, line 279
if self.find_among_b(TurkishStemmer.a_18, 8) == 0:
return False
return True
def r_mark_cAsInA(self):
# (, line 282
# among, line 283
if self.find_among_b(TurkishStemmer.a_19, 2) == 0:
return False
return True
def r_mark_yDU(self):
# (, line 286
# call check_vowel_harmony, line 287
if not self.r_check_vowel_harmony():
return False
# among, line 288
if self.find_among_b(TurkishStemmer.a_20, 32) == 0:
return False
# (, line 292
# call mark_suffix_with_optional_y_consonant, line 292
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ysA(self):
# (, line 296
# among, line 297
if self.find_among_b(TurkishStemmer.a_21, 8) == 0:
return False
# (, line 298
# call mark_suffix_with_optional_y_consonant, line 298
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ymUs_(self):
# (, line 301
# call check_vowel_harmony, line 302
if not self.r_check_vowel_harmony():
return False
# among, line 303
if self.find_among_b(TurkishStemmer.a_22, 4) == 0:
return False
# (, line 304
# call mark_suffix_with_optional_y_consonant, line 304
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_yken(self):
# (, line 307
# literal, line 308
if not self.eq_s_b(3, u"ken"):
return False
# (, line 308
# call mark_suffix_with_optional_y_consonant, line 308
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_stem_nominal_verb_suffixes(self):
# (, line 311
# [, line 312
self.ket = self.cursor
# set continue_stemming_noun_suffixes, line 313
self.B_continue_stemming_noun_suffixes = True
# or, line 315
try:
v_1 = self.limit - self.cursor
try:
# (, line 314
# or, line 314
try:
v_2 = self.limit - self.cursor
try:
# call mark_ymUs_, line 314
if not self.r_mark_ymUs_():
raise lab3()
raise lab2()
except lab3: pass
self.cursor = self.limit - v_2
try:
# call mark_yDU, line 314
if not self.r_mark_yDU():
raise lab4()
raise lab2()
except lab4: pass
self.cursor = self.limit - v_2
try:
# call mark_ysA, line 314
if not self.r_mark_ysA():
raise lab5()
raise lab2()
except lab5: pass
self.cursor = self.limit - v_2
# call mark_yken, line 314
if not self.r_mark_yken():
raise lab1()
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 316
# call mark_cAsInA, line 316
if not self.r_mark_cAsInA():
raise lab6()
# (, line 316
# or, line 316
try:
v_3 = self.limit - self.cursor
try:
# call mark_sUnUz, line 316
if not self.r_mark_sUnUz():
raise lab8()
raise lab7()
except lab8: pass
self.cursor = self.limit - v_3
try:
# call mark_lAr, line 316
if not self.r_mark_lAr():
raise lab9()
raise lab7()
except lab9: pass
self.cursor = self.limit - v_3
try:
# call mark_yUm, line 316
if not self.r_mark_yUm():
raise lab10()
raise lab7()
except lab10: pass
self.cursor = self.limit - v_3
try:
# call mark_sUn, line 316
if not self.r_mark_sUn():
raise lab11()
raise lab7()
except lab11: pass
self.cursor = self.limit - v_3
try:
# call mark_yUz, line 316
if not self.r_mark_yUz():
raise lab12()
raise lab7()
except lab12: pass
self.cursor = self.limit - v_3
except lab7: pass
# call mark_ymUs_, line 316
if not self.r_mark_ymUs_():
raise lab6()
raise lab0()
except lab6: pass
self.cursor = self.limit - v_1
try:
# (, line 318
# call mark_lAr, line 319
if not self.r_mark_lAr():
raise lab13()
# ], line 319
self.bra = self.cursor
# delete, line 319
if not self.slice_del():
return False
# try, line 319
v_4 = self.limit - self.cursor
try:
# (, line 319
# [, line 319
self.ket = self.cursor
# (, line 319
# or, line 319
try:
v_5 = self.limit - self.cursor
try:
# call mark_DUr, line 319
if not self.r_mark_DUr():
raise lab16()
raise lab15()
except lab16: pass
self.cursor = self.limit - v_5
try:
# call mark_yDU, line 319
if not self.r_mark_yDU():
raise lab17()
raise lab15()
except lab17: pass
self.cursor = self.limit - v_5
try:
# call mark_ysA, line 319
if not self.r_mark_ysA():
raise lab18()
raise lab15()
except lab18: pass
self.cursor = self.limit - v_5
# call mark_ymUs_, line 319
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_4
raise lab14()
except lab15: pass
except lab14: pass
# unset continue_stemming_noun_suffixes, line 320
self.B_continue_stemming_noun_suffixes = False
raise lab0()
except lab13: pass
self.cursor = self.limit - v_1
try:
# (, line 323
# call mark_nUz, line 323
if not self.r_mark_nUz():
raise lab19()
# (, line 323
# or, line 323
try:
v_6 = self.limit - self.cursor
try:
# call mark_yDU, line 323
if not self.r_mark_yDU():
raise lab21()
raise lab20()
except lab21: pass
self.cursor = self.limit - v_6
# call mark_ysA, line 323
if not self.r_mark_ysA():
raise lab19()
except lab20: pass
raise lab0()
except lab19: pass
self.cursor = self.limit - v_1
try:
# (, line 325
# (, line 325
# or, line 325
try:
v_7 = self.limit - self.cursor
try:
# call mark_sUnUz, line 325
if not self.r_mark_sUnUz():
raise lab24()
raise lab23()
except lab24: pass
self.cursor = self.limit - v_7
try:
# call mark_yUz, line 325
if not self.r_mark_yUz():
raise lab25()
raise lab23()
except lab25: pass
self.cursor = self.limit - v_7
try:
# call mark_sUn, line 325
if not self.r_mark_sUn():
raise lab26()
raise lab23()
except lab26: pass
self.cursor = self.limit - v_7
# call mark_yUm, line 325
if not self.r_mark_yUm():
raise lab22()
except lab23: pass
# ], line 325
self.bra = self.cursor
# delete, line 325
if not self.slice_del():
return False
# try, line 325
v_8 = self.limit - self.cursor
try:
# (, line 325
# [, line 325
self.ket = self.cursor
# call mark_ymUs_, line 325
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_8
raise lab27()
except lab27: pass
raise lab0()
except lab22: pass
self.cursor = self.limit - v_1
# (, line 327
# call mark_DUr, line 327
if not self.r_mark_DUr():
return False
# ], line 327
self.bra = self.cursor
# delete, line 327
if not self.slice_del():
return False
# try, line 327
v_9 = self.limit - self.cursor
try:
# (, line 327
# [, line 327
self.ket = self.cursor
# (, line 327
# or, line 327
try:
v_10 = self.limit - self.cursor
try:
# call mark_sUnUz, line 327
if not self.r_mark_sUnUz():
raise lab30()
raise lab29()
except lab30: pass
self.cursor = self.limit - v_10
try:
# call mark_lAr, line 327
if not self.r_mark_lAr():
raise lab31()
raise lab29()
except lab31: pass
self.cursor = self.limit - v_10
try:
# call mark_yUm, line 327
if not self.r_mark_yUm():
raise lab32()
raise lab29()
except lab32: pass
self.cursor = self.limit - v_10
try:
# call mark_sUn, line 327
if not self.r_mark_sUn():
raise lab33()
raise lab29()
except lab33: pass
self.cursor = self.limit - v_10
try:
# call mark_yUz, line 327
if not self.r_mark_yUz():
raise lab34()
raise lab29()
except lab34: pass
self.cursor = self.limit - v_10
except lab29: pass
# call mark_ymUs_, line 327
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_9
raise lab28()
except lab28: pass
except lab0: pass
# ], line 328
self.bra = self.cursor
# delete, line 328
if not self.slice_del():
return False
return True
def r_stem_suffix_chain_before_ki(self):
# (, line 332
# [, line 333
self.ket = self.cursor
# call mark_ki, line 334
if not self.r_mark_ki():
return False
# (, line 335
# or, line 342
try:
v_1 = self.limit - self.cursor
try:
# (, line 336
# call mark_DA, line 336
if not self.r_mark_DA():
raise lab1()
# ], line 336
self.bra = self.cursor
# delete, line 336
if not self.slice_del():
return False
# try, line 336
v_2 = self.limit - self.cursor
try:
# (, line 336
# [, line 336
self.ket = self.cursor
# or, line 338
try:
v_3 = self.limit - self.cursor
try:
# (, line 337
# call mark_lAr, line 337
if not self.r_mark_lAr():
raise lab4()
# ], line 337
self.bra = self.cursor
# delete, line 337
if not self.slice_del():
return False
# try, line 337
v_4 = self.limit - self.cursor
try:
# (, line 337
# call stem_suffix_chain_before_ki, line 337
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_4
raise lab5()
except lab5: pass
raise lab3()
except lab4: pass
self.cursor = self.limit - v_3
# (, line 339
# call mark_possessives, line 339
if not self.r_mark_possessives():
self.cursor = self.limit - v_2
raise lab2()
# ], line 339
self.bra = self.cursor
# delete, line 339
if not self.slice_del():
return False
# try, line 339
v_5 = self.limit - self.cursor
try:
# (, line 339
# [, line 339
self.ket = self.cursor
# call mark_lAr, line 339
if not self.r_mark_lAr():
self.cursor = self.limit - v_5
raise lab6()
# ], line 339
self.bra = self.cursor
# delete, line 339
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 339
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_5
raise lab6()
except lab6: pass
except lab3: pass
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 343
# call mark_nUn, line 343
if not self.r_mark_nUn():
raise lab7()
# ], line 343
self.bra = self.cursor
# delete, line 343
if not self.slice_del():
return False
# try, line 343
v_6 = self.limit - self.cursor
try:
# (, line 343
# [, line 343
self.ket = self.cursor
# or, line 345
try:
v_7 = self.limit - self.cursor
try:
# (, line 344
# call mark_lArI, line 344
if not self.r_mark_lArI():
raise lab10()
# ], line 344
self.bra = self.cursor
# delete, line 344
if not self.slice_del():
return False
raise lab9()
except lab10: pass
self.cursor = self.limit - v_7
try:
# (, line 346
# [, line 346
self.ket = self.cursor
# or, line 346
try:
v_8 = self.limit - self.cursor
try:
# call mark_possessives, line 346
if not self.r_mark_possessives():
raise lab13()
raise lab12()
except lab13: pass
self.cursor = self.limit - v_8
# call mark_sU, line 346
if not self.r_mark_sU():
raise lab11()
except lab12: pass
# ], line 346
self.bra = self.cursor
# delete, line 346
if not self.slice_del():
return False
# try, line 346
v_9 = self.limit - self.cursor
try:
# (, line 346
# [, line 346
self.ket = self.cursor
# call mark_lAr, line 346
if not self.r_mark_lAr():
self.cursor = self.limit - v_9
raise lab14()
# ], line 346
self.bra = self.cursor
# delete, line 346
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 346
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_9
raise lab14()
except lab14: pass
raise lab9()
except lab11: pass
self.cursor = self.limit - v_7
# (, line 348
# call stem_suffix_chain_before_ki, line 348
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_6
raise lab8()
except lab9: pass
except lab8: pass
raise lab0()
except lab7: pass
self.cursor = self.limit - v_1
# (, line 351
# call mark_ndA, line 351
if not self.r_mark_ndA():
return False
# (, line 351
# or, line 353
try:
v_10 = self.limit - self.cursor
try:
# (, line 352
# call mark_lArI, line 352
if not self.r_mark_lArI():
raise lab16()
# ], line 352
self.bra = self.cursor
# delete, line 352
if not self.slice_del():
return False
raise lab15()
except lab16: pass
self.cursor = self.limit - v_10
try:
# (, line 354
# (, line 354
# call mark_sU, line 354
if not self.r_mark_sU():
raise lab17()
# ], line 354
self.bra = self.cursor
# delete, line 354
if not self.slice_del():
return False
# try, line 354
v_11 = self.limit - self.cursor
try:
# (, line 354
# [, line 354
self.ket = self.cursor
# call mark_lAr, line 354
if not self.r_mark_lAr():
self.cursor = self.limit - v_11
raise lab18()
# ], line 354
self.bra = self.cursor
# delete, line 354
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 354
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_11
raise lab18()
except lab18: pass
raise lab15()
except lab17: pass
self.cursor = self.limit - v_10
# (, line 356
# call stem_suffix_chain_before_ki, line 356
if not self.r_stem_suffix_chain_before_ki():
return False
except lab15: pass
except lab0: pass
return True
def r_stem_noun_suffixes(self):
# (, line 361
# or, line 363
try:
v_1 = self.limit - self.cursor
try:
# (, line 362
# [, line 362
self.ket = self.cursor
# call mark_lAr, line 362
if not self.r_mark_lAr():
raise lab1()
# ], line 362
self.bra = self.cursor
# delete, line 362
if not self.slice_del():
return False
# try, line 362
v_2 = self.limit - self.cursor
try:
# (, line 362
# call stem_suffix_chain_before_ki, line 362
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_2
raise lab2()
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 364
# [, line 364
self.ket = self.cursor
# call mark_ncA, line 364
if not self.r_mark_ncA():
raise lab3()
# ], line 364
self.bra = self.cursor
# delete, line 364
if not self.slice_del():
return False
# try, line 365
v_3 = self.limit - self.cursor
try:
# (, line 365
# or, line 367
try:
v_4 = self.limit - self.cursor
try:
# (, line 366
# [, line 366
self.ket = self.cursor
# call mark_lArI, line 366
if not self.r_mark_lArI():
raise lab6()
# ], line 366
self.bra = self.cursor
# delete, line 366
if not self.slice_del():
return False
raise lab5()
except lab6: pass
self.cursor = self.limit - v_4
try:
# (, line 368
# [, line 368
self.ket = self.cursor
# or, line 368
try:
v_5 = self.limit - self.cursor
try:
# call mark_possessives, line 368
if not self.r_mark_possessives():
raise lab9()
raise lab8()
except lab9: pass
self.cursor = self.limit - v_5
# call mark_sU, line 368
if not self.r_mark_sU():
raise lab7()
except lab8: pass
# ], line 368
self.bra = self.cursor
# delete, line 368
if not self.slice_del():
return False
# try, line 368
v_6 = self.limit - self.cursor
try:
# (, line 368
# [, line 368
self.ket = self.cursor
# call mark_lAr, line 368
if not self.r_mark_lAr():
self.cursor = self.limit - v_6
raise lab10()
# ], line 368
self.bra = self.cursor
# delete, line 368
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 368
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_6
raise lab10()
except lab10: pass
raise lab5()
except lab7: pass
self.cursor = self.limit - v_4
# (, line 370
# [, line 370
self.ket = self.cursor
# call mark_lAr, line 370
if not self.r_mark_lAr():
self.cursor = self.limit - v_3
raise lab4()
# ], line 370
self.bra = self.cursor
# delete, line 370
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 370
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_3
raise lab4()
except lab5: pass
except lab4: pass
raise lab0()
except lab3: pass
self.cursor = self.limit - v_1
try:
# (, line 374
# [, line 374
self.ket = self.cursor
# (, line 374
# or, line 374
try:
v_7 = self.limit - self.cursor
try:
# call mark_ndA, line 374
if not self.r_mark_ndA():
raise lab13()
raise lab12()
except lab13: pass
self.cursor = self.limit - v_7
# call mark_nA, line 374
if not self.r_mark_nA():
raise lab11()
except lab12: pass
# (, line 375
# or, line 377
try:
v_8 = self.limit - self.cursor
try:
# (, line 376
# call mark_lArI, line 376
if not self.r_mark_lArI():
raise lab15()
# ], line 376
self.bra = self.cursor
# delete, line 376
if not self.slice_del():
return False
raise lab14()
except lab15: pass
self.cursor = self.limit - v_8
try:
# (, line 378
# call mark_sU, line 378
if not self.r_mark_sU():
raise lab16()
# ], line 378
self.bra = self.cursor
# delete, line 378
if not self.slice_del():
return False
# try, line 378
v_9 = self.limit - self.cursor
try:
# (, line 378
# [, line 378
self.ket = self.cursor
# call mark_lAr, line 378
if not self.r_mark_lAr():
self.cursor = self.limit - v_9
raise lab17()
# ], line 378
self.bra = self.cursor
# delete, line 378
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 378
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_9
raise lab17()
except lab17: pass
raise lab14()
except lab16: pass
self.cursor = self.limit - v_8
# (, line 380
# call stem_suffix_chain_before_ki, line 380
if not self.r_stem_suffix_chain_before_ki():
raise lab11()
except lab14: pass
raise lab0()
except lab11: pass
self.cursor = self.limit - v_1
try:
# (, line 384
# [, line 384
self.ket = self.cursor
# (, line 384
# or, line 384
try:
v_10 = self.limit - self.cursor
try:
# call mark_ndAn, line 384
if not self.r_mark_ndAn():
raise lab20()
raise lab19()
except lab20: pass
self.cursor = self.limit - v_10
# call mark_nU, line 384
if not self.r_mark_nU():
raise lab18()
except lab19: pass
# (, line 384
# or, line 384
try:
v_11 = self.limit - self.cursor
try:
# (, line 384
# call mark_sU, line 384
if not self.r_mark_sU():
raise lab22()
# ], line 384
self.bra = self.cursor
# delete, line 384
if not self.slice_del():
return False
# try, line 384
v_12 = self.limit - self.cursor
try:
# (, line 384
# [, line 384
self.ket = self.cursor
# call mark_lAr, line 384
if not self.r_mark_lAr():
self.cursor = self.limit - v_12
raise lab23()
# ], line 384
self.bra = self.cursor
# delete, line 384
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 384
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_12
raise lab23()
except lab23: pass
raise lab21()
except lab22: pass
self.cursor = self.limit - v_11
# (, line 384
# call mark_lArI, line 384
if not self.r_mark_lArI():
raise lab18()
except lab21: pass
raise lab0()
except lab18: pass
self.cursor = self.limit - v_1
try:
# (, line 386
# [, line 386
self.ket = self.cursor
# call mark_DAn, line 386
if not self.r_mark_DAn():
raise lab24()
# ], line 386
self.bra = self.cursor
# delete, line 386
if not self.slice_del():
return False
# try, line 386
v_13 = self.limit - self.cursor
try:
# (, line 386
# [, line 386
self.ket = self.cursor
# (, line 387
# or, line 389
try:
v_14 = self.limit - self.cursor
try:
# (, line 388
# call mark_possessives, line 388
if not self.r_mark_possessives():
raise lab27()
# ], line 388
self.bra = self.cursor
# delete, line 388
if not self.slice_del():
return False
# try, line 388
v_15 = self.limit - self.cursor
try:
# (, line 388
# [, line 388
self.ket = self.cursor
# call mark_lAr, line 388
if not self.r_mark_lAr():
self.cursor = self.limit - v_15
raise lab28()
# ], line 388
self.bra = self.cursor
# delete, line 388
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 388
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_15
raise lab28()
except lab28: pass
raise lab26()
except lab27: pass
self.cursor = self.limit - v_14
try:
# (, line 390
# call mark_lAr, line 390
if not self.r_mark_lAr():
raise lab29()
# ], line 390
self.bra = self.cursor
# delete, line 390
if not self.slice_del():
return False
# try, line 390
v_16 = self.limit - self.cursor
try:
# (, line 390
# call stem_suffix_chain_before_ki, line 390
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_16
raise lab30()
except lab30: pass
raise lab26()
except lab29: pass
self.cursor = self.limit - v_14
# (, line 392
# call stem_suffix_chain_before_ki, line 392
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_13
raise lab25()
except lab26: pass
except lab25: pass
raise lab0()
except lab24: pass
self.cursor = self.limit - v_1
try:
# (, line 396
# [, line 396
self.ket = self.cursor
# or, line 396
try:
v_17 = self.limit - self.cursor
try:
# call mark_nUn, line 396
if not self.r_mark_nUn():
raise lab33()
raise lab32()
except lab33: pass
self.cursor = self.limit - v_17
# call mark_ylA, line 396
if not self.r_mark_ylA():
raise lab31()
except lab32: pass
# ], line 396
self.bra = self.cursor
# delete, line 396
if not self.slice_del():
return False
# try, line 397
v_18 = self.limit - self.cursor
try:
# (, line 397
# or, line 399
try:
v_19 = self.limit - self.cursor
try:
# (, line 398
# [, line 398
self.ket = self.cursor
# call mark_lAr, line 398
if not self.r_mark_lAr():
raise lab36()
# ], line 398
self.bra = self.cursor
# delete, line 398
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 398
if not self.r_stem_suffix_chain_before_ki():
raise lab36()
raise lab35()
except lab36: pass
self.cursor = self.limit - v_19
try:
# (, line 400
# [, line 400
self.ket = self.cursor
# or, line 400
try:
v_20 = self.limit - self.cursor
try:
# call mark_possessives, line 400
if not self.r_mark_possessives():
raise lab39()
raise lab38()
except lab39: pass
self.cursor = self.limit - v_20
# call mark_sU, line 400
if not self.r_mark_sU():
raise lab37()
except lab38: pass
# ], line 400
self.bra = self.cursor
# delete, line 400
if not self.slice_del():
return False
# try, line 400
v_21 = self.limit - self.cursor
try:
# (, line 400
# [, line 400
self.ket = self.cursor
# call mark_lAr, line 400
if not self.r_mark_lAr():
self.cursor = self.limit - v_21
raise lab40()
# ], line 400
self.bra = self.cursor
# delete, line 400
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 400
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_21
raise lab40()
except lab40: pass
raise lab35()
except lab37: pass
self.cursor = self.limit - v_19
# call stem_suffix_chain_before_ki, line 402
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_18
raise lab34()
except lab35: pass
except lab34: pass
raise lab0()
except lab31: pass
self.cursor = self.limit - v_1
try:
# (, line 406
# [, line 406
self.ket = self.cursor
# call mark_lArI, line 406
if not self.r_mark_lArI():
raise lab41()
# ], line 406
self.bra = self.cursor
# delete, line 406
if not self.slice_del():
return False
raise lab0()
except lab41: pass
self.cursor = self.limit - v_1
try:
# (, line 408
# call stem_suffix_chain_before_ki, line 408
if not self.r_stem_suffix_chain_before_ki():
raise lab42()
raise lab0()
except lab42: pass
self.cursor = self.limit - v_1
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# or, line 410
try:
v_22 = self.limit - self.cursor
try:
# call mark_DA, line 410
if not self.r_mark_DA():
raise lab45()
raise lab44()
except lab45: pass
self.cursor = self.limit - v_22
try:
# call mark_yU, line 410
if not self.r_mark_yU():
raise lab46()
raise lab44()
except lab46: pass
self.cursor = self.limit - v_22
# call mark_yA, line 410
if not self.r_mark_yA():
raise lab43()
except lab44: pass
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# try, line 410
v_23 = self.limit - self.cursor
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# (, line 410
# or, line 410
try:
v_24 = self.limit - self.cursor
try:
# (, line 410
# call mark_possessives, line 410
if not self.r_mark_possessives():
raise lab49()
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# try, line 410
v_25 = self.limit - self.cursor
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# call mark_lAr, line 410
if not self.r_mark_lAr():
self.cursor = self.limit - v_25
raise lab50()
except lab50: pass
raise lab48()
except lab49: pass
self.cursor = self.limit - v_24
# call mark_lAr, line 410
if not self.r_mark_lAr():
self.cursor = self.limit - v_23
raise lab47()
except lab48: pass
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# [, line 410
self.ket = self.cursor
# call stem_suffix_chain_before_ki, line 410
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_23
raise lab47()
except lab47: pass
raise lab0()
except lab43: pass
self.cursor = self.limit - v_1
# (, line 412
# [, line 412
self.ket = self.cursor
# or, line 412
try:
v_26 = self.limit - self.cursor
try:
# call mark_possessives, line 412
if not self.r_mark_possessives():
raise lab52()
raise lab51()
except lab52: pass
self.cursor = self.limit - v_26
# call mark_sU, line 412
if not self.r_mark_sU():
return False
except lab51: pass
# ], line 412
self.bra = self.cursor
# delete, line 412
if not self.slice_del():
return False
# try, line 412
v_27 = self.limit - self.cursor
try:
# (, line 412
# [, line 412
self.ket = self.cursor
# call mark_lAr, line 412
if not self.r_mark_lAr():
self.cursor = self.limit - v_27
raise lab53()
# ], line 412
self.bra = self.cursor
# delete, line 412
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 412
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_27
raise lab53()
except lab53: pass
except lab0: pass
return True
def r_post_process_last_consonants(self):
# (, line 415
# [, line 416
self.ket = self.cursor
# substring, line 416
among_var = self.find_among_b(TurkishStemmer.a_23, 4)
if among_var == 0:
return False
# ], line 416
self.bra = self.cursor
if among_var == 0:
return False
elif among_var == 1:
# (, line 417
# <-, line 417
if not self.slice_from(u"p"):
return False
elif among_var == 2:
# (, line 418
# <-, line 418
if not self.slice_from(u"\u00E7"):
return False
elif among_var == 3:
# (, line 419
# <-, line 419
if not self.slice_from(u"t"):
return False
elif among_var == 4:
# (, line 420
# <-, line 420
if not self.slice_from(u"k"):
return False
return True
def r_append_U_to_stems_ending_with_d_or_g(self):
# (, line 430
# test, line 431
v_1 = self.limit - self.cursor
# (, line 431
# or, line 431
try:
v_2 = self.limit - self.cursor
try:
# literal, line 431
if not self.eq_s_b(1, u"d"):
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_2
# literal, line 431
if not self.eq_s_b(1, u"g"):
return False
except lab0: pass
self.cursor = self.limit - v_1
# or, line 433
try:
v_3 = self.limit - self.cursor
try:
# (, line 432
# test, line 432
v_4 = self.limit - self.cursor
# (, line 432
# (, line 432
# goto, line 432
try:
while True:
v_5 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab5()
self.cursor = self.limit - v_5
raise lab4()
except lab5: pass
self.cursor = self.limit - v_5
if self.cursor <= self.limit_backward:
raise lab3()
self.cursor -= 1
except lab4: pass
# or, line 432
try:
v_6 = self.limit - self.cursor
try:
# literal, line 432
if not self.eq_s_b(1, u"a"):
raise lab7()
raise lab6()
except lab7: pass
self.cursor = self.limit - v_6
# literal, line 432
if not self.eq_s_b(1, u"\u0131"):
raise lab3()
except lab6: pass
self.cursor = self.limit - v_4
# <+, line 432
c = self.cursor
self.insert(self.cursor, self.cursor, u"\u0131")
self.cursor = c
raise lab2()
except lab3: pass
self.cursor = self.limit - v_3
try:
# (, line 434
# test, line 434
v_7 = self.limit - self.cursor
# (, line 434
# (, line 434
# goto, line 434
try:
while True:
v_8 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab10()
self.cursor = self.limit - v_8
raise lab9()
except lab10: pass
self.cursor = self.limit - v_8
if self.cursor <= self.limit_backward:
raise lab8()
self.cursor -= 1
except lab9: pass
# or, line 434
try:
v_9 = self.limit - self.cursor
try:
# literal, line 434
if not self.eq_s_b(1, u"e"):
raise lab12()
raise lab11()
except lab12: pass
self.cursor = self.limit - v_9
# literal, line 434
if not self.eq_s_b(1, u"i"):
raise lab8()
except lab11: pass
self.cursor = self.limit - v_7
# <+, line 434
c = self.cursor
self.insert(self.cursor, self.cursor, u"i")
self.cursor = c
raise lab2()
except lab8: pass
self.cursor = self.limit - v_3
try:
# (, line 436
# test, line 436
v_10 = self.limit - self.cursor
# (, line 436
# (, line 436
# goto, line 436
try:
while True:
v_11 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab15()
self.cursor = self.limit - v_11
raise lab14()
except lab15: pass
self.cursor = self.limit - v_11
if self.cursor <= self.limit_backward:
raise lab13()
self.cursor -= 1
except lab14: pass
# or, line 436
try:
v_12 = self.limit - self.cursor
try:
# literal, line 436
if not self.eq_s_b(1, u"o"):
raise lab17()
raise lab16()
except lab17: pass
self.cursor = self.limit - v_12
# literal, line 436
if not self.eq_s_b(1, u"u"):
raise lab13()
except lab16: pass
self.cursor = self.limit - v_10
# <+, line 436
c = self.cursor
self.insert(self.cursor, self.cursor, u"u")
self.cursor = c
raise lab2()
except lab13: pass
self.cursor = self.limit - v_3
# (, line 438
# test, line 438
v_13 = self.limit - self.cursor
# (, line 438
# (, line 438
# goto, line 438
try:
while True:
v_14 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab19()
self.cursor = self.limit - v_14
raise lab18()
except lab19: pass
self.cursor = self.limit - v_14
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab18: pass
# or, line 438
try:
v_15 = self.limit - self.cursor
try:
# literal, line 438
if not self.eq_s_b(1, u"\u00F6"):
raise lab21()
raise lab20()
except lab21: pass
self.cursor = self.limit - v_15
# literal, line 438
if not self.eq_s_b(1, u"\u00FC"):
return False
except lab20: pass
self.cursor = self.limit - v_13
# <+, line 438
c = self.cursor
self.insert(self.cursor, self.cursor, u"\u00FC")
self.cursor = c
except lab2: pass
return True
def r_more_than_one_syllable_word(self):
# (, line 445
# test, line 446
v_1 = self.cursor
# (, line 446
# atleast, line 446
v_2 = 2
# atleast, line 446
try:
while True:
try:
v_3 = self.cursor
try:
# (, line 446
# gopast, line 446
try:
while True:
try:
if not self.in_grouping(TurkishStemmer.g_vowel, 97, 305):
raise lab4()
raise lab3()
except lab4: pass
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
except lab3: pass
v_2 -= 1
raise lab1()
except lab2: pass
self.cursor = v_3
raise lab0()
except lab1: pass
except lab0: pass
if v_2 > 0:
return False
self.cursor = v_1
return True
def r_is_reserved_word(self):
# (, line 449
# or, line 451
try:
v_1 = self.cursor
try:
# test, line 450
v_2 = self.cursor
# (, line 450
# gopast, line 450
try:
while True:
try:
# literal, line 450
if not self.eq_s(2, u"ad"):
raise lab3()
raise lab2()
except lab3: pass
if self.cursor >= self.limit:
raise lab1()
self.cursor += 1
except lab2: pass
# (, line 450
self.I_strlen = 2;
# (, line 450
if not self.I_strlen == self.limit:
raise lab1()
self.cursor = v_2
raise lab0()
except lab1: pass
self.cursor = v_1
# test, line 452
v_4 = self.cursor
# (, line 452
# gopast, line 452
try:
while True:
try:
# literal, line 452
if not self.eq_s(5, u"soyad"):
raise lab5()
raise lab4()
except lab5: pass
if self.cursor >= self.limit:
return False
self.cursor += 1
except lab4: pass
# (, line 452
self.I_strlen = 5;
# (, line 452
if not self.I_strlen == self.limit:
return False
self.cursor = v_4
except lab0: pass
return True
def r_postlude(self):
# (, line 455
# not, line 456
v_1 = self.cursor
try:
# (, line 456
# call is_reserved_word, line 456
if not self.r_is_reserved_word():
raise lab0()
return False
except lab0: pass
self.cursor = v_1
# backwards, line 457
self.limit_backward = self.cursor
self.cursor = self.limit
# (, line 457
# do, line 458
v_2 = self.limit - self.cursor
try:
# call append_U_to_stems_ending_with_d_or_g, line 458
if not self.r_append_U_to_stems_ending_with_d_or_g():
raise lab1()
except lab1: pass
self.cursor = self.limit - v_2
# do, line 459
v_3 = self.limit - self.cursor
try:
# call post_process_last_consonants, line 459
if not self.r_post_process_last_consonants():
raise lab2()
except lab2: pass
self.cursor = self.limit - v_3
self.cursor = self.limit_backward
return True
def _stem(self):
# (, line 464
# (, line 465
# call more_than_one_syllable_word, line 465
if not self.r_more_than_one_syllable_word():
return False
# (, line 466
# backwards, line 467
self.limit_backward = self.cursor
self.cursor = self.limit
# (, line 467
# do, line 468
v_1 = self.limit - self.cursor
try:
# call stem_nominal_verb_suffixes, line 468
if not self.r_stem_nominal_verb_suffixes():
raise lab0()
except lab0: pass
self.cursor = self.limit - v_1
# Boolean test continue_stemming_noun_suffixes, line 469
if not self.B_continue_stemming_noun_suffixes:
return False
# do, line 470
v_2 = self.limit - self.cursor
try:
# call stem_noun_suffixes, line 470
if not self.r_stem_noun_suffixes():
raise lab1()
except lab1: pass
self.cursor = self.limit - v_2
self.cursor = self.limit_backward
# call postlude, line 473
if not self.r_postlude():
return False
return True
def equals(self, o):
return isinstance(o, TurkishStemmer)
def hashCode(self):
return hash("TurkishStemmer")
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
class lab16(BaseException): pass
class lab17(BaseException): pass
class lab18(BaseException): pass
class lab19(BaseException): pass
class lab20(BaseException): pass
class lab21(BaseException): pass
class lab22(BaseException): pass
class lab23(BaseException): pass
class lab24(BaseException): pass
class lab25(BaseException): pass
class lab26(BaseException): pass
class lab27(BaseException): pass
class lab28(BaseException): pass
class lab29(BaseException): pass
class lab30(BaseException): pass
class lab31(BaseException): pass
class lab32(BaseException): pass
class lab33(BaseException): pass
class lab34(BaseException): pass
class lab35(BaseException): pass
class lab36(BaseException): pass
class lab37(BaseException): pass
class lab38(BaseException): pass
class lab39(BaseException): pass
class lab40(BaseException): pass
class lab41(BaseException): pass
class lab42(BaseException): pass
class lab43(BaseException): pass
class lab44(BaseException): pass
class lab45(BaseException): pass
class lab46(BaseException): pass
class lab47(BaseException): pass
class lab48(BaseException): pass
class lab49(BaseException): pass
class lab50(BaseException): pass
class lab51(BaseException): pass
class lab52(BaseException): pass
class lab53(BaseException): pass