Trains a sentiment analyser inspired by the algorithm by Vivek Narayanan https://github.com/vivekn/sentiment/.
Sentiment analyser inspired by the algorithm by Vivek Narayanan https://github.com/vivekn/sentiment/.
Sentiment analyser inspired by the algorithm by Vivek Narayanan https://github.com/vivekn/sentiment/.
The algorithm is based on the paper "Fast and accurate sentiment classification using an enhanced Naive Bayes model".
This is the instantiated model of the ViveknSentimentApproach. For training your own model, please see the documentation of that class.
The analyzer requires sentence boundaries to give a score in context. Tokenization is needed to make sure tokens are within bounds. Transitivity requirements are also required.
For extended examples of usage, see the Spark NLP Workshop and the ViveknSentimentTestSpec.
SentimentDetector for an alternative approach to sentiment detection
This is the companion object of ViveknSentimentModel.
This is the companion object of ViveknSentimentModel. Please refer to that class for the documentation.
Trains a sentiment analyser inspired by the algorithm by Vivek Narayanan https://github.com/vivekn/sentiment/.
The algorithm is based on the paper "Fast and accurate sentiment classification using an enhanced Naive Bayes model".
The analyzer requires sentence boundaries to give a score in context. Tokenization is needed to make sure tokens are within bounds. Transitivity requirements are also required.
The training data needs to consist of a column for normalized text and a label column (either
"positive"
or"negative"
).For extended examples of usage, see the Spark NLP Workshop and the ViveknSentimentTestSpec.
Example
SentimentDetector for an alternative approach to sentiment detection