mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-23 05:10:40 +00:00
1034 lines
34 KiB
Python
1034 lines
34 KiB
Python
# self file was generated automatically by the Snowball to Python interpreter
|
|
|
|
from .basestemmer import BaseStemmer
|
|
from .among import Among
|
|
|
|
|
|
class ItalianStemmer(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"", -1, 7),
|
|
Among(u"qu", 0, 6),
|
|
Among(u"\u00E1", 0, 1),
|
|
Among(u"\u00E9", 0, 2),
|
|
Among(u"\u00ED", 0, 3),
|
|
Among(u"\u00F3", 0, 4),
|
|
Among(u"\u00FA", 0, 5)
|
|
]
|
|
|
|
a_1 = [
|
|
Among(u"", -1, 3),
|
|
Among(u"I", 0, 1),
|
|
Among(u"U", 0, 2)
|
|
]
|
|
|
|
a_2 = [
|
|
Among(u"la", -1, -1),
|
|
Among(u"cela", 0, -1),
|
|
Among(u"gliela", 0, -1),
|
|
Among(u"mela", 0, -1),
|
|
Among(u"tela", 0, -1),
|
|
Among(u"vela", 0, -1),
|
|
Among(u"le", -1, -1),
|
|
Among(u"cele", 6, -1),
|
|
Among(u"gliele", 6, -1),
|
|
Among(u"mele", 6, -1),
|
|
Among(u"tele", 6, -1),
|
|
Among(u"vele", 6, -1),
|
|
Among(u"ne", -1, -1),
|
|
Among(u"cene", 12, -1),
|
|
Among(u"gliene", 12, -1),
|
|
Among(u"mene", 12, -1),
|
|
Among(u"sene", 12, -1),
|
|
Among(u"tene", 12, -1),
|
|
Among(u"vene", 12, -1),
|
|
Among(u"ci", -1, -1),
|
|
Among(u"li", -1, -1),
|
|
Among(u"celi", 20, -1),
|
|
Among(u"glieli", 20, -1),
|
|
Among(u"meli", 20, -1),
|
|
Among(u"teli", 20, -1),
|
|
Among(u"veli", 20, -1),
|
|
Among(u"gli", 20, -1),
|
|
Among(u"mi", -1, -1),
|
|
Among(u"si", -1, -1),
|
|
Among(u"ti", -1, -1),
|
|
Among(u"vi", -1, -1),
|
|
Among(u"lo", -1, -1),
|
|
Among(u"celo", 31, -1),
|
|
Among(u"glielo", 31, -1),
|
|
Among(u"melo", 31, -1),
|
|
Among(u"telo", 31, -1),
|
|
Among(u"velo", 31, -1)
|
|
]
|
|
|
|
a_3 = [
|
|
Among(u"ando", -1, 1),
|
|
Among(u"endo", -1, 1),
|
|
Among(u"ar", -1, 2),
|
|
Among(u"er", -1, 2),
|
|
Among(u"ir", -1, 2)
|
|
]
|
|
|
|
a_4 = [
|
|
Among(u"ic", -1, -1),
|
|
Among(u"abil", -1, -1),
|
|
Among(u"os", -1, -1),
|
|
Among(u"iv", -1, 1)
|
|
]
|
|
|
|
a_5 = [
|
|
Among(u"ic", -1, 1),
|
|
Among(u"abil", -1, 1),
|
|
Among(u"iv", -1, 1)
|
|
]
|
|
|
|
a_6 = [
|
|
Among(u"ica", -1, 1),
|
|
Among(u"logia", -1, 3),
|
|
Among(u"osa", -1, 1),
|
|
Among(u"ista", -1, 1),
|
|
Among(u"iva", -1, 9),
|
|
Among(u"anza", -1, 1),
|
|
Among(u"enza", -1, 5),
|
|
Among(u"ice", -1, 1),
|
|
Among(u"atrice", 7, 1),
|
|
Among(u"iche", -1, 1),
|
|
Among(u"logie", -1, 3),
|
|
Among(u"abile", -1, 1),
|
|
Among(u"ibile", -1, 1),
|
|
Among(u"usione", -1, 4),
|
|
Among(u"azione", -1, 2),
|
|
Among(u"uzione", -1, 4),
|
|
Among(u"atore", -1, 2),
|
|
Among(u"ose", -1, 1),
|
|
Among(u"ante", -1, 1),
|
|
Among(u"mente", -1, 1),
|
|
Among(u"amente", 19, 7),
|
|
Among(u"iste", -1, 1),
|
|
Among(u"ive", -1, 9),
|
|
Among(u"anze", -1, 1),
|
|
Among(u"enze", -1, 5),
|
|
Among(u"ici", -1, 1),
|
|
Among(u"atrici", 25, 1),
|
|
Among(u"ichi", -1, 1),
|
|
Among(u"abili", -1, 1),
|
|
Among(u"ibili", -1, 1),
|
|
Among(u"ismi", -1, 1),
|
|
Among(u"usioni", -1, 4),
|
|
Among(u"azioni", -1, 2),
|
|
Among(u"uzioni", -1, 4),
|
|
Among(u"atori", -1, 2),
|
|
Among(u"osi", -1, 1),
|
|
Among(u"anti", -1, 1),
|
|
Among(u"amenti", -1, 6),
|
|
Among(u"imenti", -1, 6),
|
|
Among(u"isti", -1, 1),
|
|
Among(u"ivi", -1, 9),
|
|
Among(u"ico", -1, 1),
|
|
Among(u"ismo", -1, 1),
|
|
Among(u"oso", -1, 1),
|
|
Among(u"amento", -1, 6),
|
|
Among(u"imento", -1, 6),
|
|
Among(u"ivo", -1, 9),
|
|
Among(u"it\u00E0", -1, 8),
|
|
Among(u"ist\u00E0", -1, 1),
|
|
Among(u"ist\u00E8", -1, 1),
|
|
Among(u"ist\u00EC", -1, 1)
|
|
]
|
|
|
|
a_7 = [
|
|
Among(u"isca", -1, 1),
|
|
Among(u"enda", -1, 1),
|
|
Among(u"ata", -1, 1),
|
|
Among(u"ita", -1, 1),
|
|
Among(u"uta", -1, 1),
|
|
Among(u"ava", -1, 1),
|
|
Among(u"eva", -1, 1),
|
|
Among(u"iva", -1, 1),
|
|
Among(u"erebbe", -1, 1),
|
|
Among(u"irebbe", -1, 1),
|
|
Among(u"isce", -1, 1),
|
|
Among(u"ende", -1, 1),
|
|
Among(u"are", -1, 1),
|
|
Among(u"ere", -1, 1),
|
|
Among(u"ire", -1, 1),
|
|
Among(u"asse", -1, 1),
|
|
Among(u"ate", -1, 1),
|
|
Among(u"avate", 16, 1),
|
|
Among(u"evate", 16, 1),
|
|
Among(u"ivate", 16, 1),
|
|
Among(u"ete", -1, 1),
|
|
Among(u"erete", 20, 1),
|
|
Among(u"irete", 20, 1),
|
|
Among(u"ite", -1, 1),
|
|
Among(u"ereste", -1, 1),
|
|
Among(u"ireste", -1, 1),
|
|
Among(u"ute", -1, 1),
|
|
Among(u"erai", -1, 1),
|
|
Among(u"irai", -1, 1),
|
|
Among(u"isci", -1, 1),
|
|
Among(u"endi", -1, 1),
|
|
Among(u"erei", -1, 1),
|
|
Among(u"irei", -1, 1),
|
|
Among(u"assi", -1, 1),
|
|
Among(u"ati", -1, 1),
|
|
Among(u"iti", -1, 1),
|
|
Among(u"eresti", -1, 1),
|
|
Among(u"iresti", -1, 1),
|
|
Among(u"uti", -1, 1),
|
|
Among(u"avi", -1, 1),
|
|
Among(u"evi", -1, 1),
|
|
Among(u"ivi", -1, 1),
|
|
Among(u"isco", -1, 1),
|
|
Among(u"ando", -1, 1),
|
|
Among(u"endo", -1, 1),
|
|
Among(u"Yamo", -1, 1),
|
|
Among(u"iamo", -1, 1),
|
|
Among(u"avamo", -1, 1),
|
|
Among(u"evamo", -1, 1),
|
|
Among(u"ivamo", -1, 1),
|
|
Among(u"eremo", -1, 1),
|
|
Among(u"iremo", -1, 1),
|
|
Among(u"assimo", -1, 1),
|
|
Among(u"ammo", -1, 1),
|
|
Among(u"emmo", -1, 1),
|
|
Among(u"eremmo", 54, 1),
|
|
Among(u"iremmo", 54, 1),
|
|
Among(u"immo", -1, 1),
|
|
Among(u"ano", -1, 1),
|
|
Among(u"iscano", 58, 1),
|
|
Among(u"avano", 58, 1),
|
|
Among(u"evano", 58, 1),
|
|
Among(u"ivano", 58, 1),
|
|
Among(u"eranno", -1, 1),
|
|
Among(u"iranno", -1, 1),
|
|
Among(u"ono", -1, 1),
|
|
Among(u"iscono", 65, 1),
|
|
Among(u"arono", 65, 1),
|
|
Among(u"erono", 65, 1),
|
|
Among(u"irono", 65, 1),
|
|
Among(u"erebbero", -1, 1),
|
|
Among(u"irebbero", -1, 1),
|
|
Among(u"assero", -1, 1),
|
|
Among(u"essero", -1, 1),
|
|
Among(u"issero", -1, 1),
|
|
Among(u"ato", -1, 1),
|
|
Among(u"ito", -1, 1),
|
|
Among(u"uto", -1, 1),
|
|
Among(u"avo", -1, 1),
|
|
Among(u"evo", -1, 1),
|
|
Among(u"ivo", -1, 1),
|
|
Among(u"ar", -1, 1),
|
|
Among(u"ir", -1, 1),
|
|
Among(u"er\u00E0", -1, 1),
|
|
Among(u"ir\u00E0", -1, 1),
|
|
Among(u"er\u00F2", -1, 1),
|
|
Among(u"ir\u00F2", -1, 1)
|
|
]
|
|
|
|
g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1]
|
|
|
|
g_AEIO = [17, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2]
|
|
|
|
g_CG = [17]
|
|
|
|
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):
|
|
# (, line 34
|
|
# test, line 35
|
|
v_1 = self.cursor
|
|
# repeat, line 35
|
|
try:
|
|
while True:
|
|
try:
|
|
v_2 = self.cursor
|
|
try:
|
|
# (, line 35
|
|
# [, line 36
|
|
self.bra = self.cursor
|
|
# substring, line 36
|
|
among_var = self.find_among(ItalianStemmer.a_0, 7)
|
|
if among_var == 0:
|
|
raise lab2()
|
|
# ], line 36
|
|
self.ket = self.cursor
|
|
if among_var == 0:
|
|
raise lab2()
|
|
elif among_var == 1:
|
|
# (, line 37
|
|
# <-, line 37
|
|
if not self.slice_from(u"\u00E0"):
|
|
return False
|
|
elif among_var == 2:
|
|
# (, line 38
|
|
# <-, line 38
|
|
if not self.slice_from(u"\u00E8"):
|
|
return False
|
|
elif among_var == 3:
|
|
# (, line 39
|
|
# <-, line 39
|
|
if not self.slice_from(u"\u00EC"):
|
|
return False
|
|
elif among_var == 4:
|
|
# (, line 40
|
|
# <-, line 40
|
|
if not self.slice_from(u"\u00F2"):
|
|
return False
|
|
elif among_var == 5:
|
|
# (, line 41
|
|
# <-, line 41
|
|
if not self.slice_from(u"\u00F9"):
|
|
return False
|
|
elif among_var == 6:
|
|
# (, line 42
|
|
# <-, line 42
|
|
if not self.slice_from(u"qU"):
|
|
return False
|
|
elif among_var == 7:
|
|
# (, line 43
|
|
# next, line 43
|
|
if self.cursor >= self.limit:
|
|
raise lab2()
|
|
self.cursor += 1
|
|
raise lab1()
|
|
except lab2: pass
|
|
self.cursor = v_2
|
|
raise lab0()
|
|
except lab1: pass
|
|
except lab0: pass
|
|
self.cursor = v_1
|
|
# repeat, line 46
|
|
try:
|
|
while True:
|
|
try:
|
|
v_3 = self.cursor
|
|
try:
|
|
# goto, line 46
|
|
try:
|
|
while True:
|
|
v_4 = self.cursor
|
|
try:
|
|
# (, line 46
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab7()
|
|
# [, line 47
|
|
self.bra = self.cursor
|
|
# or, line 47
|
|
try:
|
|
v_5 = self.cursor
|
|
try:
|
|
# (, line 47
|
|
# literal, line 47
|
|
if not self.eq_s(1, u"u"):
|
|
raise lab9()
|
|
# ], line 47
|
|
self.ket = self.cursor
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab9()
|
|
# <-, line 47
|
|
if not self.slice_from(u"U"):
|
|
return False
|
|
raise lab8()
|
|
except lab9: pass
|
|
self.cursor = v_5
|
|
# (, line 48
|
|
# literal, line 48
|
|
if not self.eq_s(1, u"i"):
|
|
raise lab7()
|
|
# ], line 48
|
|
self.ket = self.cursor
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab7()
|
|
# <-, line 48
|
|
if not self.slice_from(u"I"):
|
|
return False
|
|
except lab8: pass
|
|
self.cursor = v_4
|
|
raise lab6()
|
|
except lab7: pass
|
|
self.cursor = v_4
|
|
if self.cursor >= self.limit:
|
|
raise lab5()
|
|
self.cursor += 1
|
|
except lab6: pass
|
|
raise lab4()
|
|
except lab5: pass
|
|
self.cursor = v_3
|
|
raise lab3()
|
|
except lab4: pass
|
|
except lab3: pass
|
|
return True
|
|
|
|
def r_mark_regions(self):
|
|
# (, line 52
|
|
self.I_pV = self.limit;
|
|
self.I_p1 = self.limit;
|
|
self.I_p2 = self.limit;
|
|
# do, line 58
|
|
v_1 = self.cursor
|
|
try:
|
|
# (, line 58
|
|
# or, line 60
|
|
try:
|
|
v_2 = self.cursor
|
|
try:
|
|
# (, line 59
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab2()
|
|
# or, line 59
|
|
try:
|
|
v_3 = self.cursor
|
|
try:
|
|
# (, line 59
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab4()
|
|
# gopast, line 59
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab6()
|
|
raise lab5()
|
|
except lab6: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab4()
|
|
self.cursor += 1
|
|
except lab5: pass
|
|
raise lab3()
|
|
except lab4: pass
|
|
self.cursor = v_3
|
|
# (, line 59
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab2()
|
|
# gopast, line 59
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab8()
|
|
raise lab7()
|
|
except lab8: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab2()
|
|
self.cursor += 1
|
|
except lab7: pass
|
|
except lab3: pass
|
|
raise lab1()
|
|
except lab2: pass
|
|
self.cursor = v_2
|
|
# (, line 61
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab0()
|
|
# or, line 61
|
|
try:
|
|
v_6 = self.cursor
|
|
try:
|
|
# (, line 61
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab10()
|
|
# gopast, line 61
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab12()
|
|
raise lab11()
|
|
except lab12: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab10()
|
|
self.cursor += 1
|
|
except lab11: pass
|
|
raise lab9()
|
|
except lab10: pass
|
|
self.cursor = v_6
|
|
# (, line 61
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab0()
|
|
# next, line 61
|
|
if self.cursor >= self.limit:
|
|
raise lab0()
|
|
self.cursor += 1
|
|
except lab9: pass
|
|
except lab1: pass
|
|
# setmark pV, line 62
|
|
self.I_pV = self.cursor
|
|
except lab0: pass
|
|
self.cursor = v_1
|
|
# do, line 64
|
|
v_8 = self.cursor
|
|
try:
|
|
# (, line 64
|
|
# gopast, line 65
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab15()
|
|
raise lab14()
|
|
except lab15: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab13()
|
|
self.cursor += 1
|
|
except lab14: pass
|
|
# gopast, line 65
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab17()
|
|
raise lab16()
|
|
except lab17: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab13()
|
|
self.cursor += 1
|
|
except lab16: pass
|
|
# setmark p1, line 65
|
|
self.I_p1 = self.cursor
|
|
# gopast, line 66
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.in_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab19()
|
|
raise lab18()
|
|
except lab19: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab13()
|
|
self.cursor += 1
|
|
except lab18: pass
|
|
# gopast, line 66
|
|
try:
|
|
while True:
|
|
try:
|
|
if not self.out_grouping(ItalianStemmer.g_v, 97, 249):
|
|
raise lab21()
|
|
raise lab20()
|
|
except lab21: pass
|
|
if self.cursor >= self.limit:
|
|
raise lab13()
|
|
self.cursor += 1
|
|
except lab20: pass
|
|
# setmark p2, line 66
|
|
self.I_p2 = self.cursor
|
|
except lab13: pass
|
|
self.cursor = v_8
|
|
return True
|
|
|
|
def r_postlude(self):
|
|
# repeat, line 70
|
|
try:
|
|
while True:
|
|
try:
|
|
v_1 = self.cursor
|
|
try:
|
|
# (, line 70
|
|
# [, line 72
|
|
self.bra = self.cursor
|
|
# substring, line 72
|
|
among_var = self.find_among(ItalianStemmer.a_1, 3)
|
|
if among_var == 0:
|
|
raise lab2()
|
|
# ], line 72
|
|
self.ket = self.cursor
|
|
if among_var == 0:
|
|
raise lab2()
|
|
elif among_var == 1:
|
|
# (, line 73
|
|
# <-, line 73
|
|
if not self.slice_from(u"i"):
|
|
return False
|
|
elif among_var == 2:
|
|
# (, line 74
|
|
# <-, line 74
|
|
if not self.slice_from(u"u"):
|
|
return False
|
|
elif among_var == 3:
|
|
# (, line 75
|
|
# next, line 75
|
|
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_attached_pronoun(self):
|
|
# (, line 86
|
|
# [, line 87
|
|
self.ket = self.cursor
|
|
# substring, line 87
|
|
if self.find_among_b(ItalianStemmer.a_2, 37) == 0:
|
|
return False
|
|
# ], line 87
|
|
self.bra = self.cursor
|
|
# among, line 97
|
|
among_var = self.find_among_b(ItalianStemmer.a_3, 5)
|
|
if among_var == 0:
|
|
return False
|
|
# (, line 97
|
|
# call RV, line 97
|
|
if not self.r_RV():
|
|
return False
|
|
if among_var == 0:
|
|
return False
|
|
elif among_var == 1:
|
|
# (, line 98
|
|
# delete, line 98
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
elif among_var == 2:
|
|
# (, line 99
|
|
# <-, line 99
|
|
if not self.slice_from(u"e"):
|
|
return False
|
|
return True
|
|
|
|
def r_standard_suffix(self):
|
|
# (, line 103
|
|
# [, line 104
|
|
self.ket = self.cursor
|
|
# substring, line 104
|
|
among_var = self.find_among_b(ItalianStemmer.a_6, 51)
|
|
if among_var == 0:
|
|
return False
|
|
# ], line 104
|
|
self.bra = self.cursor
|
|
if among_var == 0:
|
|
return False
|
|
elif among_var == 1:
|
|
# (, line 111
|
|
# call R2, line 111
|
|
if not self.r_R2():
|
|
return False
|
|
# delete, line 111
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
elif among_var == 2:
|
|
# (, line 113
|
|
# call R2, line 113
|
|
if not self.r_R2():
|
|
return False
|
|
# delete, line 113
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# try, line 114
|
|
v_1 = self.limit - self.cursor
|
|
try:
|
|
# (, line 114
|
|
# [, line 114
|
|
self.ket = self.cursor
|
|
# literal, line 114
|
|
if not self.eq_s_b(2, u"ic"):
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# ], line 114
|
|
self.bra = self.cursor
|
|
# call R2, line 114
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# delete, line 114
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab0: pass
|
|
elif among_var == 3:
|
|
# (, line 117
|
|
# call R2, line 117
|
|
if not self.r_R2():
|
|
return False
|
|
# <-, line 117
|
|
if not self.slice_from(u"log"):
|
|
return False
|
|
elif among_var == 4:
|
|
# (, line 119
|
|
# call R2, line 119
|
|
if not self.r_R2():
|
|
return False
|
|
# <-, line 119
|
|
if not self.slice_from(u"u"):
|
|
return False
|
|
elif among_var == 5:
|
|
# (, line 121
|
|
# call R2, line 121
|
|
if not self.r_R2():
|
|
return False
|
|
# <-, line 121
|
|
if not self.slice_from(u"ente"):
|
|
return False
|
|
elif among_var == 6:
|
|
# (, line 123
|
|
# call RV, line 123
|
|
if not self.r_RV():
|
|
return False
|
|
# delete, line 123
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
elif among_var == 7:
|
|
# (, line 124
|
|
# call R1, line 125
|
|
if not self.r_R1():
|
|
return False
|
|
# delete, line 125
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# try, line 126
|
|
v_2 = self.limit - self.cursor
|
|
try:
|
|
# (, line 126
|
|
# [, line 127
|
|
self.ket = self.cursor
|
|
# substring, line 127
|
|
among_var = self.find_among_b(ItalianStemmer.a_4, 4)
|
|
if among_var == 0:
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# ], line 127
|
|
self.bra = self.cursor
|
|
# call R2, line 127
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# delete, line 127
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
if among_var == 0:
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
elif among_var == 1:
|
|
# (, line 128
|
|
# [, line 128
|
|
self.ket = self.cursor
|
|
# literal, line 128
|
|
if not self.eq_s_b(2, u"at"):
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# ], line 128
|
|
self.bra = self.cursor
|
|
# call R2, line 128
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# delete, line 128
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab1: pass
|
|
elif among_var == 8:
|
|
# (, line 133
|
|
# call R2, line 134
|
|
if not self.r_R2():
|
|
return False
|
|
# delete, line 134
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# try, line 135
|
|
v_3 = self.limit - self.cursor
|
|
try:
|
|
# (, line 135
|
|
# [, line 136
|
|
self.ket = self.cursor
|
|
# substring, line 136
|
|
among_var = self.find_among_b(ItalianStemmer.a_5, 3)
|
|
if among_var == 0:
|
|
self.cursor = self.limit - v_3
|
|
raise lab2()
|
|
# ], line 136
|
|
self.bra = self.cursor
|
|
if among_var == 0:
|
|
self.cursor = self.limit - v_3
|
|
raise lab2()
|
|
elif among_var == 1:
|
|
# (, line 137
|
|
# call R2, line 137
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_3
|
|
raise lab2()
|
|
# delete, line 137
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab2: pass
|
|
elif among_var == 9:
|
|
# (, line 141
|
|
# call R2, line 142
|
|
if not self.r_R2():
|
|
return False
|
|
# delete, line 142
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# try, line 143
|
|
v_4 = self.limit - self.cursor
|
|
try:
|
|
# (, line 143
|
|
# [, line 143
|
|
self.ket = self.cursor
|
|
# literal, line 143
|
|
if not self.eq_s_b(2, u"at"):
|
|
self.cursor = self.limit - v_4
|
|
raise lab3()
|
|
# ], line 143
|
|
self.bra = self.cursor
|
|
# call R2, line 143
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_4
|
|
raise lab3()
|
|
# delete, line 143
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# [, line 143
|
|
self.ket = self.cursor
|
|
# literal, line 143
|
|
if not self.eq_s_b(2, u"ic"):
|
|
self.cursor = self.limit - v_4
|
|
raise lab3()
|
|
# ], line 143
|
|
self.bra = self.cursor
|
|
# call R2, line 143
|
|
if not self.r_R2():
|
|
self.cursor = self.limit - v_4
|
|
raise lab3()
|
|
# delete, line 143
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab3: pass
|
|
return True
|
|
|
|
def r_verb_suffix(self):
|
|
# setlimit, line 148
|
|
v_1 = self.limit - self.cursor
|
|
# tomark, line 148
|
|
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 148
|
|
# [, line 149
|
|
self.ket = self.cursor
|
|
# substring, line 149
|
|
among_var = self.find_among_b(ItalianStemmer.a_7, 87)
|
|
if among_var == 0:
|
|
self.limit_backward = v_2
|
|
return False
|
|
# ], line 149
|
|
self.bra = self.cursor
|
|
if among_var == 0:
|
|
self.limit_backward = v_2
|
|
return False
|
|
elif among_var == 1:
|
|
# (, line 163
|
|
# delete, line 163
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
self.limit_backward = v_2
|
|
return True
|
|
|
|
def r_vowel_suffix(self):
|
|
# (, line 170
|
|
# try, line 171
|
|
v_1 = self.limit - self.cursor
|
|
try:
|
|
# (, line 171
|
|
# [, line 172
|
|
self.ket = self.cursor
|
|
if not self.in_grouping_b(ItalianStemmer.g_AEIO, 97, 242):
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# ], line 172
|
|
self.bra = self.cursor
|
|
# call RV, line 172
|
|
if not self.r_RV():
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# delete, line 172
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
# [, line 173
|
|
self.ket = self.cursor
|
|
# literal, line 173
|
|
if not self.eq_s_b(1, u"i"):
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# ], line 173
|
|
self.bra = self.cursor
|
|
# call RV, line 173
|
|
if not self.r_RV():
|
|
self.cursor = self.limit - v_1
|
|
raise lab0()
|
|
# delete, line 173
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab0: pass
|
|
# try, line 175
|
|
v_2 = self.limit - self.cursor
|
|
try:
|
|
# (, line 175
|
|
# [, line 176
|
|
self.ket = self.cursor
|
|
# literal, line 176
|
|
if not self.eq_s_b(1, u"h"):
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# ], line 176
|
|
self.bra = self.cursor
|
|
if not self.in_grouping_b(ItalianStemmer.g_CG, 99, 103):
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# call RV, line 176
|
|
if not self.r_RV():
|
|
self.cursor = self.limit - v_2
|
|
raise lab1()
|
|
# delete, line 176
|
|
if not self.slice_del():
|
|
return False
|
|
|
|
except lab1: pass
|
|
return True
|
|
|
|
def _stem(self):
|
|
# (, line 181
|
|
# do, line 182
|
|
v_1 = self.cursor
|
|
try:
|
|
# call prelude, line 182
|
|
if not self.r_prelude():
|
|
raise lab0()
|
|
except lab0: pass
|
|
self.cursor = v_1
|
|
# do, line 183
|
|
v_2 = self.cursor
|
|
try:
|
|
# call mark_regions, line 183
|
|
if not self.r_mark_regions():
|
|
raise lab1()
|
|
except lab1: pass
|
|
self.cursor = v_2
|
|
# backwards, line 184
|
|
self.limit_backward = self.cursor
|
|
self.cursor = self.limit
|
|
# (, line 184
|
|
# do, line 185
|
|
v_3 = self.limit - self.cursor
|
|
try:
|
|
# call attached_pronoun, line 185
|
|
if not self.r_attached_pronoun():
|
|
raise lab2()
|
|
except lab2: pass
|
|
self.cursor = self.limit - v_3
|
|
# do, line 186
|
|
v_4 = self.limit - self.cursor
|
|
try:
|
|
# (, line 186
|
|
# or, line 186
|
|
try:
|
|
v_5 = self.limit - self.cursor
|
|
try:
|
|
# call standard_suffix, line 186
|
|
if not self.r_standard_suffix():
|
|
raise lab5()
|
|
raise lab4()
|
|
except lab5: pass
|
|
self.cursor = self.limit - v_5
|
|
# call verb_suffix, line 186
|
|
if not self.r_verb_suffix():
|
|
raise lab3()
|
|
except lab4: pass
|
|
except lab3: pass
|
|
self.cursor = self.limit - v_4
|
|
# do, line 187
|
|
v_6 = self.limit - self.cursor
|
|
try:
|
|
# call vowel_suffix, line 187
|
|
if not self.r_vowel_suffix():
|
|
raise lab6()
|
|
except lab6: pass
|
|
self.cursor = self.limit - v_6
|
|
self.cursor = self.limit_backward
|
|
# do, line 189
|
|
v_7 = self.cursor
|
|
try:
|
|
# call postlude, line 189
|
|
if not self.r_postlude():
|
|
raise lab7()
|
|
except lab7: pass
|
|
self.cursor = v_7
|
|
return True
|
|
|
|
def equals(self, o):
|
|
return isinstance(o, ItalianStemmer)
|
|
|
|
def hashCode(self):
|
|
return hash("ItalianStemmer")
|
|
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
|