|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Lexicon
An interface for lexicons
Field Summary | |
---|---|
static java.lang.String |
BOUNDARY
|
static java.lang.String |
BOUNDARY_TAG
|
static java.lang.String |
UNKNOWN_WORD
|
Method Summary | |
---|---|
boolean |
isKnown(int word)
Checks whether a word is in the lexicon. |
boolean |
isKnown(java.lang.String word)
Checks whether a word is in the lexicon. |
void |
readData(java.io.BufferedReader in)
Read the lexicon from the BufferedReader in the format written by writeData (an optional operation) |
java.util.Iterator |
ruleIteratorByWord(int word,
int loc)
Get an iterator over all rules with this word and loc |
double |
score(IntTaggedWord iTW,
int loc)
Get the score of this word with this tag (as an IntTaggedWord) at this loc (Presumably estimate of P(word | tag)) |
void |
train(java.util.Collection trees)
Trains this lexicon on the Collection of trees. |
void |
writeData(java.io.Writer w)
Write the lexicon in human readable format to the Writer (an optional operation) |
Field Detail |
---|
static final java.lang.String UNKNOWN_WORD
static final java.lang.String BOUNDARY
static final java.lang.String BOUNDARY_TAG
Method Detail |
---|
boolean isKnown(int word)
word
- The word as an int
boolean isKnown(java.lang.String word)
word
- The word as a String
java.util.Iterator ruleIteratorByWord(int word, int loc)
word
- loc
-
void train(java.util.Collection trees)
double score(IntTaggedWord iTW, int loc)
iTW
- loc
-
void writeData(java.io.Writer w) throws java.io.IOException
w
- the writer to output to
java.io.IOException
void readData(java.io.BufferedReader in) throws java.io.IOException
in
-
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |