Open nhat2008 opened 6 years ago
well, I'm getting this error: AttributeError: 'str' object has no attribute 'synonyms'.
I'm getting this when I try to do these things:
>>> from pattern.text.en import sentiment
>>> sentiment("a-00193480")
and
>>> from pattern.text.en import Sentiment
>>> a = Sentiment()
>>> a("a-00193480")
When the input string is of the form r"^[acdnrv][-_][0-9]+$"
, then this error occurs on line 2441 in text/__init__.py
. The string that was passed will not have synonyms
, id
, or pos
attributes. This is causing the error. I'm not sure where these attributes came from or what this line is intended to do. Knowing this will help us solve this issue. @markus-beuckelmann @tom-de-smedt .
When i use
from pattern.text.en import sentiment sentiment('c-53')
the error: AttributeError: 'unicode' object has no attribute 'synonyms' shows up.