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