Class FrenchTreebankParserParams
- java.lang.Object
-
- edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
-
- edu.stanford.nlp.parser.lexparser.TregexPoweredTreebankParserParams
-
- edu.stanford.nlp.parser.lexparser.FrenchTreebankParserParams
-
- All Implemented Interfaces:
TreebankLangParserParams,TreebankFactory,Serializable
public class FrenchTreebankParserParams extends TregexPoweredTreebankParserParams
TreebankLangParserParams for the French 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.TregexPoweredTreebankParserParams
TregexPoweredTreebankParserParams.AnnotateHeadFunction, TregexPoweredTreebankParserParams.SimpleStringFunction
-
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.TregexPoweredTreebankParserParams
annotations
-
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
evalGF, generateOriginalDependencies, inputEncoding, outputEncoding, tlp
-
-
Constructor Summary
Constructors Constructor Description FrenchTreebankParserParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]baselineAnnotationFeatures()Features which should be enabled by default.AbstractCollinizercollinizer()the tree transformer used to produce trees for evaluation.AbstractCollinizercollinizerEvalb()the tree transformer used to produce trees for evaluation.List<HasWord>defaultTestSentence()Return a default sentence of the language (for testing).DiskTreebankdiskTreebank()Allows you to read in trees from the source you want.voiddisplay()Output a description of the current annotation configuration to standard error.HeadFinderheadFinder()The HeadFinder to use for your treebank.Lexiconlex(Options op, Index<String> wordIndex, Index<String> tagIndex)Vends aLexiconobject suitable to the particular language/treebank combination of interest.MemoryTreebankmemoryTreebank()Allows you to read in trees from the source you want.intsetOptionFlag(String[] args, int i)Set language-specific options according to flags.String[]sisterSplitters()Returns the splitting strings used for selective splits.TreetransformTree(Tree t, Tree root)This method does language-specific tree transformations such as annotating particular nodes with language-relevant features.TreeReaderFactorytreeReaderFactory()Returns a factory for reading in trees from the source you want.HeadFindertypedDependencyHeadFinder()The HeadFinder to use when extracting typed dependencies.-
Methods inherited from class edu.stanford.nlp.parser.lexparser.TregexPoweredTreebankParserParams
addFeature, compileAnnotations, getAnnotationString, removeFeature
-
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
defaultCoreNLPFlags, dependencyGrammarExtractor, generateOriginalDependencies, getGrammaticalStructure, getInputEncoding, getOutputEncoding, isEvalGF, MLEDependencyGrammarSmoothingParams, ppAttachmentEval, processHeadWord, pw, pw, readGrammaticalStructureFromFile, setEvalGF, setEvaluateGrammaticalFunctions, setGenerateOriginalDependencies, setInputEncoding, setOutputEncoding, subcategoryStripper, supportsBasicDependencies, testMemoryTreebank, treebank, treebankLanguagePack, treeTokenizerFactory
-
-
-
-
Method Detail
-
baselineAnnotationFeatures
protected String[] baselineAnnotationFeatures()
Features which should be enabled by default.- Specified by:
baselineAnnotationFeaturesin classTregexPoweredTreebankParserParams
-
headFinder
public HeadFinder headFinder()
Description copied from class:AbstractTreebankParserParamsThe HeadFinder to use for your treebank.- Specified by:
headFinderin interfaceTreebankLangParserParams- Specified by:
headFinderin classAbstractTreebankParserParams
-
typedDependencyHeadFinder
public HeadFinder typedDependencyHeadFinder()
Description copied from class:AbstractTreebankParserParamsThe HeadFinder to use when extracting typed dependencies.- Specified by:
typedDependencyHeadFinderin interfaceTreebankLangParserParams- Specified by:
typedDependencyHeadFinderin classAbstractTreebankParserParams
-
lex
public Lexicon lex(Options op, Index<String> wordIndex, Index<String> tagIndex)
Description copied from interface:TreebankLangParserParamsVends aLexiconobject suitable to the particular language/treebank combination of interest.- Specified by:
lexin interfaceTreebankLangParserParams- Overrides:
lexin classAbstractTreebankParserParams- Parameters:
op- Lexicon options- Returns:
- A Lexicon
-
sisterSplitters
public String[] sisterSplitters()
Description copied from class:AbstractTreebankParserParamsReturns the splitting strings used for selective splits.- Specified by:
sisterSplittersin interfaceTreebankLangParserParams- Specified by:
sisterSplittersin classAbstractTreebankParserParams- Returns:
- An array containing ancestor-annotated Strings: categories should be split according to these ancestor annotations.
-
collinizer
public AbstractCollinizer collinizer()
Description copied from class:AbstractTreebankParserParamsthe 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:
collinizerin interfaceTreebankLangParserParams- Specified by:
collinizerin classAbstractTreebankParserParams- Returns:
- A TreeTransformer that performs adjustments to trees to delete or equivalence class things not evaluated in the parser performance evaluation.
-
collinizerEvalb
public AbstractCollinizer collinizerEvalb()
Description copied from class:AbstractTreebankParserParamsthe 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:
collinizerEvalbin interfaceTreebankLangParserParams- Specified by:
collinizerEvalbin classAbstractTreebankParserParams
-
diskTreebank
public DiskTreebank diskTreebank()
Description copied from class:AbstractTreebankParserParamsAllows you to read in trees from the source you want. It's the responsibility of treeReaderFactory() to deal properly with character-set encoding of the input. It also is the responsibility of tr to properly normalize trees.- Specified by:
diskTreebankin interfaceTreebankLangParserParams- Overrides:
diskTreebankin classAbstractTreebankParserParams
-
memoryTreebank
public MemoryTreebank memoryTreebank()
Description copied from class:AbstractTreebankParserParamsAllows you to read in trees from the source you want. It's the responsibility of treeReaderFactory() to deal properly with character-set encoding of the input. It also is the responsibility of tr to properly normalize trees.- Specified by:
memoryTreebankin interfaceTreebankLangParserParams- Overrides:
memoryTreebankin classAbstractTreebankParserParams
-
treeReaderFactory
public TreeReaderFactory treeReaderFactory()
Description copied from class:AbstractTreebankParserParamsReturns 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.- Specified by:
treeReaderFactoryin interfaceTreebankLangParserParams- Specified by:
treeReaderFactoryin classAbstractTreebankParserParams- Returns:
- A factory that vends an appropriate TreeReader
-
defaultTestSentence
public List<HasWord> defaultTestSentence()
Description copied from class:AbstractTreebankParserParamsReturn a default sentence of the language (for testing).- Specified by:
defaultTestSentencein interfaceTreebankLangParserParams- Specified by:
defaultTestSentencein classAbstractTreebankParserParams- Returns:
- A default sentence of the language
-
transformTree
public Tree transformTree(Tree t, Tree root)
Description copied from class:TregexPoweredTreebankParserParamsThis 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 treet. It changes both labels and the tree shape.- Specified by:
transformTreein interfaceTreebankLangParserParams- Overrides:
transformTreein classTregexPoweredTreebankParserParams- 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:TregexPoweredTreebankParserParamsOutput a description of the current annotation configuration to standard error.- Specified by:
displayin interfaceTreebankLangParserParams- Overrides:
displayin classTregexPoweredTreebankParserParams
-
setOptionFlag
public int setOptionFlag(String[] args, int i)
Description copied from class:AbstractTreebankParserParamsSet 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:
setOptionFlagin interfaceTreebankLangParserParams- Overrides:
setOptionFlagin classAbstractTreebankParserParams- Parameters:
args- Array of command line argumentsi- 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.
-
-