public class Evaluate extends AbstractEvaluate
| Modifier and Type | Field and Description |
|---|---|
protected java.text.DecimalFormat |
format |
NF| Constructor and Description |
|---|
Evaluate(SentimentModel model) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
countUnks(Tree tree)
Keep track of how many trees have at least one unknown, and how
many of those have the top level annotation correct.
|
void |
eval(Tree tree) |
static void |
main(java.lang.String[] args)
Expected arguments are
-model model -treebank treebank
For example
java edu.stanford.nlp.sentiment.Evaluate
-model edu/stanford/nlp/models/sentiment/sentiment.ser.gz
-treebank /u/nlp/data/sentiment/sentiment-treebank/fiveclass/dev.txt
Other arguments are available, for example -numClasses. |
void |
populatePredictedLabels(java.util.List<Tree> trees)
Sets the predicted sentiment label for all trees given.
|
void |
printSummary() |
void |
reset() |
approxAccuracy, approxCombinedAccuracy, countLengthAccuracy, countRoot, countTree, eval, exactNodeAccuracy, exactRootAccuracy, lengthAccuracies, printConfusionMatrix, printLengthAccuraciespublic Evaluate(SentimentModel model)
public void reset()
reset in class AbstractEvaluatepublic void eval(Tree tree)
eval in class AbstractEvaluateprotected void countUnks(Tree tree)
public void printSummary()
printSummary in class AbstractEvaluatepublic void populatePredictedLabels(java.util.List<Tree> trees)
AbstractEvaluateRNNCoreAnnotations.PredictedClass annotation
for all nodes in all trees.populatePredictedLabels in class AbstractEvaluatetrees - List of Trees to be annotatedpublic static void main(java.lang.String[] args)
-model model -treebank treebank
java edu.stanford.nlp.sentiment.Evaluate
-model edu/stanford/nlp/models/sentiment/sentiment.ser.gz
-treebank /u/nlp/data/sentiment/sentiment-treebank/fiveclass/dev.txt
Other arguments are available, for example -numClasses.
See RNNOptions.java, RNNTestOptions.java and RNNTrainOptions.java for
more arguments.
The configuration is usually derived from the RNN model file, which is
not available here as the predictions are external. It is the caller's
responsibility to provide a configuration matching the settings of
the external predictor. Flags of interest include
-equivalenceClasses .