mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-26 23:00:36 +00:00
1062 lines
29 KiB
Python
1062 lines
29 KiB
Python
|
# self file was generated automatically by the Snowball to Python interpreter
|
||
|
|
||
|
from .basestemmer import BaseStemmer
|
||
|
from .among import Among
|
||
|
|
||
|
|
||
|
class HungarianStemmer(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"cs", -1, -1),
|
||
|
Among(u"dzs", -1, -1),
|
||
|
Among(u"gy", -1, -1),
|
||
|
Among(u"ly", -1, -1),
|
||
|
Among(u"ny", -1, -1),
|
||
|
Among(u"sz", -1, -1),
|
||
|
Among(u"ty", -1, -1),
|
||
|
Among(u"zs", -1, -1)
|
||
|
]
|
||
|
|
||
|
a_1 = [
|
||
|
Among(u"\u00E1", -1, 1),
|
||
|
Among(u"\u00E9", -1, 2)
|
||
|
]
|
||
|
|
||
|
a_2 = [
|
||
|
Among(u"bb", -1, -1),
|
||
|
Among(u"cc", -1, -1),
|
||
|
Among(u"dd", -1, -1),
|
||
|
Among(u"ff", -1, -1),
|
||
|
Among(u"gg", -1, -1),
|
||
|
Among(u"jj", -1, -1),
|
||
|
Among(u"kk", -1, -1),
|
||
|
Among(u"ll", -1, -1),
|
||
|
Among(u"mm", -1, -1),
|
||
|
Among(u"nn", -1, -1),
|
||
|
Among(u"pp", -1, -1),
|
||
|
Among(u"rr", -1, -1),
|
||
|
Among(u"ccs", -1, -1),
|
||
|
Among(u"ss", -1, -1),
|
||
|
Among(u"zzs", -1, -1),
|
||
|
Among(u"tt", -1, -1),
|
||
|
Among(u"vv", -1, -1),
|
||
|
Among(u"ggy", -1, -1),
|
||
|
Among(u"lly", -1, -1),
|
||
|
Among(u"nny", -1, -1),
|
||
|
Among(u"tty", -1, -1),
|
||
|
Among(u"ssz", -1, -1),
|
||
|
Among(u"zz", -1, -1)
|
||
|
]
|
||
|
|
||
|
a_3 = [
|
||
|
Among(u"al", -1, 1),
|
||
|
Among(u"el", -1, 2)
|
||
|
]
|
||
|
|
||
|
a_4 = [
|
||
|
Among(u"ba", -1, -1),
|
||
|
Among(u"ra", -1, -1),
|
||
|
Among(u"be", -1, -1),
|
||
|
Among(u"re", -1, -1),
|
||
|
Among(u"ig", -1, -1),
|
||
|
Among(u"nak", -1, -1),
|
||
|
Among(u"nek", -1, -1),
|
||
|
Among(u"val", -1, -1),
|
||
|
Among(u"vel", -1, -1),
|
||
|
Among(u"ul", -1, -1),
|
||
|
Among(u"n\u00E1l", -1, -1),
|
||
|
Among(u"n\u00E9l", -1, -1),
|
||
|
Among(u"b\u00F3l", -1, -1),
|
||
|
Among(u"r\u00F3l", -1, -1),
|
||
|
Among(u"t\u00F3l", -1, -1),
|
||
|
Among(u"b\u00F5l", -1, -1),
|
||
|
Among(u"r\u00F5l", -1, -1),
|
||
|
Among(u"t\u00F5l", -1, -1),
|
||
|
Among(u"\u00FCl", -1, -1),
|
||
|
Among(u"n", -1, -1),
|
||
|
Among(u"an", 19, -1),
|
||
|
Among(u"ban", 20, -1),
|
||
|
Among(u"en", 19, -1),
|
||
|
Among(u"ben", 22, -1),
|
||
|
Among(u"k\u00E9ppen", 22, -1),
|
||
|
Among(u"on", 19, -1),
|
||
|
Among(u"\u00F6n", 19, -1),
|
||
|
Among(u"k\u00E9pp", -1, -1),
|
||
|
Among(u"kor", -1, -1),
|
||
|
Among(u"t", -1, -1),
|
||
|
Among(u"at", 29, -1),
|
||
|
Among(u"et", 29, -1),
|
||
|
Among(u"k\u00E9nt", 29, -1),
|
||
|
Among(u"ank\u00E9nt", 32, -1),
|
||
|
Among(u"enk\u00E9nt", 32, -1),
|
||
|
Among(u"onk\u00E9nt", 32, -1),
|
||
|
Among(u"ot", 29, -1),
|
||
|
Among(u"\u00E9rt", 29, -1),
|
||
|
Among(u"\u00F6t", 29, -1),
|
||
|
Among(u"hez", -1, -1),
|
||
|
Among(u"hoz", -1, -1),
|
||
|
Among(u"h\u00F6z", -1, -1),
|
||
|
Among(u"v\u00E1", -1, -1),
|
||
|
Among(u"v\u00E9", -1, -1)
|
||
|
]
|
||
|
|
||
|
a_5 = [
|
||
|
Among(u"\u00E1n", -1, 2),
|
||
|
Among(u"\u00E9n", -1, 1),
|
||
|
Among(u"\u00E1nk\u00E9nt", -1, 3)
|
||
|
]
|
||
|
|
||
|
a_6 = [
|
||
|
Among(u"stul", -1, 2),
|
||
|
Among(u"astul", 0, 1),
|
||
|
Among(u"\u00E1stul", 0, 3),
|
||
|
Among(u"st\u00FCl", -1, 2),
|
||
|
Among(u"est\u00FCl", 3, 1),
|
||
|
Among(u"\u00E9st\u00FCl", 3, 4)
|
||
|
]
|
||
|
|
||
|
a_7 = [
|
||
|
Among(u"\u00E1", -1, 1),
|
||
|
Among(u"\u00E9", -1, 2)
|
||
|
]
|
||
|
|
||
|
a_8 = [
|
||
|
Among(u"k", -1, 7),
|
||
|
Among(u"ak", 0, 4),
|
||
|
Among(u"ek", 0, 6),
|
||
|
Among(u"ok", 0, 5),
|
||
|
Among(u"\u00E1k", 0, 1),
|
||
|
Among(u"\u00E9k", 0, 2),
|
||
|
Among(u"\u00F6k", 0, 3)
|
||
|
]
|
||
|
|
||
|
a_9 = [
|
||
|
Among(u"\u00E9i", -1, 7),
|
||
|
Among(u"\u00E1\u00E9i", 0, 6),
|
||
|
Among(u"\u00E9\u00E9i", 0, 5),
|
||
|
Among(u"\u00E9", -1, 9),
|
||
|
Among(u"k\u00E9", 3, 4),
|
||
|
Among(u"ak\u00E9", 4, 1),
|
||
|
Among(u"ek\u00E9", 4, 1),
|
||
|
Among(u"ok\u00E9", 4, 1),
|
||
|
Among(u"\u00E1k\u00E9", 4, 3),
|
||
|
Among(u"\u00E9k\u00E9", 4, 2),
|
||
|
Among(u"\u00F6k\u00E9", 4, 1),
|
||
|
Among(u"\u00E9\u00E9", 3, 8)
|
||
|
]
|
||
|
|
||
|
a_10 = [
|
||
|
Among(u"a", -1, 18),
|
||
|
Among(u"ja", 0, 17),
|
||
|
Among(u"d", -1, 16),
|
||
|
Among(u"ad", 2, 13),
|
||
|
Among(u"ed", 2, 13),
|
||
|
Among(u"od", 2, 13),
|
||
|
Among(u"\u00E1d", 2, 14),
|
||
|
Among(u"\u00E9d", 2, 15),
|
||
|
Among(u"\u00F6d", 2, 13),
|
||
|
Among(u"e", -1, 18),
|
||
|
Among(u"je", 9, 17),
|
||
|
Among(u"nk", -1, 4),
|
||
|
Among(u"unk", 11, 1),
|
||
|
Among(u"\u00E1nk", 11, 2),
|
||
|
Among(u"\u00E9nk", 11, 3),
|
||
|
Among(u"\u00FCnk", 11, 1),
|
||
|
Among(u"uk", -1, 8),
|
||
|
Among(u"juk", 16, 7),
|
||
|
Among(u"\u00E1juk", 17, 5),
|
||
|
Among(u"\u00FCk", -1, 8),
|
||
|
Among(u"j\u00FCk", 19, 7),
|
||
|
Among(u"\u00E9j\u00FCk", 20, 6),
|
||
|
Among(u"m", -1, 12),
|
||
|
Among(u"am", 22, 9),
|
||
|
Among(u"em", 22, 9),
|
||
|
Among(u"om", 22, 9),
|
||
|
Among(u"\u00E1m", 22, 10),
|
||
|
Among(u"\u00E9m", 22, 11),
|
||
|
Among(u"o", -1, 18),
|
||
|
Among(u"\u00E1", -1, 19),
|
||
|
Among(u"\u00E9", -1, 20)
|
||
|
]
|
||
|
|
||
|
a_11 = [
|
||
|
Among(u"id", -1, 10),
|
||
|
Among(u"aid", 0, 9),
|
||
|
Among(u"jaid", 1, 6),
|
||
|
Among(u"eid", 0, 9),
|
||
|
Among(u"jeid", 3, 6),
|
||
|
Among(u"\u00E1id", 0, 7),
|
||
|
Among(u"\u00E9id", 0, 8),
|
||
|
Among(u"i", -1, 15),
|
||
|
Among(u"ai", 7, 14),
|
||
|
Among(u"jai", 8, 11),
|
||
|
Among(u"ei", 7, 14),
|
||
|
Among(u"jei", 10, 11),
|
||
|
Among(u"\u00E1i", 7, 12),
|
||
|
Among(u"\u00E9i", 7, 13),
|
||
|
Among(u"itek", -1, 24),
|
||
|
Among(u"eitek", 14, 21),
|
||
|
Among(u"jeitek", 15, 20),
|
||
|
Among(u"\u00E9itek", 14, 23),
|
||
|
Among(u"ik", -1, 29),
|
||
|
Among(u"aik", 18, 26),
|
||
|
Among(u"jaik", 19, 25),
|
||
|
Among(u"eik", 18, 26),
|
||
|
Among(u"jeik", 21, 25),
|
||
|
Among(u"\u00E1ik", 18, 27),
|
||
|
Among(u"\u00E9ik", 18, 28),
|
||
|
Among(u"ink", -1, 20),
|
||
|
Among(u"aink", 25, 17),
|
||
|
Among(u"jaink", 26, 16),
|
||
|
Among(u"eink", 25, 17),
|
||
|
Among(u"jeink", 28, 16),
|
||
|
Among(u"\u00E1ink", 25, 18),
|
||
|
Among(u"\u00E9ink", 25, 19),
|
||
|
Among(u"aitok", -1, 21),
|
||
|
Among(u"jaitok", 32, 20),
|
||
|
Among(u"\u00E1itok", -1, 22),
|
||
|
Among(u"im", -1, 5),
|
||
|
Among(u"aim", 35, 4),
|
||
|
Among(u"jaim", 36, 1),
|
||
|
Among(u"eim", 35, 4),
|
||
|
Among(u"jeim", 38, 1),
|
||
|
Among(u"\u00E1im", 35, 2),
|
||
|
Among(u"\u00E9im", 35, 3)
|
||
|
]
|
||
|
|
||
|
g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 52, 14]
|
||
|
|
||
|
I_p1 = 0
|
||
|
|
||
|
def copy_from(self, other):
|
||
|
self.I_p1 = other.I_p1
|
||
|
super.copy_from(other)
|
||
|
|
||
|
|
||
|
def r_mark_regions(self):
|
||
|
# (, line 44
|
||
|
self.I_p1 = self.limit;
|
||
|
# or, line 51
|
||
|
try:
|
||
|
v_1 = self.cursor
|
||
|
try:
|
||
|
# (, line 48
|
||
|
if not self.in_grouping(HungarianStemmer.g_v, 97, 252):
|
||
|
raise lab1()
|
||
|
# goto, line 48
|
||
|
try:
|
||
|
while True:
|
||
|
v_2 = self.cursor
|
||
|
try:
|
||
|
if not self.out_grouping(HungarianStemmer.g_v, 97, 252):
|
||
|
raise lab3()
|
||
|
self.cursor = v_2
|
||
|
raise lab2()
|
||
|
except lab3: pass
|
||
|
self.cursor = v_2
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab1()
|
||
|
self.cursor += 1
|
||
|
except lab2: pass
|
||
|
# or, line 49
|
||
|
try:
|
||
|
v_3 = self.cursor
|
||
|
try:
|
||
|
# among, line 49
|
||
|
if self.find_among(HungarianStemmer.a_0, 8) == 0:
|
||
|
raise lab5()
|
||
|
raise lab4()
|
||
|
except lab5: pass
|
||
|
self.cursor = v_3
|
||
|
# next, line 49
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab1()
|
||
|
self.cursor += 1
|
||
|
except lab4: pass
|
||
|
# setmark p1, line 50
|
||
|
self.I_p1 = self.cursor
|
||
|
raise lab0()
|
||
|
except lab1: pass
|
||
|
self.cursor = v_1
|
||
|
# (, line 53
|
||
|
if not self.out_grouping(HungarianStemmer.g_v, 97, 252):
|
||
|
return False
|
||
|
# gopast, line 53
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.in_grouping(HungarianStemmer.g_v, 97, 252):
|
||
|
raise lab7()
|
||
|
raise lab6()
|
||
|
except lab7: pass
|
||
|
if self.cursor >= self.limit:
|
||
|
return False
|
||
|
self.cursor += 1
|
||
|
except lab6: pass
|
||
|
# setmark p1, line 53
|
||
|
self.I_p1 = self.cursor
|
||
|
except lab0: pass
|
||
|
return True
|
||
|
|
||
|
def r_R1(self):
|
||
|
if not self.I_p1 <= self.cursor:
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_v_ending(self):
|
||
|
# (, line 60
|
||
|
# [, line 61
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 61
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_1, 2)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 61
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 61
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 62
|
||
|
# <-, line 62
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 63
|
||
|
# <-, line 63
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_double(self):
|
||
|
# (, line 67
|
||
|
# test, line 68
|
||
|
v_1 = self.limit - self.cursor
|
||
|
# among, line 68
|
||
|
if self.find_among_b(HungarianStemmer.a_2, 23) == 0:
|
||
|
return False
|
||
|
self.cursor = self.limit - v_1
|
||
|
return True
|
||
|
|
||
|
def r_undouble(self):
|
||
|
# (, line 72
|
||
|
# next, line 73
|
||
|
if self.cursor <= self.limit_backward:
|
||
|
return False
|
||
|
self.cursor -= 1
|
||
|
# [, line 73
|
||
|
self.ket = self.cursor
|
||
|
# hop, line 73
|
||
|
c = self.cursor - 1
|
||
|
if self.limit_backward > c or c > self.limit:
|
||
|
return False
|
||
|
self.cursor = c
|
||
|
# ], line 73
|
||
|
self.bra = self.cursor
|
||
|
# delete, line 73
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_instrum(self):
|
||
|
# (, line 76
|
||
|
# [, line 77
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 77
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_3, 2)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 77
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 77
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 78
|
||
|
# call double, line 78
|
||
|
if not self.r_double():
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 79
|
||
|
# call double, line 79
|
||
|
if not self.r_double():
|
||
|
return False
|
||
|
# delete, line 81
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# call undouble, line 82
|
||
|
if not self.r_undouble():
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_case(self):
|
||
|
# (, line 86
|
||
|
# [, line 87
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 87
|
||
|
if self.find_among_b(HungarianStemmer.a_4, 44) == 0:
|
||
|
return False
|
||
|
# ], line 87
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 87
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
# delete, line 111
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# call v_ending, line 112
|
||
|
if not self.r_v_ending():
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_case_special(self):
|
||
|
# (, line 115
|
||
|
# [, line 116
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 116
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_5, 3)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 116
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 116
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 117
|
||
|
# <-, line 117
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 118
|
||
|
# <-, line 118
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 119
|
||
|
# <-, line 119
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_case_other(self):
|
||
|
# (, line 123
|
||
|
# [, line 124
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 124
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_6, 6)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 124
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 124
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 125
|
||
|
# delete, line 125
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 126
|
||
|
# delete, line 126
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 3:
|
||
|
# (, line 127
|
||
|
# <-, line 127
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 128
|
||
|
# <-, line 128
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_factive(self):
|
||
|
# (, line 132
|
||
|
# [, line 133
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 133
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_7, 2)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 133
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 133
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 134
|
||
|
# call double, line 134
|
||
|
if not self.r_double():
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 135
|
||
|
# call double, line 135
|
||
|
if not self.r_double():
|
||
|
return False
|
||
|
# delete, line 137
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# call undouble, line 138
|
||
|
if not self.r_undouble():
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_plural(self):
|
||
|
# (, line 141
|
||
|
# [, line 142
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 142
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_8, 7)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 142
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 142
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 143
|
||
|
# <-, line 143
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 144
|
||
|
# <-, line 144
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 145
|
||
|
# delete, line 145
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 4:
|
||
|
# (, line 146
|
||
|
# delete, line 146
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 5:
|
||
|
# (, line 147
|
||
|
# delete, line 147
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 6:
|
||
|
# (, line 148
|
||
|
# delete, line 148
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 7:
|
||
|
# (, line 149
|
||
|
# delete, line 149
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_owned(self):
|
||
|
# (, line 153
|
||
|
# [, line 154
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 154
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_9, 12)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 154
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 154
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 155
|
||
|
# delete, line 155
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 156
|
||
|
# <-, line 156
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 157
|
||
|
# <-, line 157
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 158
|
||
|
# delete, line 158
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 5:
|
||
|
# (, line 159
|
||
|
# <-, line 159
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 6:
|
||
|
# (, line 160
|
||
|
# <-, line 160
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 7:
|
||
|
# (, line 161
|
||
|
# delete, line 161
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 8:
|
||
|
# (, line 162
|
||
|
# <-, line 162
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 9:
|
||
|
# (, line 163
|
||
|
# delete, line 163
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_sing_owner(self):
|
||
|
# (, line 167
|
||
|
# [, line 168
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 168
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_10, 31)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 168
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 168
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 169
|
||
|
# delete, line 169
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 170
|
||
|
# <-, line 170
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 171
|
||
|
# <-, line 171
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 172
|
||
|
# delete, line 172
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 5:
|
||
|
# (, line 173
|
||
|
# <-, line 173
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 6:
|
||
|
# (, line 174
|
||
|
# <-, line 174
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 7:
|
||
|
# (, line 175
|
||
|
# delete, line 175
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 8:
|
||
|
# (, line 176
|
||
|
# delete, line 176
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 9:
|
||
|
# (, line 177
|
||
|
# delete, line 177
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 10:
|
||
|
# (, line 178
|
||
|
# <-, line 178
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 11:
|
||
|
# (, line 179
|
||
|
# <-, line 179
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 12:
|
||
|
# (, line 180
|
||
|
# delete, line 180
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 13:
|
||
|
# (, line 181
|
||
|
# delete, line 181
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 14:
|
||
|
# (, line 182
|
||
|
# <-, line 182
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 15:
|
||
|
# (, line 183
|
||
|
# <-, line 183
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 16:
|
||
|
# (, line 184
|
||
|
# delete, line 184
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 17:
|
||
|
# (, line 185
|
||
|
# delete, line 185
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 18:
|
||
|
# (, line 186
|
||
|
# delete, line 186
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 19:
|
||
|
# (, line 187
|
||
|
# <-, line 187
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 20:
|
||
|
# (, line 188
|
||
|
# <-, line 188
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
return True
|
||
|
|
||
|
def r_plur_owner(self):
|
||
|
# (, line 192
|
||
|
# [, line 193
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 193
|
||
|
among_var = self.find_among_b(HungarianStemmer.a_11, 42)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 193
|
||
|
self.bra = self.cursor
|
||
|
# call R1, line 193
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 194
|
||
|
# delete, line 194
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 195
|
||
|
# <-, line 195
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 196
|
||
|
# <-, line 196
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 197
|
||
|
# delete, line 197
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 5:
|
||
|
# (, line 198
|
||
|
# delete, line 198
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 6:
|
||
|
# (, line 199
|
||
|
# delete, line 199
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 7:
|
||
|
# (, line 200
|
||
|
# <-, line 200
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 8:
|
||
|
# (, line 201
|
||
|
# <-, line 201
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 9:
|
||
|
# (, line 202
|
||
|
# delete, line 202
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 10:
|
||
|
# (, line 203
|
||
|
# delete, line 203
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 11:
|
||
|
# (, line 204
|
||
|
# delete, line 204
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 12:
|
||
|
# (, line 205
|
||
|
# <-, line 205
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 13:
|
||
|
# (, line 206
|
||
|
# <-, line 206
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 14:
|
||
|
# (, line 207
|
||
|
# delete, line 207
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 15:
|
||
|
# (, line 208
|
||
|
# delete, line 208
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 16:
|
||
|
# (, line 209
|
||
|
# delete, line 209
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 17:
|
||
|
# (, line 210
|
||
|
# delete, line 210
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 18:
|
||
|
# (, line 211
|
||
|
# <-, line 211
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 19:
|
||
|
# (, line 212
|
||
|
# <-, line 212
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 20:
|
||
|
# (, line 214
|
||
|
# delete, line 214
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 21:
|
||
|
# (, line 215
|
||
|
# delete, line 215
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 22:
|
||
|
# (, line 216
|
||
|
# <-, line 216
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 23:
|
||
|
# (, line 217
|
||
|
# <-, line 217
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 24:
|
||
|
# (, line 218
|
||
|
# delete, line 218
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 25:
|
||
|
# (, line 219
|
||
|
# delete, line 219
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 26:
|
||
|
# (, line 220
|
||
|
# delete, line 220
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 27:
|
||
|
# (, line 221
|
||
|
# <-, line 221
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 28:
|
||
|
# (, line 222
|
||
|
# <-, line 222
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 29:
|
||
|
# (, line 223
|
||
|
# delete, line 223
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def _stem(self):
|
||
|
# (, line 228
|
||
|
# do, line 229
|
||
|
v_1 = self.cursor
|
||
|
try:
|
||
|
# call mark_regions, line 229
|
||
|
if not self.r_mark_regions():
|
||
|
raise lab0()
|
||
|
except lab0: pass
|
||
|
self.cursor = v_1
|
||
|
# backwards, line 230
|
||
|
self.limit_backward = self.cursor
|
||
|
self.cursor = self.limit
|
||
|
# (, line 230
|
||
|
# do, line 231
|
||
|
v_2 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call instrum, line 231
|
||
|
if not self.r_instrum():
|
||
|
raise lab1()
|
||
|
except lab1: pass
|
||
|
self.cursor = self.limit - v_2
|
||
|
# do, line 232
|
||
|
v_3 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call case, line 232
|
||
|
if not self.r_case():
|
||
|
raise lab2()
|
||
|
except lab2: pass
|
||
|
self.cursor = self.limit - v_3
|
||
|
# do, line 233
|
||
|
v_4 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call case_special, line 233
|
||
|
if not self.r_case_special():
|
||
|
raise lab3()
|
||
|
except lab3: pass
|
||
|
self.cursor = self.limit - v_4
|
||
|
# do, line 234
|
||
|
v_5 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call case_other, line 234
|
||
|
if not self.r_case_other():
|
||
|
raise lab4()
|
||
|
except lab4: pass
|
||
|
self.cursor = self.limit - v_5
|
||
|
# do, line 235
|
||
|
v_6 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call factive, line 235
|
||
|
if not self.r_factive():
|
||
|
raise lab5()
|
||
|
except lab5: pass
|
||
|
self.cursor = self.limit - v_6
|
||
|
# do, line 236
|
||
|
v_7 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call owned, line 236
|
||
|
if not self.r_owned():
|
||
|
raise lab6()
|
||
|
except lab6: pass
|
||
|
self.cursor = self.limit - v_7
|
||
|
# do, line 237
|
||
|
v_8 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call sing_owner, line 237
|
||
|
if not self.r_sing_owner():
|
||
|
raise lab7()
|
||
|
except lab7: pass
|
||
|
self.cursor = self.limit - v_8
|
||
|
# do, line 238
|
||
|
v_9 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call plur_owner, line 238
|
||
|
if not self.r_plur_owner():
|
||
|
raise lab8()
|
||
|
except lab8: pass
|
||
|
self.cursor = self.limit - v_9
|
||
|
# do, line 239
|
||
|
v_10 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call plural, line 239
|
||
|
if not self.r_plural():
|
||
|
raise lab9()
|
||
|
except lab9: pass
|
||
|
self.cursor = self.limit - v_10
|
||
|
self.cursor = self.limit_backward
|
||
|
return True
|
||
|
|
||
|
def equals(self, o):
|
||
|
return isinstance(o, HungarianStemmer)
|
||
|
|
||
|
def hashCode(self):
|
||
|
return hash("HungarianStemmer")
|
||
|
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
|