edu.stanford.nlp.parser.lexparser
Class ParentAnnotationStats

java.lang.Object
  |
  +--edu.stanford.nlp.parser.lexparser.ParentAnnotationStats
All Implemented Interfaces:
TreeProcessor

public class ParentAnnotationStats
extends Object
implements TreeProcessor

See what parent annotation helps in treebank, based on support and KL divergence.

Author:
Christopher Manning

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
ParentAnnotationStats()
           
 
Method Summary
static List kidLabels(Tree t)
           
static void main(String[] args)
          Calculate parent annotation statistics suitable for doing selective parent splitting in the PCFGParser inside the FactoredParser.
 void printStats()
           
 void processTree(Tree t)
          Does whatever one needs to do to a particular parse tree
 void processTreeHelper(String gP, String p, Tree t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO_TAGS

public static boolean DO_TAGS

CUTOFFS

public static final double[] CUTOFFS
Minimum support * KL to be included in output and as feature


SUPPCUTOFF

public static final double SUPPCUTOFF
Minimum support of parent annotated node for grandparent to be studied. Just there to reduce runtime and printout size.

See Also:
Constant Field Values
Constructor Detail

ParentAnnotationStats

public ParentAnnotationStats()
Method Detail

processTree

public void processTree(Tree t)
Does whatever one needs to do to a particular parse tree

Specified by:
processTree in interface TreeProcessor
Parameters:
t - A tree. Classes implementing this interface can assume that the tree passed in is not null.

kidLabels

public static List kidLabels(Tree t)

processTreeHelper

public void processTreeHelper(String gP,
                              String p,
                              Tree t)

printStats

public void printStats()

main

public static void main(String[] args)
Calculate parent annotation statistics suitable for doing selective parent splitting in the PCFGParser inside the FactoredParser.

Usage: java edu.stanford.nlp.parser.lexparser.ParentAnnotationStats [-tags] treebankPath

Parameters:
args - One argument: path to the Treebank


Stanford NLP Group