Skip to content

Commit 8588483

Browse files
authored
Merge pull request nltk#3086 from tomaarsen/documentation/vader_hashtag_unsupported
2 parents e7c97d4 + 74bb3c2 commit 8588483

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nltk/sentiment/vader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@ def polarity_scores(self, text):
356356
Return a float for sentiment strength based on the input text.
357357
Positive values are positive valence, negative value are negative
358358
valence.
359+
360+
:note: Hashtags are not taken into consideration (e.g. #BAD is neutral). If you
361+
are interested in processing the text in the hashtags too, then we recommend
362+
preprocessing your data to remove the #, after which the hashtag text may be
363+
matched as if it was a normal word in the sentence.
359364
"""
360365
# text, words_and_emoticons, is_cap_diff = self.preprocess(text)
361366
sentitext = SentiText(

0 commit comments

Comments
 (0)