Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multilanguage version of VADER Sentiment Analysis with automatic language-detection

License

NotificationsYou must be signed in to change notification settings

brunneis/vader-multi

 
 

Repository files navigation

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.

This version integrates the Google Translate API through thetranslatte Python library. It requires an active Internet connection in order to work. Text language is automatically detected so it behaves exactly like the original version.

Installation

Uninstall first the original version so it is not instantiated instead of vader-multi:

pip uninstall vaderSentimentpip install vader-multi

Polarity Scores

class vaderSentiment.SentimentIntensityAnalyzer

polarity_scores(text)

Returns a dictionary with the following keys:{'neg': float, 'neu': float, 'pos': float, 'compound': float}

fromvaderSentiment.vaderSentimentimportSentimentIntensityAnalyzeranalyzer=SentimentIntensityAnalyzer()analyzer.polarity_scores("VADER is smart, handsome, and funny.")

Examples

>>>fromvaderSentiment.vaderSentimentimportSentimentIntensityAnalyzer>>>analyzer=SentimentIntensityAnalyzer()>>>analyzer.polarity_scores("VADER is VERY SMART, handsome, and FUNNY!!!"){'neg':0.0,'neu':0.233,'pos':0.767,'compound':0.9342}>>>analyzer.polarity_scores("¡¡¡VADER es MUY INTELIGENTE, guapo y DIVERTIDO!!!"){'neg':0.0,'neu':0.27,'pos':0.73,'compound':0.9387}>>>analyzer.polarity_scores("VADER è MOLTO INTELLIGENTE, bello e DIVERTENTE!!!"){'neg':0.0,'neu':0.256,'pos':0.744,'compound':0.9481}>>>analyzer.polarity_scores("VADER est TRÈS SMART, beau et drôle!!!"){'neg':0.0,'neu':0.276,'pos':0.724,'compound':0.9338}>>>analyzer.polarity_scores("Вейдер очень умный, красивый и смешной!!!"){'neg':0.0,'neu':0.314,'pos':0.686,'compound':0.8989}>>>analyzer.polarity_scores("ベイダーは非常にスマートで、ハンサムで面白いです!!!"){'neg':0.0,'neu':0.328,'pos':0.672,'compound':0.882}>>>analyzer.polarity_scores("வேடர் மிகவும் ஸ்மார்ட், அழகான மற்றும் வேடிக்கையானது!!!"){'neg':0.0,'neu':0.314,'pos':0.686,'compound':0.8989}

About

Multilanguage version of VADER Sentiment Analysis with automatic language-detection

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python99.7%
  • Shell0.3%

[8]ページ先頭

©2009-2025 Movatter.jp