mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-18 02:40:40 +00:00
1033 lines
33 KiB
Python
1033 lines
33 KiB
Python
|
# self file was generated automatically by the Snowball to Python interpreter
|
||
|
|
||
|
from .basestemmer import BaseStemmer
|
||
|
from .among import Among
|
||
|
|
||
|
|
||
|
class SpanishStemmer(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, 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"la", -1, -1),
|
||
|
Among(u"sela", 0, -1),
|
||
|
Among(u"le", -1, -1),
|
||
|
Among(u"me", -1, -1),
|
||
|
Among(u"se", -1, -1),
|
||
|
Among(u"lo", -1, -1),
|
||
|
Among(u"selo", 5, -1),
|
||
|
Among(u"las", -1, -1),
|
||
|
Among(u"selas", 7, -1),
|
||
|
Among(u"les", -1, -1),
|
||
|
Among(u"los", -1, -1),
|
||
|
Among(u"selos", 10, -1),
|
||
|
Among(u"nos", -1, -1)
|
||
|
]
|
||
|
|
||
|
a_2 = [
|
||
|
Among(u"ando", -1, 6),
|
||
|
Among(u"iendo", -1, 6),
|
||
|
Among(u"yendo", -1, 7),
|
||
|
Among(u"\u00E1ndo", -1, 2),
|
||
|
Among(u"i\u00E9ndo", -1, 1),
|
||
|
Among(u"ar", -1, 6),
|
||
|
Among(u"er", -1, 6),
|
||
|
Among(u"ir", -1, 6),
|
||
|
Among(u"\u00E1r", -1, 3),
|
||
|
Among(u"\u00E9r", -1, 4),
|
||
|
Among(u"\u00EDr", -1, 5)
|
||
|
]
|
||
|
|
||
|
a_3 = [
|
||
|
Among(u"ic", -1, -1),
|
||
|
Among(u"ad", -1, -1),
|
||
|
Among(u"os", -1, -1),
|
||
|
Among(u"iv", -1, 1)
|
||
|
]
|
||
|
|
||
|
a_4 = [
|
||
|
Among(u"able", -1, 1),
|
||
|
Among(u"ible", -1, 1),
|
||
|
Among(u"ante", -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"ancia", -1, 2),
|
||
|
Among(u"encia", -1, 5),
|
||
|
Among(u"adora", -1, 2),
|
||
|
Among(u"osa", -1, 1),
|
||
|
Among(u"ista", -1, 1),
|
||
|
Among(u"iva", -1, 9),
|
||
|
Among(u"anza", -1, 1),
|
||
|
Among(u"log\u00EDa", -1, 3),
|
||
|
Among(u"idad", -1, 8),
|
||
|
Among(u"able", -1, 1),
|
||
|
Among(u"ible", -1, 1),
|
||
|
Among(u"ante", -1, 2),
|
||
|
Among(u"mente", -1, 7),
|
||
|
Among(u"amente", 13, 6),
|
||
|
Among(u"aci\u00F3n", -1, 2),
|
||
|
Among(u"uci\u00F3n", -1, 4),
|
||
|
Among(u"ico", -1, 1),
|
||
|
Among(u"ismo", -1, 1),
|
||
|
Among(u"oso", -1, 1),
|
||
|
Among(u"amiento", -1, 1),
|
||
|
Among(u"imiento", -1, 1),
|
||
|
Among(u"ivo", -1, 9),
|
||
|
Among(u"ador", -1, 2),
|
||
|
Among(u"icas", -1, 1),
|
||
|
Among(u"ancias", -1, 2),
|
||
|
Among(u"encias", -1, 5),
|
||
|
Among(u"adoras", -1, 2),
|
||
|
Among(u"osas", -1, 1),
|
||
|
Among(u"istas", -1, 1),
|
||
|
Among(u"ivas", -1, 9),
|
||
|
Among(u"anzas", -1, 1),
|
||
|
Among(u"log\u00EDas", -1, 3),
|
||
|
Among(u"idades", -1, 8),
|
||
|
Among(u"ables", -1, 1),
|
||
|
Among(u"ibles", -1, 1),
|
||
|
Among(u"aciones", -1, 2),
|
||
|
Among(u"uciones", -1, 4),
|
||
|
Among(u"adores", -1, 2),
|
||
|
Among(u"antes", -1, 2),
|
||
|
Among(u"icos", -1, 1),
|
||
|
Among(u"ismos", -1, 1),
|
||
|
Among(u"osos", -1, 1),
|
||
|
Among(u"amientos", -1, 1),
|
||
|
Among(u"imientos", -1, 1),
|
||
|
Among(u"ivos", -1, 9)
|
||
|
]
|
||
|
|
||
|
a_7 = [
|
||
|
Among(u"ya", -1, 1),
|
||
|
Among(u"ye", -1, 1),
|
||
|
Among(u"yan", -1, 1),
|
||
|
Among(u"yen", -1, 1),
|
||
|
Among(u"yeron", -1, 1),
|
||
|
Among(u"yendo", -1, 1),
|
||
|
Among(u"yo", -1, 1),
|
||
|
Among(u"yas", -1, 1),
|
||
|
Among(u"yes", -1, 1),
|
||
|
Among(u"yais", -1, 1),
|
||
|
Among(u"yamos", -1, 1),
|
||
|
Among(u"y\u00F3", -1, 1)
|
||
|
]
|
||
|
|
||
|
a_8 = [
|
||
|
Among(u"aba", -1, 2),
|
||
|
Among(u"ada", -1, 2),
|
||
|
Among(u"ida", -1, 2),
|
||
|
Among(u"ara", -1, 2),
|
||
|
Among(u"iera", -1, 2),
|
||
|
Among(u"\u00EDa", -1, 2),
|
||
|
Among(u"ar\u00EDa", 5, 2),
|
||
|
Among(u"er\u00EDa", 5, 2),
|
||
|
Among(u"ir\u00EDa", 5, 2),
|
||
|
Among(u"ad", -1, 2),
|
||
|
Among(u"ed", -1, 2),
|
||
|
Among(u"id", -1, 2),
|
||
|
Among(u"ase", -1, 2),
|
||
|
Among(u"iese", -1, 2),
|
||
|
Among(u"aste", -1, 2),
|
||
|
Among(u"iste", -1, 2),
|
||
|
Among(u"an", -1, 2),
|
||
|
Among(u"aban", 16, 2),
|
||
|
Among(u"aran", 16, 2),
|
||
|
Among(u"ieran", 16, 2),
|
||
|
Among(u"\u00EDan", 16, 2),
|
||
|
Among(u"ar\u00EDan", 20, 2),
|
||
|
Among(u"er\u00EDan", 20, 2),
|
||
|
Among(u"ir\u00EDan", 20, 2),
|
||
|
Among(u"en", -1, 1),
|
||
|
Among(u"asen", 24, 2),
|
||
|
Among(u"iesen", 24, 2),
|
||
|
Among(u"aron", -1, 2),
|
||
|
Among(u"ieron", -1, 2),
|
||
|
Among(u"ar\u00E1n", -1, 2),
|
||
|
Among(u"er\u00E1n", -1, 2),
|
||
|
Among(u"ir\u00E1n", -1, 2),
|
||
|
Among(u"ado", -1, 2),
|
||
|
Among(u"ido", -1, 2),
|
||
|
Among(u"ando", -1, 2),
|
||
|
Among(u"iendo", -1, 2),
|
||
|
Among(u"ar", -1, 2),
|
||
|
Among(u"er", -1, 2),
|
||
|
Among(u"ir", -1, 2),
|
||
|
Among(u"as", -1, 2),
|
||
|
Among(u"abas", 39, 2),
|
||
|
Among(u"adas", 39, 2),
|
||
|
Among(u"idas", 39, 2),
|
||
|
Among(u"aras", 39, 2),
|
||
|
Among(u"ieras", 39, 2),
|
||
|
Among(u"\u00EDas", 39, 2),
|
||
|
Among(u"ar\u00EDas", 45, 2),
|
||
|
Among(u"er\u00EDas", 45, 2),
|
||
|
Among(u"ir\u00EDas", 45, 2),
|
||
|
Among(u"es", -1, 1),
|
||
|
Among(u"ases", 49, 2),
|
||
|
Among(u"ieses", 49, 2),
|
||
|
Among(u"abais", -1, 2),
|
||
|
Among(u"arais", -1, 2),
|
||
|
Among(u"ierais", -1, 2),
|
||
|
Among(u"\u00EDais", -1, 2),
|
||
|
Among(u"ar\u00EDais", 55, 2),
|
||
|
Among(u"er\u00EDais", 55, 2),
|
||
|
Among(u"ir\u00EDais", 55, 2),
|
||
|
Among(u"aseis", -1, 2),
|
||
|
Among(u"ieseis", -1, 2),
|
||
|
Among(u"asteis", -1, 2),
|
||
|
Among(u"isteis", -1, 2),
|
||
|
Among(u"\u00E1is", -1, 2),
|
||
|
Among(u"\u00E9is", -1, 1),
|
||
|
Among(u"ar\u00E9is", 64, 2),
|
||
|
Among(u"er\u00E9is", 64, 2),
|
||
|
Among(u"ir\u00E9is", 64, 2),
|
||
|
Among(u"ados", -1, 2),
|
||
|
Among(u"idos", -1, 2),
|
||
|
Among(u"amos", -1, 2),
|
||
|
Among(u"\u00E1bamos", 70, 2),
|
||
|
Among(u"\u00E1ramos", 70, 2),
|
||
|
Among(u"i\u00E9ramos", 70, 2),
|
||
|
Among(u"\u00EDamos", 70, 2),
|
||
|
Among(u"ar\u00EDamos", 74, 2),
|
||
|
Among(u"er\u00EDamos", 74, 2),
|
||
|
Among(u"ir\u00EDamos", 74, 2),
|
||
|
Among(u"emos", -1, 1),
|
||
|
Among(u"aremos", 78, 2),
|
||
|
Among(u"eremos", 78, 2),
|
||
|
Among(u"iremos", 78, 2),
|
||
|
Among(u"\u00E1semos", 78, 2),
|
||
|
Among(u"i\u00E9semos", 78, 2),
|
||
|
Among(u"imos", -1, 2),
|
||
|
Among(u"ar\u00E1s", -1, 2),
|
||
|
Among(u"er\u00E1s", -1, 2),
|
||
|
Among(u"ir\u00E1s", -1, 2),
|
||
|
Among(u"\u00EDs", -1, 2),
|
||
|
Among(u"ar\u00E1", -1, 2),
|
||
|
Among(u"er\u00E1", -1, 2),
|
||
|
Among(u"ir\u00E1", -1, 2),
|
||
|
Among(u"ar\u00E9", -1, 2),
|
||
|
Among(u"er\u00E9", -1, 2),
|
||
|
Among(u"ir\u00E9", -1, 2),
|
||
|
Among(u"i\u00F3", -1, 2)
|
||
|
]
|
||
|
|
||
|
a_9 = [
|
||
|
Among(u"a", -1, 1),
|
||
|
Among(u"e", -1, 2),
|
||
|
Among(u"o", -1, 1),
|
||
|
Among(u"os", -1, 1),
|
||
|
Among(u"\u00E1", -1, 1),
|
||
|
Among(u"\u00E9", -1, 2),
|
||
|
Among(u"\u00ED", -1, 1),
|
||
|
Among(u"\u00F3", -1, 1)
|
||
|
]
|
||
|
|
||
|
g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10]
|
||
|
|
||
|
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_mark_regions(self):
|
||
|
# (, line 31
|
||
|
self.I_pV = self.limit;
|
||
|
self.I_p1 = self.limit;
|
||
|
self.I_p2 = self.limit;
|
||
|
# do, line 37
|
||
|
v_1 = self.cursor
|
||
|
try:
|
||
|
# (, line 37
|
||
|
# or, line 39
|
||
|
try:
|
||
|
v_2 = self.cursor
|
||
|
try:
|
||
|
# (, line 38
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab2()
|
||
|
# or, line 38
|
||
|
try:
|
||
|
v_3 = self.cursor
|
||
|
try:
|
||
|
# (, line 38
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab4()
|
||
|
# gopast, line 38
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
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 38
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab2()
|
||
|
# gopast, line 38
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
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 40
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab0()
|
||
|
# or, line 40
|
||
|
try:
|
||
|
v_6 = self.cursor
|
||
|
try:
|
||
|
# (, line 40
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab10()
|
||
|
# gopast, line 40
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
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 40
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab0()
|
||
|
# next, line 40
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab0()
|
||
|
self.cursor += 1
|
||
|
except lab9: pass
|
||
|
except lab1: pass
|
||
|
# setmark pV, line 41
|
||
|
self.I_pV = self.cursor
|
||
|
except lab0: pass
|
||
|
self.cursor = v_1
|
||
|
# do, line 43
|
||
|
v_8 = self.cursor
|
||
|
try:
|
||
|
# (, line 43
|
||
|
# gopast, line 44
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab15()
|
||
|
raise lab14()
|
||
|
except lab15: pass
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab13()
|
||
|
self.cursor += 1
|
||
|
except lab14: pass
|
||
|
# gopast, line 44
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab17()
|
||
|
raise lab16()
|
||
|
except lab17: pass
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab13()
|
||
|
self.cursor += 1
|
||
|
except lab16: pass
|
||
|
# setmark p1, line 44
|
||
|
self.I_p1 = self.cursor
|
||
|
# gopast, line 45
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab19()
|
||
|
raise lab18()
|
||
|
except lab19: pass
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab13()
|
||
|
self.cursor += 1
|
||
|
except lab18: pass
|
||
|
# gopast, line 45
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
|
||
|
raise lab21()
|
||
|
raise lab20()
|
||
|
except lab21: pass
|
||
|
if self.cursor >= self.limit:
|
||
|
raise lab13()
|
||
|
self.cursor += 1
|
||
|
except lab20: pass
|
||
|
# setmark p2, line 45
|
||
|
self.I_p2 = self.cursor
|
||
|
except lab13: pass
|
||
|
self.cursor = v_8
|
||
|
return True
|
||
|
|
||
|
def r_postlude(self):
|
||
|
# repeat, line 49
|
||
|
try:
|
||
|
while True:
|
||
|
try:
|
||
|
v_1 = self.cursor
|
||
|
try:
|
||
|
# (, line 49
|
||
|
# [, line 50
|
||
|
self.bra = self.cursor
|
||
|
# substring, line 50
|
||
|
among_var = self.find_among(SpanishStemmer.a_0, 6)
|
||
|
if among_var == 0:
|
||
|
raise lab2()
|
||
|
# ], line 50
|
||
|
self.ket = self.cursor
|
||
|
if among_var == 0:
|
||
|
raise lab2()
|
||
|
elif among_var == 1:
|
||
|
# (, line 51
|
||
|
# <-, line 51
|
||
|
if not self.slice_from(u"a"):
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 52
|
||
|
# <-, line 52
|
||
|
if not self.slice_from(u"e"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 53
|
||
|
# <-, line 53
|
||
|
if not self.slice_from(u"i"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 54
|
||
|
# <-, line 54
|
||
|
if not self.slice_from(u"o"):
|
||
|
return False
|
||
|
elif among_var == 5:
|
||
|
# (, line 55
|
||
|
# <-, line 55
|
||
|
if not self.slice_from(u"u"):
|
||
|
return False
|
||
|
elif among_var == 6:
|
||
|
# (, line 57
|
||
|
# next, line 57
|
||
|
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 67
|
||
|
# [, line 68
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 68
|
||
|
if self.find_among_b(SpanishStemmer.a_1, 13) == 0:
|
||
|
return False
|
||
|
# ], line 68
|
||
|
self.bra = self.cursor
|
||
|
# substring, line 72
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_2, 11)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# call RV, line 72
|
||
|
if not self.r_RV():
|
||
|
return False
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 73
|
||
|
# ], line 73
|
||
|
self.bra = self.cursor
|
||
|
# <-, line 73
|
||
|
if not self.slice_from(u"iendo"):
|
||
|
return False
|
||
|
elif among_var == 2:
|
||
|
# (, line 74
|
||
|
# ], line 74
|
||
|
self.bra = self.cursor
|
||
|
# <-, line 74
|
||
|
if not self.slice_from(u"ando"):
|
||
|
return False
|
||
|
elif among_var == 3:
|
||
|
# (, line 75
|
||
|
# ], line 75
|
||
|
self.bra = self.cursor
|
||
|
# <-, line 75
|
||
|
if not self.slice_from(u"ar"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 76
|
||
|
# ], line 76
|
||
|
self.bra = self.cursor
|
||
|
# <-, line 76
|
||
|
if not self.slice_from(u"er"):
|
||
|
return False
|
||
|
elif among_var == 5:
|
||
|
# (, line 77
|
||
|
# ], line 77
|
||
|
self.bra = self.cursor
|
||
|
# <-, line 77
|
||
|
if not self.slice_from(u"ir"):
|
||
|
return False
|
||
|
elif among_var == 6:
|
||
|
# (, line 81
|
||
|
# delete, line 81
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 7:
|
||
|
# (, line 82
|
||
|
# literal, line 82
|
||
|
if not self.eq_s_b(1, u"u"):
|
||
|
return False
|
||
|
# delete, line 82
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_standard_suffix(self):
|
||
|
# (, line 86
|
||
|
# [, line 87
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 87
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_6, 46)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 87
|
||
|
self.bra = self.cursor
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 98
|
||
|
# call R2, line 99
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# delete, line 99
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 104
|
||
|
# call R2, line 105
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# delete, line 105
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 106
|
||
|
v_1 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 106
|
||
|
# [, line 106
|
||
|
self.ket = self.cursor
|
||
|
# literal, line 106
|
||
|
if not self.eq_s_b(2, u"ic"):
|
||
|
self.cursor = self.limit - v_1
|
||
|
raise lab0()
|
||
|
# ], line 106
|
||
|
self.bra = self.cursor
|
||
|
# call R2, line 106
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_1
|
||
|
raise lab0()
|
||
|
# delete, line 106
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab0: pass
|
||
|
elif among_var == 3:
|
||
|
# (, line 110
|
||
|
# call R2, line 111
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# <-, line 111
|
||
|
if not self.slice_from(u"log"):
|
||
|
return False
|
||
|
elif among_var == 4:
|
||
|
# (, line 114
|
||
|
# call R2, line 115
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# <-, line 115
|
||
|
if not self.slice_from(u"u"):
|
||
|
return False
|
||
|
elif among_var == 5:
|
||
|
# (, line 118
|
||
|
# call R2, line 119
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# <-, line 119
|
||
|
if not self.slice_from(u"ente"):
|
||
|
return False
|
||
|
elif among_var == 6:
|
||
|
# (, line 122
|
||
|
# call R1, line 123
|
||
|
if not self.r_R1():
|
||
|
return False
|
||
|
# delete, line 123
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 124
|
||
|
v_2 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 124
|
||
|
# [, line 125
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 125
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_3, 4)
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_2
|
||
|
raise lab1()
|
||
|
# ], line 125
|
||
|
self.bra = self.cursor
|
||
|
# call R2, line 125
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_2
|
||
|
raise lab1()
|
||
|
# delete, line 125
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_2
|
||
|
raise lab1()
|
||
|
elif among_var == 1:
|
||
|
# (, line 126
|
||
|
# [, line 126
|
||
|
self.ket = self.cursor
|
||
|
# literal, line 126
|
||
|
if not self.eq_s_b(2, u"at"):
|
||
|
self.cursor = self.limit - v_2
|
||
|
raise lab1()
|
||
|
# ], line 126
|
||
|
self.bra = self.cursor
|
||
|
# call R2, line 126
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_2
|
||
|
raise lab1()
|
||
|
# delete, line 126
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab1: pass
|
||
|
elif among_var == 7:
|
||
|
# (, line 134
|
||
|
# call R2, line 135
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# delete, line 135
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 136
|
||
|
v_3 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 136
|
||
|
# [, line 137
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 137
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_4, 3)
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_3
|
||
|
raise lab2()
|
||
|
# ], line 137
|
||
|
self.bra = self.cursor
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_3
|
||
|
raise lab2()
|
||
|
elif among_var == 1:
|
||
|
# (, line 140
|
||
|
# call R2, line 140
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_3
|
||
|
raise lab2()
|
||
|
# delete, line 140
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab2: pass
|
||
|
elif among_var == 8:
|
||
|
# (, line 146
|
||
|
# call R2, line 147
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# delete, line 147
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 148
|
||
|
v_4 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 148
|
||
|
# [, line 149
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 149
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_5, 3)
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_4
|
||
|
raise lab3()
|
||
|
# ], line 149
|
||
|
self.bra = self.cursor
|
||
|
if among_var == 0:
|
||
|
self.cursor = self.limit - v_4
|
||
|
raise lab3()
|
||
|
elif among_var == 1:
|
||
|
# (, line 152
|
||
|
# call R2, line 152
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_4
|
||
|
raise lab3()
|
||
|
# delete, line 152
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab3: pass
|
||
|
elif among_var == 9:
|
||
|
# (, line 158
|
||
|
# call R2, line 159
|
||
|
if not self.r_R2():
|
||
|
return False
|
||
|
# delete, line 159
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 160
|
||
|
v_5 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 160
|
||
|
# [, line 161
|
||
|
self.ket = self.cursor
|
||
|
# literal, line 161
|
||
|
if not self.eq_s_b(2, u"at"):
|
||
|
self.cursor = self.limit - v_5
|
||
|
raise lab4()
|
||
|
# ], line 161
|
||
|
self.bra = self.cursor
|
||
|
# call R2, line 161
|
||
|
if not self.r_R2():
|
||
|
self.cursor = self.limit - v_5
|
||
|
raise lab4()
|
||
|
# delete, line 161
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab4: pass
|
||
|
return True
|
||
|
|
||
|
def r_y_verb_suffix(self):
|
||
|
# (, line 167
|
||
|
# setlimit, line 168
|
||
|
v_1 = self.limit - self.cursor
|
||
|
# tomark, line 168
|
||
|
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 168
|
||
|
# [, line 168
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 168
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_7, 12)
|
||
|
if among_var == 0:
|
||
|
self.limit_backward = v_2
|
||
|
return False
|
||
|
# ], line 168
|
||
|
self.bra = self.cursor
|
||
|
self.limit_backward = v_2
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 171
|
||
|
# literal, line 171
|
||
|
if not self.eq_s_b(1, u"u"):
|
||
|
return False
|
||
|
# delete, line 171
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_verb_suffix(self):
|
||
|
# (, line 175
|
||
|
# setlimit, line 176
|
||
|
v_1 = self.limit - self.cursor
|
||
|
# tomark, line 176
|
||
|
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 176
|
||
|
# [, line 176
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 176
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_8, 96)
|
||
|
if among_var == 0:
|
||
|
self.limit_backward = v_2
|
||
|
return False
|
||
|
# ], line 176
|
||
|
self.bra = self.cursor
|
||
|
self.limit_backward = v_2
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 179
|
||
|
# try, line 179
|
||
|
v_3 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 179
|
||
|
# literal, line 179
|
||
|
if not self.eq_s_b(1, u"u"):
|
||
|
self.cursor = self.limit - v_3
|
||
|
raise lab0()
|
||
|
# test, line 179
|
||
|
v_4 = self.limit - self.cursor
|
||
|
# literal, line 179
|
||
|
if not self.eq_s_b(1, u"g"):
|
||
|
self.cursor = self.limit - v_3
|
||
|
raise lab0()
|
||
|
self.cursor = self.limit - v_4
|
||
|
except lab0: pass
|
||
|
# ], line 179
|
||
|
self.bra = self.cursor
|
||
|
# delete, line 179
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 200
|
||
|
# delete, line 200
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
return True
|
||
|
|
||
|
def r_residual_suffix(self):
|
||
|
# (, line 204
|
||
|
# [, line 205
|
||
|
self.ket = self.cursor
|
||
|
# substring, line 205
|
||
|
among_var = self.find_among_b(SpanishStemmer.a_9, 8)
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
# ], line 205
|
||
|
self.bra = self.cursor
|
||
|
if among_var == 0:
|
||
|
return False
|
||
|
elif among_var == 1:
|
||
|
# (, line 208
|
||
|
# call RV, line 208
|
||
|
if not self.r_RV():
|
||
|
return False
|
||
|
# delete, line 208
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
elif among_var == 2:
|
||
|
# (, line 210
|
||
|
# call RV, line 210
|
||
|
if not self.r_RV():
|
||
|
return False
|
||
|
# delete, line 210
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
# try, line 210
|
||
|
v_1 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 210
|
||
|
# [, line 210
|
||
|
self.ket = self.cursor
|
||
|
# literal, line 210
|
||
|
if not self.eq_s_b(1, u"u"):
|
||
|
self.cursor = self.limit - v_1
|
||
|
raise lab0()
|
||
|
# ], line 210
|
||
|
self.bra = self.cursor
|
||
|
# test, line 210
|
||
|
v_2 = self.limit - self.cursor
|
||
|
# literal, line 210
|
||
|
if not self.eq_s_b(1, u"g"):
|
||
|
self.cursor = self.limit - v_1
|
||
|
raise lab0()
|
||
|
self.cursor = self.limit - v_2
|
||
|
# call RV, line 210
|
||
|
if not self.r_RV():
|
||
|
self.cursor = self.limit - v_1
|
||
|
raise lab0()
|
||
|
# delete, line 210
|
||
|
if not self.slice_del():
|
||
|
return False
|
||
|
|
||
|
except lab0: pass
|
||
|
return True
|
||
|
|
||
|
def _stem(self):
|
||
|
# (, line 215
|
||
|
# do, line 216
|
||
|
v_1 = self.cursor
|
||
|
try:
|
||
|
# call mark_regions, line 216
|
||
|
if not self.r_mark_regions():
|
||
|
raise lab0()
|
||
|
except lab0: pass
|
||
|
self.cursor = v_1
|
||
|
# backwards, line 217
|
||
|
self.limit_backward = self.cursor
|
||
|
self.cursor = self.limit
|
||
|
# (, line 217
|
||
|
# do, line 218
|
||
|
v_2 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call attached_pronoun, line 218
|
||
|
if not self.r_attached_pronoun():
|
||
|
raise lab1()
|
||
|
except lab1: pass
|
||
|
self.cursor = self.limit - v_2
|
||
|
# do, line 219
|
||
|
v_3 = self.limit - self.cursor
|
||
|
try:
|
||
|
# (, line 219
|
||
|
# or, line 219
|
||
|
try:
|
||
|
v_4 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call standard_suffix, line 219
|
||
|
if not self.r_standard_suffix():
|
||
|
raise lab4()
|
||
|
raise lab3()
|
||
|
except lab4: pass
|
||
|
self.cursor = self.limit - v_4
|
||
|
try:
|
||
|
# call y_verb_suffix, line 220
|
||
|
if not self.r_y_verb_suffix():
|
||
|
raise lab5()
|
||
|
raise lab3()
|
||
|
except lab5: pass
|
||
|
self.cursor = self.limit - v_4
|
||
|
# call verb_suffix, line 221
|
||
|
if not self.r_verb_suffix():
|
||
|
raise lab2()
|
||
|
except lab3: pass
|
||
|
except lab2: pass
|
||
|
self.cursor = self.limit - v_3
|
||
|
# do, line 223
|
||
|
v_5 = self.limit - self.cursor
|
||
|
try:
|
||
|
# call residual_suffix, line 223
|
||
|
if not self.r_residual_suffix():
|
||
|
raise lab6()
|
||
|
except lab6: pass
|
||
|
self.cursor = self.limit - v_5
|
||
|
self.cursor = self.limit_backward
|
||
|
# do, line 225
|
||
|
v_6 = self.cursor
|
||
|
try:
|
||
|
# call postlude, line 225
|
||
|
if not self.r_postlude():
|
||
|
raise lab7()
|
||
|
except lab7: pass
|
||
|
self.cursor = v_6
|
||
|
return True
|
||
|
|
||
|
def equals(self, o):
|
||
|
return isinstance(o, SpanishStemmer)
|
||
|
|
||
|
def hashCode(self):
|
||
|
return hash("SpanishStemmer")
|
||
|
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
|