You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from nltk.stem.porter import PorterStemmer
from nltk.corpus import stopwords
stemmer = PorterStemmer()
stemmer.stem('aed')
Error is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/peter.hurford/.virtualenvs/rex/lib/python2.7/site-packages/nltk/stem/porter.py", line 665, in stem
stem = self._step1b(stem)
File "/Users/peter.hurford/.virtualenvs/rex/lib/python2.7/site-packages/nltk/stem/porter.py", line 376, in _step1b
lambda stem: (self._measure(stem) == 1 and
File "/Users/peter.hurford/.virtualenvs/rex/lib/python2.7/site-packages/nltk/stem/porter.py", line 258, in _apply_rule_list
if suffix == '*d' and self._ends_double_consonant(word):
File "/Users/peter.hurford/.virtualenvs/rex/lib/python2.7/site-packages/nltk/stem/porter.py", line 214, in _ends_double_consonant
word[-1] == word[-2] and
IndexError: string index out of range
Easy to reproduce:
The text was updated successfully, but these errors were encountered: