Error:
File "D:\...\summa\preprocessing\snowball.py", line 3510, in stem if word[-2:] == "gu" and rv[-1] == "u": IndexError: string index out of range
The issue is in the SpanishStemmer, in this section:
# STEP 3: Residual suffix
for suffix in self.__step3_suffixes:
if rv.endswith(suffix):
if suffix in ("e", "\xE9"):
word = word[:-len(suffix)]
rv = rv[:-len(suffix)]
if word[-2:] == "gu" and rv[-1] == "u":
word = word[:-1]
else:
word = word[:-len(suffix)]
break
If the 'rv' string has length == 1 , the line:
at runtime is trying to do
which is a statement that gives an empty list as a result and makes this check fail:
if word[-2:] == "gu" and rv[-1] == "u":
Error:
File "D:\...\summa\preprocessing\snowball.py", line 3510, in stem if word[-2:] == "gu" and rv[-1] == "u": IndexError: string index out of rangeThe issue is in the SpanishStemmer, in this section:
If the 'rv' string has length == 1 , the line:
at runtime is trying to do
which is a statement that gives an empty list as a result and makes this check fail: