https://github.com/bugthesystem/sentiment
Sentiment analysis using VADER in Scala
https://github.com/bugthesystem/sentiment
scala sentiment-analysis vader vader-sentiment-analysis
Last synced: 8 months ago
JSON representation
Sentiment analysis using VADER in Scala
- Host: GitHub
- URL: https://github.com/bugthesystem/sentiment
- Owner: bugthesystem
- License: mit
- Created: 2017-06-20T09:11:29.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T20:56:42.000Z (almost 9 years ago)
- Last Synced: 2025-02-05T13:49:49.841Z (over 1 year ago)
- Topics: scala, sentiment-analysis, vader, vader-sentiment-analysis
- Language: Scala
- Homepage:
- Size: 102 KB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sentiment
Sentiment analysis using VADER with Scala
> **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.
### Usage
```scala
import Sentiment._
object Program {
def main(args: Array[String]): Unit = {
val analyzer = new SentimentIntensityAnalyzer
val text = "The party was good but appetizers and drinks were poorly selected."
val results = analyzer.polarityScores(text)
println(s"Positive score: $results.positive")
println(s"Negative score: $results.negative")
println(s"Neutral score: $results.neutral")
println(s"Compound score: $results.compound")
}
}
```
### TODO
* [ ] publish package
* [ ] sample usage in Flink jobs
### Credits
> Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014.
@z i λ a s a l