|
|||||||||
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(IntDependency dependency)
Score a IntDependency 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(IntDependency dependency)
Score an IntDependency in the reduced tagBin space 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. |
void |
setLexicon(Lexicon lexicon)
Set the Lexicon, which the DependencyGrammar may use in scoring P(w|t). |
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)
distance
- A distance in intervening words between head and arg
void tune(Collection<Tree> trees)
trees
- A Collection of Trees for use as a tuning data setdouble score(IntDependency dependency)
dependency
- The dependency object to be scored, in normal form.
double scoreTB(IntDependency 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
void setLexicon(Lexicon lexicon)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |