public class SisterAnnotationStats extends Object implements TreeVisitor
Modifier and Type | Field and Description |
---|---|
static double[] |
CUTOFFS
Minimum support * KL to be included in output and as feature
|
static boolean |
DO_TAGS |
static double |
SUPPCUTOFF
Minimum support of parent annotated node for grandparent to be
studied.
|
Constructor and Description |
---|
SisterAnnotationStats() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
kidLabels(Tree t) |
static List<String> |
leftSisterLabels(Tree t,
Tree p)
string-value labels of left sisters; from inside to outside (right-left)
|
static void |
main(String[] args)
Calculate sister annotation statistics suitable for doing
selective sister splitting in the PCFGParser inside the
FactoredParser.
|
void |
printStats() |
void |
recurse(Tree t,
Tree p)
p is parent
|
static List<String> |
rightSisterLabels(Tree t,
Tree p)
string-value labels of right sisters; from inside to outside (left-right)
|
protected void |
sideCounters(String label,
List rewrite,
List sideSisters,
Map sideRules) |
protected void |
sisterCounters(Tree t,
Tree p) |
void |
visitTree(Tree t)
Does whatever one needs to do to a particular parse tree
|
public static final boolean DO_TAGS
public static final double[] CUTOFFS
public static final double SUPPCUTOFF
public void visitTree(Tree t)
visitTree
in interface TreeVisitor
t
- A tree. Classes implementing this interface can assume
that the tree passed in is not null
.public static List<String> leftSisterLabels(Tree t, Tree p)
public static List<String> rightSisterLabels(Tree t, Tree p)
protected void sideCounters(String label, List rewrite, List sideSisters, Map sideRules)
public void printStats()
public static void main(String[] args)
args
- One argument: path to the Treebank