|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UnknownWordModel
Method Summary | |
---|---|
Lexicon |
getLexicon()
Returns the lexicon used by this unknown word model; lexicon is used to check information about words being seen/unseen |
String |
getSignature(String word,
int loc)
This routine returns a String that is the "signature" of the class of a word. |
int |
getSignatureIndex(int wordIndex,
int sentencePosition)
|
int |
getUnknownLevel()
Get the level of equivalence classing for the model. |
void |
readData(BufferedReader in)
|
double |
score(IntTaggedWord iTW,
int loc)
Get the score of this word with this tag (as an IntTaggedWord) at this loc. |
void |
setLexicon(Lexicon l)
Connect the unknown word model to a specific lexicon; often required to set a lexicon prior to using the model. |
void |
setUnknownLevel(int unknownLevel)
One unknown word model may allow different options to be set; for example, several models of unknown words for a given language could be included in one class. |
void |
train(Collection<Tree> trees)
Trains this unknown word model on the Collection of trees. |
Method Detail |
---|
void setUnknownLevel(int unknownLevel)
int getUnknownLevel()
Lexicon getLexicon()
void setLexicon(Lexicon l)
l
- void train(Collection<Tree> trees)
double score(IntTaggedWord iTW, int loc)
iTW
- An IntTaggedWord pairing a word and POS tagloc
- The position in the sentence. In the default implementation
this is used only for unknown words to change their
probability distribution when sentence initial.
String getSignature(String word, int loc)
word
- The word to make a signature forloc
- Its position in the sentence (mainly so sentence-initial
capitalized words can be treated differently)
int getSignatureIndex(int wordIndex, int sentencePosition)
void readData(BufferedReader in) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |