public class SentimentPipeline
extends java.lang.Object
The main program has the following options:
-parserModel Which parser model to use, defaults to englishPCFG.ser.gz
-sentimentModel Which sentiment model to use, defaults to sentiment.ser.gz
-file Which file to process.
-fileList A comma separated list of files to process.
-stdin Read one line at a time from stdin.
-output pennTrees: Output trees with scores at each binarized node. vectors: Number tree nodes and print out the vectors. probabilities: Output the scores for different labels for each node. Defaults to printing just the root.
-filterUnknown Remove unknown trees from the input. Only applies to TREES input, in which case the trees must be binarized with sentiment labels
-help Print out help
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<Annotation> |
getAnnotations(StanfordCoreNLP tokenizer,
edu.stanford.nlp.sentiment.SentimentPipeline.Input inputFormat,
java.lang.String filename,
boolean filterUnknown)
Reads an annotation from the given filename using the requested input.
|
static void |
main(java.lang.String[] args)
Runs the tree-based sentiment model on some text.
|
public static java.util.List<Annotation> getAnnotations(StanfordCoreNLP tokenizer, edu.stanford.nlp.sentiment.SentimentPipeline.Input inputFormat, java.lang.String filename, boolean filterUnknown)
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException