Open amieth opened 2 years ago
I fixed this problem in my local copy by changing the following statement in Sentiment.load():
w.attrib.get("form"),
changed to
w.attrib.get("form").lower(),
Now the lowercased words in the input text can be matched with the lowercased words in the loaded lexicon. Here the results of a "tiny test":
Text; Kommentar; sentiment(polarity) Das ist ein Erfolg; positives Substantiv; 1.0 Das war ein kein Erfolg; negiertes positives Substantiv; -0.5 Der Test verlief positiv; positives Adverb; 0.5 Sie fährt ein grünes Auto; neutraler Satz; 0.0
Hi there,
thanks a lot for this great package!
While analyzing some texts with TextBlob-DE I stumbled upon the following difference between TextBlob and TextBlob-DE concerning the polarity of nouns as returned by blob.sentiment:
This code prints the following lines:
I wonder why TextBlob-DE seems to be unable to find the polarity for "Erfolg" in the German sentiment file:
On the other hand TextBlob is obviously able to include the polarity for "success" into the sentiment calculation:
I would very much appreciate if you could give me any advice on how to resolve this issue.
Kind regards, Andreas