edu.stanford.nlp.parser.lexparser
Class FrenchTreebankParserParams

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

public class FrenchTreebankParserParams
extends AbstractTreebankParserParams

TreebankLangParserParams for the Frenck Treebank corpus. This package assumes that the FTB has been transformed into PTB-format trees encoded in UTF-8. The "-xmlFormat" option can be used to read the raw FTB trees.

Author:
Marie-Catherine de Marneffe, Spence Green
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
AbstractTreebankParserParams.AnnotatePunctuationFunction, AbstractTreebankParserParams.RemoveGFSubcategoryStripper, AbstractTreebankParserParams.SubcategoryStripper
 
Field Summary
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
evalGF, inputEncoding, outputEncoding, tlp
 
Constructor Summary
FrenchTreebankParserParams()
           
 
Method Summary
 TreeTransformer collinizer()
          the tree transformer used to produce trees for evaluation.
 TreeTransformer collinizerEvalb()
          the tree transformer used to produce trees for evaluation.
 List<HasWord> defaultTestSentence()
          Return a default sentence of the language (for testing).
 DiskTreebank diskTreebank()
          returns a DiskTreebank appropriate to the treebank source
 void display()
          display language-specific settings
 HeadFinder headFinder()
          The HeadFinder to use for your treebank.
 Lexicon lex(Index<String> wordIndex, Index<String> tagIndex)
           
 Lexicon lex(Options op, Index<String> wordIndex, Index<String> tagIndex)
          Vends a Lexicon object suitable to the particular language/treebank combination of interest.
 MemoryTreebank memoryTreebank()
          returns a MemoryTreebank appropriate to the treebank source
 int setOptionFlag(String[] args, int i)
          Set language-specific options according to flags.
 String[] sisterSplitters()
          Returns the splitting strings used for selective splits.
 Tree transformTree(Tree t, Tree root)
          This method does language-specific tree transformations such as annotating particular nodes with language-relevant features.
 TreeReaderFactory treeReaderFactory()
          Returns a factory for reading in trees from the source you want.
 HeadFinder typedDependencyHeadFinder()
          The HeadFinder to use when extracting typed dependencies.
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
dependencyGrammarExtractor, dependencyObjectify, getInputEncoding, getOutputEncoding, isEvalGF, 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

FrenchTreebankParserParams

public FrenchTreebankParserParams()
Method Detail

headFinder

public HeadFinder headFinder()
Description copied from class: AbstractTreebankParserParams
The HeadFinder to use for your treebank.

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

typedDependencyHeadFinder

public HeadFinder typedDependencyHeadFinder()
Description copied from class: AbstractTreebankParserParams
The HeadFinder to use when extracting typed dependencies.

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

lex

public Lexicon lex(Index<String> wordIndex,
                   Index<String> tagIndex)
Overrides:
lex in class AbstractTreebankParserParams
Returns:
A lexicon

lex

public Lexicon lex(Options op,
                   Index<String> wordIndex,
                   Index<String> tagIndex)
Description copied from interface: TreebankLangParserParams
Vends a Lexicon object suitable to the particular language/treebank combination of interest.

Specified by:
lex in interface TreebankLangParserParams
Overrides:
lex in class AbstractTreebankParserParams
Parameters:
op - Lexicon options
Returns:
A Lexicon

sisterSplitters

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

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.

collinizer

public TreeTransformer collinizer()
Description copied from class: AbstractTreebankParserParams
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.

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()
Description copied from class: AbstractTreebankParserParams
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!)

Specified by:
collinizerEvalb in interface TreebankLangParserParams
Specified by:
collinizerEvalb 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

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

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

defaultTestSentence

public List<HasWord> defaultTestSentence()
Description copied from interface: TreebankLangParserParams
Return a default sentence of the language (for testing).

Returns:
A default sentence of the language

transformTree

public Tree transformTree(Tree t,
                          Tree root)
Description copied from class: AbstractTreebankParserParams
This method does language-specific tree transformations such as annotating particular nodes with language-relevant features. Such parameterizations should be inside the specific TreebankLangParserParams class. This method is recursively applied to each node in the tree (depth first, left-to-right), so you shouldn't write this method to apply recursively to tree members. This method is allowed to (and in some cases does) destructively change the input tree t. It changes both labels and the tree shape.

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)

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

setOptionFlag

public int setOptionFlag(String[] args,
                         int i)
Description copied from class: AbstractTreebankParserParams
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.

Generic options are processed separately by Options.setOption(String[],int), and implementations of this method do not have to worry about them. The Options class handles routing options. TreebankParserParams that extend this class should call super when overriding this method.

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.


Stanford NLP Group