edu.stanford.nlp.parser.lexparser
Class NegraPennTreebankParserParams

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
      extended by edu.stanford.nlp.parser.lexparser.NegraPennTreebankParserParams
All Implemented Interfaces:
TreebankLangParserParams, TreebankFactory, java.io.Serializable

public class NegraPennTreebankParserParams
extends AbstractTreebankParserParams

Parameter file for parsing the Penn Treebank format of the Negra Treebank (German). STILL UNDER CONSTRUCTION!

Author:
Roger Levy
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
AbstractTreebankParserParams.RemoveGFSubcategoryStripper, AbstractTreebankParserParams.SubcategoryStripper
 
Field Summary
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
evalGF, inputEncoding, outputEncoding, tlp
 
Constructor Summary
NegraPennTreebankParserParams()
           
NegraPennTreebankParserParams(boolean leaveGF, char gfCharacter)
           
 
Method Summary
 TreeTransformer collinizer()
          returns a NegraPennCollinizer
 TreeTransformer collinizerEvalb()
          returns a NegraPennCollinizer
 java.util.List defaultTestSentence()
          Return a default sentence for the language (for testing)
 DiskTreebank diskTreebank()
          returns a DiskTreebank appropriate to the treebank source
 void display()
          display language-specific settings
 HeadFinder headFinder()
          returns a NegraHeadFinder
 Lexicon lex(Options.LexOptions op)
          returns an ordinary Lexicon (could be tuned for German!)
static void main(java.lang.String[] args)
           
 MemoryTreebank memoryTreebank()
          returns a MemoryTreebank appropriate to the treebank source
 int setOptionFlag(java.lang.String[] args, int i)
          Set language-specific options according to flags.
 java.lang.String[] sisterSplitters()
          Returns a NegraPennLanguagePack
 Tree transformTree(Tree t, Tree root)
          transformTree does all language-specific tree transformations.
 TreeReaderFactory treeReaderFactory()
          Returns a factory for reading in trees from the source you want.
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
dependencyGrammarExtractor, dependencyObjectify, getInputEncoding, getOutputEncoding, isEvalGF, lex, MLEDependencyGrammarSmoothingParams, parsevalObjectify, parsevalObjectify, ppAttachmentEval, processHeadWord, pw, pw, setEvalGF, setEvaluateGrammaticalFunctions, setInputEncoding, setOutputEncoding, setupForEval, subcategoryStripper, testMemoryTreebank, treebank, treebankLanguagePack, treeTokenizerFactory, typedDependencyClasser, typedDependencyObjectify, unorderedTypedDependencyObjectify, unorderedUntypedDependencyObjectify, untypedDependencyObjectify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegraPennTreebankParserParams

public NegraPennTreebankParserParams()

NegraPennTreebankParserParams

public NegraPennTreebankParserParams(boolean leaveGF,
                                     char gfCharacter)
Method Detail

headFinder

public HeadFinder headFinder()
returns a NegraHeadFinder

Specified by:
headFinder in interface TreebankLangParserParams
Specified by:
headFinder in class AbstractTreebankParserParams

lex

public Lexicon lex(Options.LexOptions op)
returns an ordinary Lexicon (could be tuned for German!)

Specified by:
lex in interface TreebankLangParserParams
Overrides:
lex in class AbstractTreebankParserParams
Parameters:
op - Options as to how the Lexicon behaves
Returns:
A Lexicon, constructed based on the given option

treeReaderFactory

public TreeReaderFactory treeReaderFactory()
Description copied from interface: TreebankLangParserParams
Returns a factory for reading in trees from the source you want. It's the responsibility of trf to deal properly with character-set encoding of the input. It also is the responsibility of trf to properly normalize trees.

Returns:
A factory that vends an appropriate TreeReader

memoryTreebank

public MemoryTreebank memoryTreebank()
Description copied from class: AbstractTreebankParserParams
returns a MemoryTreebank appropriate to the treebank source

Specified by:
memoryTreebank in interface TreebankLangParserParams
Specified by:
memoryTreebank in class AbstractTreebankParserParams

diskTreebank

public DiskTreebank diskTreebank()
Description copied from class: AbstractTreebankParserParams
returns a DiskTreebank appropriate to the treebank source

Specified by:
diskTreebank in interface TreebankLangParserParams
Specified by:
diskTreebank in class AbstractTreebankParserParams

collinizer

public TreeTransformer collinizer()
returns a NegraPennCollinizer

Specified by:
collinizer in interface TreebankLangParserParams
Specified by:
collinizer in class AbstractTreebankParserParams
Returns:
A TreeTransformer that performs adjustments to trees to delete or equivalence class things not evaluated in the parser performance evaluation.

collinizerEvalb

public TreeTransformer collinizerEvalb()
returns a NegraPennCollinizer

Specified by:
collinizerEvalb in interface TreebankLangParserParams
Specified by:
collinizerEvalb in class AbstractTreebankParserParams

sisterSplitters

public java.lang.String[] sisterSplitters()
Returns a NegraPennLanguagePack

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

setOptionFlag

public int setOptionFlag(java.lang.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
Overrides:
setOptionFlag in class AbstractTreebankParserParams
Parameters:
args - Array of command line arguments
i - Index in command line arguments to try to process as an option
Returns:
The index of the item after arguments processed as part of this command line option.

display

public void display()
Description copied from class: AbstractTreebankParserParams
display language-specific settings

Specified by:
display in interface TreebankLangParserParams
Specified by:
display in class AbstractTreebankParserParams

transformTree

public Tree transformTree(Tree t,
                          Tree root)
transformTree does all language-specific tree transformations. Any parameterizations should be inside the specific TreebankLangParserarams class.

Specified by:
transformTree in interface TreebankLangParserParams
Specified by:
transformTree in class AbstractTreebankParserParams
Parameters:
t - The input tree (with non-language specific annotation already done, so you need to strip back to basic categories)
root - The root of the current tree (can be null for words)
Returns:
The fully annotated tree node (with daughters still as you want them in the final result)

defaultTestSentence

public java.util.List defaultTestSentence()
Return a default sentence for the language (for testing)

Returns:
A default sentence of the language

main

public static void main(java.lang.String[] args)


Stanford NLP Group