|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.lm.CompiledNGramBoundaryLM
public class CompiledNGramBoundaryLM
A CompiledNGramBoundaryLM is constructed by reading
the serialized form of an instance of NGramBoundaryLM.
The serialization format is the boundary character followed by the serialization of an n-gram process language model.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.aliasi.lm.LanguageModel |
|---|
LanguageModel.Conditional, LanguageModel.Dynamic, LanguageModel.Process, LanguageModel.Sequence, LanguageModel.Tokenized |
| Nested classes/interfaces inherited from interface com.aliasi.lm.LanguageModel |
|---|
LanguageModel.Conditional, LanguageModel.Dynamic, LanguageModel.Process, LanguageModel.Sequence, LanguageModel.Tokenized |
| Method Summary | |
|---|---|
double |
log2ConditionalEstimate(char[] cs,
int start,
int end)
Returns the log (base 2) of the probability estimate for the conditional probability of the last character in the specified slice given the previous characters. |
double |
log2ConditionalEstimate(CharSequence cs)
Returns the log (base 2) of the probabilty estimate for the conditional probability of the last character in the specified character sequence given the previous characters. |
double |
log2Estimate(char[] cs,
int start,
int end)
Returns an estimate of the log (base 2) probability of the specified character slice. |
double |
log2Estimate(CharSequence cs)
Returns an estimate of the log (base 2) probability of the specified character sequence. |
double |
log2Prob(CharSequence cSeq)
This method is a convenience impelementation of the Model interface which delegates the call to log2Estimate(CharSequence). |
char[] |
observedCharacters()
Returns the characters that have been observed for this language model, including the special boundary character. |
double |
prob(CharSequence cSeq)
This method is a convenience implementation of the Model
interface which returns the result of raising 2.0 to the
power of the result of a call to log2Estimate(CharSequence). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public char[] observedCharacters()
observedCharacters in interface LanguageModel.Conditionalpublic double log2ConditionalEstimate(CharSequence cs)
LanguageModel.Conditional
log2ConditionalEstimate in interface LanguageModel.Conditionalcs - Character sequence to estimate.
public double log2ConditionalEstimate(char[] cs,
int start,
int end)
LanguageModel.Conditional
log2ConditionalEstimate in interface LanguageModel.Conditionalcs - Underlying array of characters.start - Index of first character in slice.end - One plus the index of the last character in the slice.
public double log2Estimate(CharSequence cs)
LanguageModel
log2Estimate in interface LanguageModelcs - Character sequence to estimate.
public double log2Estimate(char[] cs,
int start,
int end)
LanguageModel
log2Estimate in interface LanguageModelcs - Underlying array of characters.start - Index of first character in slice.end - One plus index of last character in slice.
public double log2Prob(CharSequence cSeq)
Model interface which delegates the call to log2Estimate(CharSequence).
log2Prob in interface Model<CharSequence>cSeq - Character sequence whose probability is returned.
public double prob(CharSequence cSeq)
Model
interface which returns the result of raising 2.0 to the
power of the result of a call to log2Estimate(CharSequence).
prob in interface Model<CharSequence>cSeq - Character sequence whose probability is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||