|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface LanguageModel.Conditional
A LanguageModel.Conditional is a language model
that implements conditional estimates of characters given
previous characters. A conditional model should also be marked
as either a LanguageModel.Process or LanguageModel.Sequence model.
A conditional language model should have conditional estimates that are appropriate for the joint estimates. For a process language model:
log2Estimate(cs,start,end)
=
Σstart < i <= end
log2ConditionalEstimate(cs,start,i)
For a sequence language model, the situation is more complex.
The joint estimate includes an estimate of the end-of-stream or
a length estimate in addition to the per-character conditional
log estimate.
| Nested Class Summary |
|---|
| 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 cSeq)
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. |
char[] |
observedCharacters()
Returns the array of characters that have been observed for this model. |
| Methods inherited from interface com.aliasi.lm.LanguageModel |
|---|
log2Estimate, log2Estimate |
| Method Detail |
|---|
double log2ConditionalEstimate(char[] cs,
int start,
int end)
cs - Underlying array of characters.start - Index of first character in slice.end - One plus the index of the last character in the slice.
IndexOutOfBoundsException - If the start and end
minus one points are outside of the bounds of the character
array.double log2ConditionalEstimate(CharSequence cSeq)
cSeq - Character sequence to estimate.
IndexOutOfBoundsException - If the character sequence is
length zero.char[] observedCharacters()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||