crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
Implementation of the VADER sentiment analysis algorithm. More...
#include <Sentiment.hpp>
Construction | |
Sentiment (const std::string &dictionaryFile, const std::string &emojiFile) | |
Constructor. More... | |
Getters | |
std::size_t | getDictSize () const |
Gets the number of dictionary entries. More... | |
std::size_t | getEmojiNum () const |
Gets the number of entries in the emoji dictionary. More... | |
Sentiment Analysis | |
SentimentScores | analyze (const Tokens &tokens) |
Get the sentiment strength in the given sentence. More... | |
Implementation of the VADER sentiment analysis algorithm.
See:
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.
|
inline |
Constructor.
Creates the dictionaries from the given files.
dictionaryFile | Constant reference to a string containing the file name of the dictionary to be used. |
emojiFile | Constant reference to a string containing the file name of the emoji dictionary to be used. |
|
inline |
Get the sentiment strength in the given sentence.
tokens | Constant reference to a vector containing the tokens of the sentence. |
References crawlservpp::Data::SentimentScores::compound, crawlservpp::Data::VaderButFactorAfter, crawlservpp::Data::VaderButFactorBefore, crawlservpp::Data::VaderC_INCR, crawlservpp::Data::VaderDampOne, crawlservpp::Data::VaderDampTwo, crawlservpp::Data::VaderFOne, crawlservpp::Data::VaderN_SCALAR, crawlservpp::Data::VaderNeverFactor, crawlservpp::Data::VaderOne, crawlservpp::Data::VaderThree, crawlservpp::Data::VaderTwo, and crawlservpp::Data::VaderZero.
|
inline |
Gets the number of dictionary entries.
|
inline |
Gets the number of entries in the emoji dictionary.