java.io.Serializable
public class NegationEvaluator extends LexiconEvaluator
Constructor | Description |
---|---|
NegationEvaluator(java.lang.String path,
java.lang.String name) |
Initializes the Object
|
Modifier and Type | Method | Description |
---|---|---|
java.util.Map<java.lang.String,java.lang.Double> |
evaluateTweet(java.util.List<java.lang.String> tokens) |
Calculates lexicon-based feature values from a list of tokens
|
java.util.Set<java.lang.String> |
getWordList() |
Gets the negating words
|
void |
processDict() |
initializes the dictionary
|
getFeatureNames
public NegationEvaluator(java.lang.String path, java.lang.String name)
path
- the file with the lexiconname
- the prefix for all the attributes calculated from this lexiconpublic void processDict() throws java.io.IOException
LexiconEvaluator
processDict
in class LexiconEvaluator
java.io.IOException
- in case of wrong filepublic java.util.Map<java.lang.String,java.lang.Double> evaluateTweet(java.util.List<java.lang.String> tokens)
LexiconEvaluator
evaluateTweet
in class LexiconEvaluator
tokens
- a tokenized tweetpublic java.util.Set<java.lang.String> getWordList()