public class GeneralSentimentFeatureExtractor extends Object implements FeatureExtractor<DoubleFV,List<String>>
FeatureExtractor that is suitable for NaiveBayesAnnotator.
Should be initialized with training corpus of the machine learning
AbstractAnnotator you are using.| Constructor and Description |
|---|
GeneralSentimentFeatureExtractor()
Blank constructor.
|
GeneralSentimentFeatureExtractor(List<List<String>> domainVocabularyCorpus)
Construct with the training set.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleFV |
extractFeature(List<String> tokens)
Extract features from an object and return them.
|
void |
initialize(List<List<String>> domainVocabularyCorpus)
Allows a new vocabulary to be constructed from a new corpus.
|
public GeneralSentimentFeatureExtractor(List<List<String>> domainVocabularyCorpus)
domainVocabularyCorpus - list of tokenised corpus documents.public GeneralSentimentFeatureExtractor()
public void initialize(List<List<String>> domainVocabularyCorpus)
domainVocabularyCorpus - list of tokenised corpus documents.public DoubleFV extractFeature(List<String> tokens)
FeatureExtractorextractFeature in interface FeatureExtractor<DoubleFV,List<String>>tokens - the object to extract from