When summarizing text in spanish certain words cause the summarizer to raise an Exception, ie:
from summa import summarizer
summarizer.summarize("urgue", language="spanish")
Even though the word isn't grammatically correct, raising an Exception is undesired behavior.
The problem seems to be generated in the snowballer:
|
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": |
When the value of rv is "e" and suffix is "e".
When summarizing text in spanish certain words cause the summarizer to raise an Exception, ie:
Even though the word isn't grammatically correct, raising an Exception is undesired behavior.
The problem seems to be generated in the snowballer:
textrank/summa/preprocessing/snowball.py
Lines 3505 to 3510 in d9252a2
When the value of rv is "e" and suffix is "e".