public class BuildBinarizedDataset extends Object
Constructor and Description |
---|
BuildBinarizedDataset() |
Modifier and Type | Method and Description |
---|---|
static void |
extractLabels(Map<Pair<Integer,Integer>,String> spanToLabels,
List<HasWord> tokens,
String line) |
static void |
main(String[] args)
Turns a text file into trees for use in a RNTN classifier such as
the treebank used in the Sentiment project.
|
static void |
setPredictedLabels(Tree tree) |
static boolean |
setSpanLabel(Tree tree,
Pair<Integer,Integer> span,
String value) |
static void |
setUnknownLabels(Tree tree,
Integer defaultLabel)
Sets all of the labels on a tree to the given default value.
|
public static void setUnknownLabels(Tree tree, Integer defaultLabel)
public static void setPredictedLabels(Tree tree)
public static void extractLabels(Map<Pair<Integer,Integer>,String> spanToLabels, List<HasWord> tokens, String line)
public static boolean setSpanLabel(Tree tree, Pair<Integer,Integer> span, String value)
public static void main(String[] args)
1 Today is not a good day.
3 good
3 good day
3 a good day
(next block starts here)
By default the englishPCFG parser is used. This can be changed
with the -parserModel
flag. Specify an input file
with -input
.