summanlp / textrank

TextRank implementation for Python 3.
https://pypi.org/project/summa/
MIT License
1.25k stars 260 forks source link

Removing "porter" as a language #51

Closed fbarrios closed 6 years ago

fbarrios commented 6 years ago

When trying to preprocess some text using "porter" as a language, the program threw an exception:

>>> from summa.summarizer import summarize
>>> summarize(text, language='porter')
  ...
  File "/home/fede/summa/textrank/summa/preprocessing/snowball.py", line 121, in __init__
    _LanguageSpecificStemmer.__init__(self)
  File "/home/fede/summa/textrank/summa/preprocessing/snowball.py", line 96, in __init__
    language = type(self).__name__.lower()
RecursionError: maximum recursion depth exceeded while calling a Python object

This fixes this bug and also introduces minor style changes.