|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.parser.lexparser.SisterAnnotationStats
public class SisterAnnotationStats
See what parent annotation helps in treebank, based on support and KL divergence. Some code borrowing from ParentAnnotationStats.
Field Summary | |
---|---|
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 Summary | |
---|---|
SisterAnnotationStats()
|
Method Summary | |
---|---|
static List |
kidLabels(Tree t)
|
static List |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DO_TAGS
public static final double[] CUTOFFS
public static final double SUPPCUTOFF
Constructor Detail |
---|
public SisterAnnotationStats()
Method Detail |
---|
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 void recurse(Tree t, Tree p)
public static List leftSisterLabels(Tree t, Tree p)
public static List rightSisterLabels(Tree t, Tree p)
public static List kidLabels(Tree t)
protected void sisterCounters(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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |