|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.text.model.UnigramModel
public class UnigramModel
Unigram Language Model
Constructor Summary | |
---|---|
UnigramModel()
|
Method Summary | |
---|---|
int |
getFrequency(java.lang.String s)
|
double |
getTotalWordCount()
|
void |
incrementFrequency(java.lang.String s)
|
void |
load(java.io.File file)
Load a file where each line contains a |
static void |
main(java.lang.String[] args)
|
void |
save(java.io.File file)
Save a unigram model |
double |
score(Span span)
Return log Prob(span|model). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnigramModel()
Method Detail |
---|
public void load(java.io.File file) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public void save(java.io.File file) throws java.io.IOException
java.io.IOException
public double score(Span span)
public double getTotalWordCount()
public int getFrequency(java.lang.String s)
public void incrementFrequency(java.lang.String s)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |