Is there a way to update VADER with annotated sentences:
new_sentences = {
'She has written more than 100 books.': '2',
}
This does NOT work:
analyzer.lexicon.update(new_sentences)
Is there a way to update VADER with annotated sentences:
new_sentences = {
'She has written more than 100 books.': '2',
}
This does NOT work:
analyzer.lexicon.update(new_sentences)
Updating the lexicon can only be done with tokens, unfortunately. You can check out the pre-defined lexicon by printing it out or over here: https://github.com/cjhutto/vaderSentiment/blob/master/vaderSentiment/vader_lexicon.txt
import nltk
nltk.download('vader_lexicon')
from nltk.sentiment.vader import SentimentIntensityAnalyzer
new_values = {"flaws": -3.0, "stain": -3.2, "complain": -2.0, "jazz": 4}
analyzer.lexicon.update(new_values)
analyzer = SentimentIntensityAnalyzer()
print(analyzer.lexicon)