public class EnglishTreebankParserParams extends AbstractTreebankParserParams
Modifier and Type | Class and Description |
---|---|
protected class |
EnglishTreebankParserParams.EnglishSubcategoryStripper |
static class |
EnglishTreebankParserParams.EnglishTest |
static class |
EnglishTreebankParserParams.EnglishTrain |
AbstractTreebankParserParams.AnnotatePunctuationFunction, AbstractTreebankParserParams.RemoveGFSubcategoryStripper, AbstractTreebankParserParams.SubcategoryStripper
evalGF, inputEncoding, outputEncoding, tlp
Constructor and Description |
---|
EnglishTreebankParserParams() |
Modifier and Type | Method and Description |
---|---|
TreeTransformer |
collinizer()
The tree transformer used to produce trees for evaluation.
|
TreeTransformer |
collinizerEvalb()
the tree transformer used to produce trees for evaluation.
|
String[] |
defaultCoreNLPFlags()
When run inside StanfordCoreNLP, which flags should be used by default
|
List<Word> |
defaultTestSentence()
Return a default sentence of the language (for testing).
|
DiskTreebank |
diskTreebank()
Allows you to read in trees from the source you want.
|
void |
display()
display language-specific settings
|
GrammaticalStructure |
getGrammaticalStructure(Tree t,
java.util.function.Predicate<String> filter,
HeadFinder hf)
Build a GrammaticalStructure from a Tree.
|
HeadFinder |
headFinder()
The HeadFinder to use for your treebank.
|
Lexicon |
lex(Options op,
Index<String> wordIndex,
Index<String> tagIndex)
Vends a
Lexicon object suitable to the particular language/treebank combination of interest. |
static void |
main(String[] args) |
MemoryTreebank |
memoryTreebank()
Allows you to read in trees from the source you want.
|
PrintWriter |
pw(OutputStream o)
The PrintWriter used to print output to OutputStream o.
|
List<GrammaticalStructure> |
readGrammaticalStructureFromFile(String filename)
Returns a function which reads the given filename and turns its
content in a list of GrammaticalStructures.
|
int |
setOptionFlag(String[] args,
int i)
Set language-specific options according to flags.
|
String[] |
sisterSplitters()
Returns the splitting strings used for selective splits.
|
TreeTransformer |
subcategoryStripper()
Returns a TreeTransformer appropriate to the Treebank which
can be used to remove functional tags (such as "-TMP") from
categories.
|
boolean |
supportsBasicDependencies()
By default, parsers are assumed to not support dependencies.
|
MemoryTreebank |
testMemoryTreebank()
returns a MemoryTreebank appropriate to the testing treebank source
|
Tree |
transformTree(Tree t,
Tree root)
This method does language-specific tree transformations such
as annotating particular nodes with language-relevant features.
|
TreebankLanguagePack |
treebankLanguagePack()
contains Treebank-specific (but not parser-specific) info such
as what is punctuation, and also information about the structure
of labels
|
TreeReaderFactory |
treeReaderFactory()
Makes appropriate TreeReaderFactory with all options specified
|
HeadFinder |
typedDependencyHeadFinder()
The HeadFinder to use when extracting typed dependencies.
|
dependencyGrammarExtractor, dependencyObjectify, getInputEncoding, getOutputEncoding, isEvalGF, MLEDependencyGrammarSmoothingParams, parsevalObjectify, parsevalObjectify, ppAttachmentEval, processHeadWord, pw, setEvalGF, setEvaluateGrammaticalFunctions, setInputEncoding, setOutputEncoding, treebank, treeTokenizerFactory, typedDependencyClasser, typedDependencyObjectify, unorderedTypedDependencyObjectify, unorderedUntypedDependencyObjectify, untypedDependencyObjectify
public HeadFinder headFinder()
AbstractTreebankParserParams
headFinder
in interface TreebankLangParserParams
headFinder
in class AbstractTreebankParserParams
public HeadFinder typedDependencyHeadFinder()
AbstractTreebankParserParams
typedDependencyHeadFinder
in interface TreebankLangParserParams
typedDependencyHeadFinder
in class AbstractTreebankParserParams
public DiskTreebank diskTreebank()
diskTreebank
in interface TreebankLangParserParams
diskTreebank
in class AbstractTreebankParserParams
public MemoryTreebank memoryTreebank()
memoryTreebank
in interface TreebankLangParserParams
memoryTreebank
in class AbstractTreebankParserParams
public TreeReaderFactory treeReaderFactory()
public MemoryTreebank testMemoryTreebank()
testMemoryTreebank
in interface TreebankLangParserParams
testMemoryTreebank
in class AbstractTreebankParserParams
public TreeTransformer collinizer()
collinizer
in interface TreebankLangParserParams
collinizer
in class AbstractTreebankParserParams
public TreeTransformer collinizerEvalb()
AbstractTreebankParserParams
collinizerEvalb
in interface TreebankLangParserParams
collinizerEvalb
in class AbstractTreebankParserParams
public TreebankLanguagePack treebankLanguagePack()
treebankLanguagePack
in interface TreebankLangParserParams
treebankLanguagePack
in class AbstractTreebankParserParams
public PrintWriter pw(OutputStream o)
pw
in interface TreebankLangParserParams
pw
in class AbstractTreebankParserParams
public Lexicon lex(Options op, Index<String> wordIndex, Index<String> tagIndex)
TreebankLangParserParams
Lexicon
object suitable to the particular language/treebank combination of interest.lex
in interface TreebankLangParserParams
lex
in class AbstractTreebankParserParams
op
- Options as to how the Lexicon behavespublic String[] sisterSplitters()
AbstractTreebankParserParams
sisterSplitters
in interface TreebankLangParserParams
sisterSplitters
in class AbstractTreebankParserParams
public TreeTransformer subcategoryStripper()
subcategoryStripper
in interface TreebankLangParserParams
subcategoryStripper
in class AbstractTreebankParserParams
public Tree transformTree(Tree t, Tree root)
t
. It changes both
labels and the tree shape.transformTree
in interface TreebankLangParserParams
transformTree
in class AbstractTreebankParserParams
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)public void display()
AbstractTreebankParserParams
display
in interface TreebankLangParserParams
display
in class AbstractTreebankParserParams
public int setOptionFlag(String[] args, int i)
setOptionFlag
in interface TreebankLangParserParams
setOptionFlag
in class AbstractTreebankParserParams
args
- Array of command line argumentsi
- Index in command line arguments to try to process as an optionpublic List<Word> defaultTestSentence()
public List<GrammaticalStructure> readGrammaticalStructureFromFile(String filename)
TreebankLangParserParams
readGrammaticalStructureFromFile
in interface TreebankLangParserParams
readGrammaticalStructureFromFile
in class AbstractTreebankParserParams
public GrammaticalStructure getGrammaticalStructure(Tree t, java.util.function.Predicate<String> filter, HeadFinder hf)
TreebankLangParserParams
getGrammaticalStructure
in interface TreebankLangParserParams
getGrammaticalStructure
in class AbstractTreebankParserParams
public boolean supportsBasicDependencies()
AbstractTreebankParserParams
supportsBasicDependencies
in interface TreebankLangParserParams
supportsBasicDependencies
in class AbstractTreebankParserParams
public String[] defaultCoreNLPFlags()
TreebankLangParserParams
defaultCoreNLPFlags
in interface TreebankLangParserParams
defaultCoreNLPFlags
in class AbstractTreebankParserParams
public static void main(String[] args)