edu.stanford.nlp.parser.lexparser
Interface TreebankLangParserParams

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTreebankParserParams, ChineseTreebankParserParams, EnglishTreebankParserParams, NegraPennTreebankParserParams

public interface TreebankLangParserParams
extends Serializable

Contains fields necessary to get the parser to parse an arbitrary treebank.

Author:
Roger Levy

Method Summary
 TreeTransformer collinizer()
          the tree transformer used to produce trees for evaluation.
 TreeTransformer collinizerEvalb()
          the tree transformer used to produce trees for evaluation.
 void display()
          display language-specific settings
 HeadFinder headFinder()
           
 Lexicon lex()
          reads in trees from the source you want.
 MemoryTreebank memoryTreebank()
          returns a MemoryTreebank appropriate to the treebank source
 PrintWriter pw()
          returns a PrintWriter used to print output.
 PrintWriter pw(OutputStream o)
          returns a PrintWriter used to print output to the 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()
          returns a TreebankLanguagePack containing Treebank-specific (but not parser-specific) info such as what is punctuation, and also information about the structure of labels
 

Method Detail

headFinder

public HeadFinder headFinder()

setInputEncoding

public void setInputEncoding(String encoding)

setOutputEncoding

public void setOutputEncoding(String encoding)

lex

public Lexicon lex()
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


collinizer

public TreeTransformer collinizer()
the tree transformer used to produce trees for evaluation. Will be applied both to the parse output tree and to the gold tree. Should strip punctuation and maybe do some other things.


collinizerEvalb

public TreeTransformer collinizerEvalb()
the tree transformer used to produce trees for evaluation. Will be applied both to the parse output tree and to the gold tree. Should strip punctuation and maybe do some other things. The evalb version should strip some more stuff off. (finish this doc!)


memoryTreebank

public MemoryTreebank memoryTreebank()
returns a MemoryTreebank appropriate to the treebank source


testMemoryTreebank

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


treebankLanguagePack

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


pw

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


pw

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


splitters

public String[] splitters()
Returns the splitting strings used for selective splits.

Returns:
An array containing ancestor-annotated Strings: categories should be split according to these ancestor annotations.

sisterSplitters

public String[] sisterSplitters()
Returns the splitting strings used for selective splits.

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


display

public void display()
display language-specific settings


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.



Stanford NLP Group