public class SentimentUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
attachLabels(Tree tree,
java.lang.Class<? extends CoreAnnotation<java.lang.Integer>> annotationClass) |
static java.util.List<Tree> |
filterUnknownRoots(java.util.List<Tree> trees) |
static java.util.List<Tree> |
readTreesWithGoldLabels(java.lang.String path)
Given a file name, reads in those trees and returns them as a List
|
static java.util.List<Tree> |
readTreesWithLabels(java.lang.String path,
java.lang.Class<? extends CoreAnnotation<java.lang.Integer>> annotationClass)
Given a file name, reads in those trees and returns them as a List
|
static java.util.List<Tree> |
readTreesWithPredictedLabels(java.lang.String path)
Given a file name, reads in those trees and returns them as list with
labels attached as predictions
|
static java.lang.String |
sentimentString(SentimentModel model,
int sentiment) |
public static void attachLabels(Tree tree, java.lang.Class<? extends CoreAnnotation<java.lang.Integer>> annotationClass)
public static java.util.List<Tree> readTreesWithGoldLabels(java.lang.String path)
public static java.util.List<Tree> readTreesWithPredictedLabels(java.lang.String path)
public static java.util.List<Tree> readTreesWithLabels(java.lang.String path, java.lang.Class<? extends CoreAnnotation<java.lang.Integer>> annotationClass)
public static java.util.List<Tree> filterUnknownRoots(java.util.List<Tree> trees)
public static java.lang.String sentimentString(SentimentModel model, int sentiment)