Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# (, line 198
# try, line 199
v_1 = self.limit - self.cursor
try:
# (, line 199
# [, line 199
self.ket = self.cursor
# literal, line 199
if not self.eq_s_b(1, u"s"):
self.cursor = self.limit - v_1
raise lab0()
# ], line 199
self.bra = self.cursor
# test, line 199
v_2 = self.limit - self.cursor
if not self.out_grouping_b(FrenchStemmer.g_keep_with_s, 97, 232):
self.cursor = self.limit - v_1
raise lab0()
self.cursor = self.limit - v_2
# delete, line 199
if not self.slice_del():
return False
except lab0: pass
# setlimit, line 200
v_3 = self.limit - self.cursor
# tomark, line 200
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_4 = self.limit_backward
self.limit_backward = self.cursor
# (, line 50
self.I_pV = self.limit;
self.I_p1 = self.limit;
self.I_p2 = self.limit;
# do, line 56
v_1 = self.cursor
try:
# (, line 56
# or, line 58
try:
v_2 = self.cursor
try:
# (, line 57
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
# next, line 57
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
raise lab1()
except lab2: pass
self.cursor = v_2
try:
# among, line 59
if self.find_among(FrenchStemmer.a_0, 3) == 0:
raise lab3()
raise lab1()
except lab3: pass
self.cursor = v_2
# (, line 66
from .italian_stemmer import ItalianStemmer
from .norwegian_stemmer import NorwegianStemmer
from .porter_stemmer import PorterStemmer
from .portuguese_stemmer import PortugueseStemmer
from .romanian_stemmer import RomanianStemmer
from .russian_stemmer import RussianStemmer
from .spanish_stemmer import SpanishStemmer
from .swedish_stemmer import SwedishStemmer
from .turkish_stemmer import TurkishStemmer
_languages = {
'danish': DanishStemmer,
'dutch': DutchStemmer,
'english': EnglishStemmer,
'finnish': FinnishStemmer,
'french': FrenchStemmer,
'german': GermanStemmer,
'hungarian': HungarianStemmer,
'italian': ItalianStemmer,
'norwegian': NorwegianStemmer,
'porter': PorterStemmer,
'portuguese': PortugueseStemmer,
'romanian': RomanianStemmer,
'russian': RussianStemmer,
'spanish': SpanishStemmer,
'swedish': SwedishStemmer,
'turkish': TurkishStemmer,
}
try:
import Stemmer
cext_available = True
def r_un_double(self):
# (, line 211
# test, line 212
v_1 = self.limit - self.cursor
# among, line 212
if self.find_among_b(FrenchStemmer.a_8, 5) == 0:
return False
self.cursor = self.limit - v_1
# [, line 212
self.ket = self.cursor
# next, line 212
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# ], line 212
self.bra = self.cursor
# delete, line 212
if not self.slice_del():
return False
return True
try:
# (, line 57
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab2()
# next, line 57
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
raise lab1()
except lab2: pass
self.cursor = v_2
try:
# among, line 59
if self.find_among(FrenchStemmer.a_0, 3) == 0:
raise lab3()
raise lab1()
except lab3: pass
self.cursor = v_2
# (, line 66
# next, line 66
if self.cursor >= self.limit:
raise lab0()
self.cursor += 1
# gopast, line 66
try:
while True:
try:
if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
raise lab5()
raise lab4()
def r_standard_suffix(self):
# (, line 91
# [, line 92
self.ket = self.cursor
# substring, line 92
among_var = self.find_among_b(FrenchStemmer.a_4, 43)
if among_var == 0:
return False
# ], line 92
self.bra = self.cursor
if among_var == 0:
return False
elif among_var == 1:
# (, line 96
# call R2, line 96
if not self.r_R2():
return False
# delete, line 96
if not self.slice_del():
return False
elif among_var == 2:
except lab0: pass
# setlimit, line 200
v_3 = self.limit - self.cursor
# tomark, line 200
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_4 = self.limit_backward
self.limit_backward = self.cursor
self.cursor = self.limit - v_3
# (, line 200
# [, line 201
self.ket = self.cursor
# substring, line 201
among_var = self.find_among_b(FrenchStemmer.a_7, 7)
if among_var == 0:
self.limit_backward = v_4
return False
# ], line 201
self.bra = self.cursor
if among_var == 0:
self.limit_backward = v_4
return False
elif among_var == 1:
# (, line 202
# call R2, line 202
if not self.r_R2():
self.limit_backward = v_4
return False
# or, line 202
try:
def r_verb_suffix(self):
# setlimit, line 174
v_1 = self.limit - self.cursor
# tomark, line 174
if self.cursor < self.I_pV:
return False
self.cursor = self.I_pV
v_2 = self.limit_backward
self.limit_backward = self.cursor
self.cursor = self.limit - v_1
# (, line 174
# [, line 175
self.ket = self.cursor
# substring, line 175
among_var = self.find_among_b(FrenchStemmer.a_6, 38)
if among_var == 0:
self.limit_backward = v_2
return False
# ], line 175
self.bra = self.cursor
if among_var == 0:
self.limit_backward = v_2
return False
elif among_var == 1:
# (, line 177
# call R2, line 177
if not self.r_R2():
self.limit_backward = v_2
return False
# delete, line 177
if not self.slice_del():
def r_postlude(self):
# repeat, line 75
try:
while True:
try:
v_1 = self.cursor
try:
# (, line 75
# [, line 77
self.bra = self.cursor
# substring, line 77
among_var = self.find_among(FrenchStemmer.a_1, 4)
if among_var == 0:
raise lab2()
# ], line 77
self.ket = self.cursor
if among_var == 0:
raise lab2()
elif among_var == 1:
# (, line 78
# <-, line 78
if not self.slice_from(u"i"):
return False
elif among_var == 2:
# (, line 79
# <-, line 79
if not self.slice_from(u"u"):
return False
def equals(self, o):
return isinstance(o, FrenchStemmer)