|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams
public abstract class AbstractTreebankParserParams
An abstract class providing a common method base from which to
complete a TreebankLangParserParams implementing class.
| Nested Class Summary | |
|---|---|
protected class |
AbstractTreebankParserParams.SubcategoryStripper
|
| Field Summary | |
|---|---|
protected String |
inputEncoding
|
protected String |
outputEncoding
|
protected TreebankLanguagePack |
tlp
|
| Constructor Summary | |
|---|---|
protected |
AbstractTreebankParserParams(TreebankLanguagePack tlp)
Stores the passed-in TreebankLanguagePack. |
| Method Summary | ||
|---|---|---|
abstract TreeTransformer |
collinizer()
the tree transformer used to produce trees for evaluation. |
|
abstract TreeTransformer |
collinizerEvalb()
the tree transformer used to produce trees for evaluation. |
|
edu.stanford.nlp.parser.lexparser.Extractor |
dependencyGrammarExtractor(Options op)
|
|
static
|
dependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer,
DependencyTyper<E> typer)
Returns the set of dependencies in a tree, according to some DependencyTyper. |
|
abstract void |
display()
display language-specific settings |
|
String |
getInputEncoding()
Returns the input encoding being used. |
|
String |
getOutputEncoding()
Returns the output encoding being used. |
|
abstract HeadFinder |
headFinder()
the HeadFinder to use for your treebank. |
|
Lexicon |
lex()
|
|
Lexicon |
lex(Options.LexOptions op)
|
|
abstract MemoryTreebank |
memoryTreebank()
returns a MemoryTreebank appropriate to the treebank source |
|
double[] |
MLEDependencyGrammarSmoothingParams()
Give the parameters for smoothing in the MLEDependencyGrammar. |
|
static Collection<Constituent> |
parsevalObjectify(Tree t,
TreeTransformer collinizer)
Takes a Tree and a collinizer and returns a Collection of labeled Constituents for PARSEVAL. |
|
static Collection<Constituent> |
parsevalObjectify(Tree t,
TreeTransformer collinizer,
boolean labelConstituents)
Takes a Tree and a collinizer and returns a Collection of Constituents for
PARSEVAL evaluation. |
|
PrintWriter |
pw()
The PrintWriter used to print output. |
|
PrintWriter |
pw(OutputStream o)
The PrintWriter used to print output. |
|
void |
setInputEncoding(String encoding)
Sets the input encoding. |
|
abstract int |
setOptionFlag(String[] args,
int i)
Set language-specific options according to flags. |
|
void |
setOutputEncoding(String encoding)
Sets the output encoding. |
|
abstract 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. |
|
MemoryTreebank |
testMemoryTreebank()
You can often return the same thing for testMemoryTreebank as for memoryTreebank |
|
abstract Tree |
transformTree(Tree t,
Tree root)
This method does language-specific tree transformations such as annotating particular nodes with language-relevant features. |
|
TreebankLanguagePack |
treebankLanguagePack()
Returns an appropriate treebankLanguagePack |
|
TokenizerFactory<Tree> |
treeTokenizerFactory()
|
|
static EquivalenceClasser<List<String>> |
typedDependencyClasser()
returns an EquivalenceClasser that classes typed dependencies by the syntactic categories of mother, head and daughter, plus direction. |
|
static Collection<List<String>> |
typedDependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer)
Returns a collection of word-word dependencies typed by mother, head, daughter node syntactic categories. |
|
static Collection<List<String>> |
untypedDependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer)
Returns a collection of untyped word-word dependencies for the tree. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.stanford.nlp.parser.lexparser.TreebankLangParserParams |
|---|
defaultTestSentence, diskTreebank, treeReaderFactory |
| Field Detail |
|---|
protected String inputEncoding
protected String outputEncoding
protected TreebankLanguagePack tlp
| Constructor Detail |
|---|
protected AbstractTreebankParserParams(TreebankLanguagePack tlp)
| Method Detail |
|---|
public void setInputEncoding(String encoding)
setInputEncoding in interface TreebankLangParserParamspublic void setOutputEncoding(String encoding)
setOutputEncoding in interface TreebankLangParserParamspublic String getOutputEncoding()
getOutputEncoding in interface TreebankLangParserParamspublic String getInputEncoding()
getInputEncoding in interface TreebankLangParserParamspublic abstract MemoryTreebank memoryTreebank()
memoryTreebank in interface TreebankLangParserParamspublic MemoryTreebank testMemoryTreebank()
testMemoryTreebank in interface TreebankLangParserParamspublic PrintWriter pw()
pw in interface TreebankLangParserParamspublic PrintWriter pw(OutputStream o)
pw in interface TreebankLangParserParamspublic TreebankLanguagePack treebankLanguagePack()
treebankLanguagePack in interface TreebankLangParserParamspublic abstract HeadFinder headFinder()
headFinder in interface TreebankLangParserParamspublic Lexicon lex()
public Lexicon lex(Options.LexOptions op)
lex in interface TreebankLangParserParamspublic double[] MLEDependencyGrammarSmoothingParams()
MLEDependencyGrammarSmoothingParams in interface TreebankLangParserParams
public static Collection<Constituent> parsevalObjectify(Tree t,
TreeTransformer collinizer)
Constituents for PARSEVAL.
t - The tree to extract constituents fromcollinizer - The TreeTransformer used to normalize the tree for
evaluation
public static Collection<Constituent> parsevalObjectify(Tree t,
TreeTransformer collinizer,
boolean labelConstituents)
Constituents for
PARSEVAL evaluation. Some notes on this particular parseval:
labelConstituents
parameter
public static Collection<List<String>> untypedDependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer)
public static Collection<List<String>> typedDependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer)
public static <E> Collection<E> dependencyObjectify(Tree t,
HeadFinder hf,
TreeTransformer collinizer,
DependencyTyper<E> typer)
DependencyTyper.
public static EquivalenceClasser<List<String>> typedDependencyClasser()
public abstract TreeTransformer collinizer()
collinizer in interface TreebankLangParserParamspublic abstract TreeTransformer collinizerEvalb()
collinizerEvalb in interface TreebankLangParserParamspublic abstract String[] sisterSplitters()
sisterSplitters in interface TreebankLangParserParamspublic TreeTransformer subcategoryStripper()
subcategoryStripper in interface TreebankLangParserParams
public abstract Tree transformTree(Tree t,
Tree root)
t. It changes both
labels and the tree shape.
transformTree in interface TreebankLangParserParamst - 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 abstract void display()
display in interface TreebankLangParserParams
public abstract int setOptionFlag(String[] args,
int i)
setOptionFlag in interface TreebankLangParserParamsargs - Array of command line argumentsi - Index in command line arguments to try to process as an option
public TokenizerFactory<Tree> treeTokenizerFactory()
treeTokenizerFactory in interface TreebankLangParserParamspublic edu.stanford.nlp.parser.lexparser.Extractor dependencyGrammarExtractor(Options op)
dependencyGrammarExtractor in interface TreebankLangParserParams
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||