public static interface LanguageModel.Conditional extends LanguageModel
LanguageModel.Conditionalis a language model that implements conditional estimates of characters given previous characters. A conditional model should also be marked as either a
A conditional language model should have conditional estimates that are appropriate for the joint estimates. For a process language model:
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.
= Σstart < i <= end log2ConditionalEstimate(cs,start,i)
|Modifier and Type||Method and Description|
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.
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.
Returns the array of characters that have been observed for this model.
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.