edu.stanford.nlp.parser.lexparser
Class EnglishTreebankParserParams

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

public class EnglishTreebankParserParams
extends Object
implements TreebankLangParserParams

Parser parameters for the Penn English Treebank (WSJ, Brown, Switchboard)

Author:
Roger Levy

Constructor Summary
EnglishTreebankParserParams()
           
 
Method Summary
 TreeTransformer collinizer()
          the tree transformer used to produce trees for evaluation.
 TreeTransformer collinizerEvalb()
           
 void display()
          display language-specific settings
 HeadFinder headFinder()
           
 edu.stanford.nlp.parser.lexparser.Lexicon lex()
          reads in trees from the source you want.
 MemoryTreebank memoryTreebank()
          Reads in trees from the source you want.
 PrintWriter pw()
          the PrintWriter used to print output.
 PrintWriter pw(OutputStream o)
          the PrintWriter used to print output to OutputStream o.
 void setInputEncoding(String encoding)
           
 int setOptionFlag(String[] args, int i)
          Set language-specific options according to flags.
 void setOutputEncoding(String encoding)
           
 String[] sisterSplitters()
          Returns the splitting strings used for selective splits.
 String[] splitters()
          Returns the splitting strings used for selective splits.
 MemoryTreebank testMemoryTreebank()
          returns a MemoryTreebank appropriate to the testing treebank source
 edu.stanford.nlp.parser.lexparser.TreeHeadPair transformTree(Tree t, Tree root, edu.stanford.nlp.parser.lexparser.TreeHeadPair thp)
          transformTree does language-specific tree transformations such as splicing.
 TreebankLanguagePack treebankLanguagePack()
          contains Treebank-specific (but not parser-specific) info such as what is punctuation, and also information about the structure of labels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnglishTreebankParserParams

public EnglishTreebankParserParams()
Method Detail

setInputEncoding

public void setInputEncoding(String encoding)
Specified by:
setInputEncoding in interface TreebankLangParserParams

setOutputEncoding

public void setOutputEncoding(String encoding)
Specified by:
setOutputEncoding in interface TreebankLangParserParams

headFinder

public HeadFinder headFinder()
Specified by:
headFinder in interface TreebankLangParserParams

memoryTreebank

public MemoryTreebank memoryTreebank()
Reads in trees from the source you want. It's the responsibility of tr to deal properly with character-set encoding of the input. It also is the responsibility of tr to properly normalize trees.

Specified by:
memoryTreebank in interface TreebankLangParserParams

testMemoryTreebank

public MemoryTreebank testMemoryTreebank()
returns a MemoryTreebank appropriate to the testing treebank source

Specified by:
testMemoryTreebank in interface TreebankLangParserParams

lex

public edu.stanford.nlp.parser.lexparser.Lexicon lex()
Description copied from interface: TreebankLangParserParams
reads in trees from the source you want. It's the responsibility of tr to deal properly with character-set encoding of the input. It also is the responsibility of tr to properly normalize trees

Specified by:
lex in interface TreebankLangParserParams

collinizer

public TreeTransformer collinizer()
the tree transformer used to produce trees for evaluation. Will be applied both to the

Specified by:
collinizer in interface TreebankLangParserParams

collinizerEvalb

public TreeTransformer collinizerEvalb()
Specified by:
collinizerEvalb in interface TreebankLangParserParams

treebankLanguagePack

public TreebankLanguagePack treebankLanguagePack()
contains Treebank-specific (but not parser-specific) info such as what is punctuation, and also information about the structure of labels

Specified by:
treebankLanguagePack in interface TreebankLangParserParams

pw

public PrintWriter pw()
the PrintWriter used to print output. It's the responsibility of pw to deal properly with character encodings for the relevant treebank

Specified by:
pw in interface TreebankLangParserParams

pw

public PrintWriter pw(OutputStream o)
the PrintWriter used to print output to OutputStream o. It's the responsibility of pw to deal properly with character encodings for the relevant treebank

Specified by:
pw in interface TreebankLangParserParams

splitters

public String[] splitters()
Description copied from interface: TreebankLangParserParams
Returns the splitting strings used for selective splits.

Specified by:
splitters in interface TreebankLangParserParams
Returns:
An array containing ancestor-annotated Strings: categories should be split according to these ancestor annotations.

sisterSplitters

public String[] sisterSplitters()
Description copied from interface: TreebankLangParserParams
Returns the splitting strings used for selective splits.

Specified by:
sisterSplitters in interface TreebankLangParserParams
Returns:
An array containing ancestor-annotated Strings: categories should be split according to these ancestor annotations.

transformTree

public edu.stanford.nlp.parser.lexparser.TreeHeadPair transformTree(Tree t,
                                                                    Tree root,
                                                                    edu.stanford.nlp.parser.lexparser.TreeHeadPair thp)
transformTree does language-specific tree transformations such as splicing. Any parameterizations should be inside the specific TreebankLangParserParams class

Specified by:
transformTree in interface TreebankLangParserParams

display

public void display()
Description copied from interface: TreebankLangParserParams
display language-specific settings

Specified by:
display in interface TreebankLangParserParams

setOptionFlag

public int setOptionFlag(String[] args,
                         int i)
Set language-specific options according to flags. This routine should process the option starting in args[i] (which might potentially be several arguments long if it takes arguments). It should return the index after the last index it consumed in processing. In particular, if it cannot process the current option, the return value should be i.

Specified by:
setOptionFlag in interface TreebankLangParserParams


Stanford NLP Group