|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DependencyGrammar
An interface for DependencyGrammars.
Method Summary | |
---|---|
short |
distanceBin(int distance)
|
int |
numDistBins()
|
int |
numTagBins()
|
void |
readData(BufferedReader in)
Read from text grammar. |
double |
score(edu.stanford.nlp.parser.lexparser.Dependency dependency)
Score a Dependency according to the grammar. |
double |
score(int headWord,
int headTag,
int argWord,
int argTag,
boolean leftHeaded,
int dist)
Score a dependency according to the grammar, where the elements of the dependency are represented in separate paramters. |
double |
scoreTB(edu.stanford.nlp.parser.lexparser.Dependency dependency)
Score a Dependency according to the grammar. |
double |
scoreTB(int headWord,
int headTag,
int argWord,
int argTag,
boolean leftHeaded,
int dist)
Score a dependency according to the grammar, where the elements of the dependency are represented in separate paramters. |
int |
tagBin(int tag)
Converts a tag (coded as an integer via a Numberer) from its representation in the full tag space to the reduced (projected) tag space used in the DependencyGrammar. |
void |
tune(Collection<Tree> trees)
Tune free parameters on these trees. |
void |
writeData(PrintWriter w)
Write to text grammar. |
Method Detail |
---|
int numTagBins()
int tagBin(int tag)
tag
- An int encoding a tag (in the "tags" Numberer)
int numDistBins()
short distanceBin(int distance)
void tune(Collection<Tree> trees)
trees
- double score(edu.stanford.nlp.parser.lexparser.Dependency dependency)
dependency
- The dependency object to be scored, in normal form.
double scoreTB(edu.stanford.nlp.parser.lexparser.Dependency dependency)
dependency
- The dependency object to be scored, where the tags in
the dependency have already been mapped to a reduced space by a
tagProjection function.
double score(int headWord, int headTag, int argWord, int argTag, boolean leftHeaded, int dist)
double scoreTB(int headWord, int headTag, int argWord, int argTag, boolean leftHeaded, int dist)
void readData(BufferedReader in) throws IOException
in
-
IOException
void writeData(PrintWriter w) throws IOException
w
-
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |