public interface TreebankLangParserParams extends TreebankFactory, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
AbstractCollinizer |
collinizer()
The tree transformer applied to trees prior to evaluation.
|
AbstractCollinizer |
collinizerEvalb()
the tree transformer used to produce trees for evaluation.
|
java.lang.String[] |
defaultCoreNLPFlags()
When run inside StanfordCoreNLP, which flags should be used by default.
|
java.util.List<? extends HasWord> |
defaultTestSentence()
Return a default sentence of the language (for testing).
|
Extractor<DependencyGrammar> |
dependencyGrammarExtractor(Options op,
Index<java.lang.String> wordIndex,
Index<java.lang.String> tagIndex) |
DiskTreebank |
diskTreebank()
returns a DiskTreebank appropriate to the treebank source
|
void |
display()
display language-specific settings
|
boolean |
generateOriginalDependencies()
Whether to generate original Stanford Dependencies or the newer
Universal Dependencies.
|
GrammaticalStructure |
getGrammaticalStructure(Tree t,
java.util.function.Predicate<java.lang.String> filter,
HeadFinder hf)
Build a GrammaticalStructure from a Tree.
|
java.lang.String |
getInputEncoding()
Returns the input encoding being used.
|
java.lang.String |
getOutputEncoding()
Returns the output encoding being used.
|
HeadFinder |
headFinder() |
Lexicon |
lex(Options op,
Index<java.lang.String> wordIndex,
Index<java.lang.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
|
double[] |
MLEDependencyGrammarSmoothingParams()
Give the parameters for smoothing in the MLEDependencyGrammar.
|
AbstractEval |
ppAttachmentEval()
Returns a language specific object for evaluating PP attachment
|
Label |
processHeadWord(Label headWord)
Allows language specific processing (e.g., stemming) of head words.
|
java.io.PrintWriter |
pw()
returns a PrintWriter used to print output.
|
java.io.PrintWriter |
pw(java.io.OutputStream o)
returns a PrintWriter used to print output to the OutputStream
o.
|
java.util.List<GrammaticalStructure> |
readGrammaticalStructureFromFile(java.lang.String filename)
Returns a function which reads the given filename and turns its
content in a list of GrammaticalStructures.
|
void |
setEvaluateGrammaticalFunctions(boolean evalGFs)
If evalGFs = true, then the evaluation of parse trees will include evaluation on grammatical functions.
|
void |
setGenerateOriginalDependencies(boolean originalDependencies)
Set whether to generate original Stanford Dependencies or the newer
Universal Dependencies.
|
void |
setInputEncoding(java.lang.String encoding) |
int |
setOptionFlag(java.lang.String[] args,
int i)
Set a language-specific option according to command-line flags.
|
void |
setOutputEncoding(java.lang.String encoding) |
java.lang.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()
Whether our code provides support for converting phrase structure
(constituency) parses to (basic) dependency parses.
|
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.
|
Treebank |
treebank()
Required to extend TreebankFactory
|
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
|
TreeReaderFactory |
treeReaderFactory()
Returns a factory for reading in trees from the source you want.
|
TokenizerFactory<Tree> |
treeTokenizerFactory() |
HeadFinder |
typedDependencyHeadFinder() |
HeadFinder headFinder()
HeadFinder typedDependencyHeadFinder()
Label processHeadWord(Label headWord)
void setInputEncoding(java.lang.String encoding)
void setOutputEncoding(java.lang.String encoding)
void setEvaluateGrammaticalFunctions(boolean evalGFs)
java.lang.String getOutputEncoding()
java.lang.String getInputEncoding()
TreeReaderFactory treeReaderFactory()
Lexicon lex(Options op, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex)
Lexicon
object suitable to the particular language/treebank combination of interest.op
- Options as to how the Lexicon behavesAbstractCollinizer collinizer()
AbstractCollinizer collinizerEvalb()
MemoryTreebank memoryTreebank()
DiskTreebank diskTreebank()
MemoryTreebank testMemoryTreebank()
Treebank treebank()
treebank
in interface TreebankFactory
TreebankLanguagePack treebankLanguagePack()
java.io.PrintWriter pw()
java.io.PrintWriter pw(java.io.OutputStream o)
java.lang.String[] sisterSplitters()
TreeTransformer subcategoryStripper()
Tree transformTree(Tree t, Tree root)
t
. It changes both
labels and the tree shape.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)void display()
int setOptionFlag(java.lang.String[] args, int i)
args
- Array of command line argumentsi
- Index in command line arguments to try to process as an optionjava.util.List<? extends HasWord> defaultTestSentence()
TokenizerFactory<Tree> treeTokenizerFactory()
Extractor<DependencyGrammar> dependencyGrammarExtractor(Options op, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex)
double[] MLEDependencyGrammarSmoothingParams()
AbstractEval ppAttachmentEval()
AbstractEval
java.util.List<GrammaticalStructure> readGrammaticalStructureFromFile(java.lang.String filename)
GrammaticalStructure getGrammaticalStructure(Tree t, java.util.function.Predicate<java.lang.String> filter, HeadFinder hf)
boolean supportsBasicDependencies()
void setGenerateOriginalDependencies(boolean originalDependencies)
originalDependencies
- Whether to generate SDboolean generateOriginalDependencies()
java.lang.String[] defaultCoreNLPFlags()