edu.stanford.nlp.parser.lexparser
Class TreePrint

java.lang.Object
  extended byedu.stanford.nlp.parser.lexparser.TreePrint

public class TreePrint
extends Object

A class for customizing the print method for a edu.stanford.nlp.trees.Tree as the output of the parser.

Author:
Roger Levy

Field Summary
static String headMark
           
static String[] outputTreeFormats
           
 
Constructor Summary
TreePrint(String format)
           
TreePrint(String format, HeadFinder hf)
           
 
Method Summary
 HeadFinder getHeadFinder()
           
 Tree headMarkNodes(Tree t)
           
 void printTree(Tree t)
          prints the tree to the default PrintWriter
 void printTree(Tree t, PrintWriter pw)
          prints the tree.
 void setHeadFinder(HeadFinder hf)
          Set the headfinder to be used for lexicalizing trees.
 void setHeadMarkNodes(boolean b)
          sets whether or not to mark the head daughter of each non-leaf node
 void setLexicalize(boolean b)
          sets whether or not to lexicalize the output format of the tree.
 void setPrintDepsSet(boolean b)
          Set whether or not to print the dependency set for the tree
 void setPrintWriter(PrintWriter pw)
          Sets the default print writer for printing trees with the instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputTreeFormats

public static final String[] outputTreeFormats

headMark

public static final String headMark
See Also:
Constant Field Values
Constructor Detail

TreePrint

public TreePrint(String format)

TreePrint

public TreePrint(String format,
                 HeadFinder hf)
Method Detail

printTree

public void printTree(Tree t)
prints the tree to the default PrintWriter


printTree

public void printTree(Tree t,
                      PrintWriter pw)
prints the tree.


setLexicalize

public void setLexicalize(boolean b)
sets whether or not to lexicalize the output format of the tree.


setHeadMarkNodes

public void setHeadMarkNodes(boolean b)
sets whether or not to mark the head daughter of each non-leaf node


setPrintDepsSet

public void setPrintDepsSet(boolean b)
Set whether or not to print the dependency set for the tree


setHeadFinder

public void setHeadFinder(HeadFinder hf)
Set the headfinder to be used for lexicalizing trees. Relevant if the output is to be lexicalized. By default, CollinsHeadFinder is used.


getHeadFinder

public HeadFinder getHeadFinder()

setPrintWriter

public void setPrintWriter(PrintWriter pw)
Sets the default print writer for printing trees with the instance


headMarkNodes

public Tree headMarkNodes(Tree t)


Stanford NLP Group