cjhutto / vaderSentiment

VADER Sentiment Analysis. VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media, and works well on texts from other domains.
MIT License
4.38k stars 1k forks source link

Optimization to "negated" function. #128

Open naturalscienceuser opened 3 years ago

naturalscienceuser commented 3 years ago

"negated" was made more concise and the NEGATE variable changed from a list to a set to speed up membership checks. The function performs about twice as fast in my rudimentary timeit tests.