public static interface LanguageModel.Tokenized extends LanguageModel
LanguageModel.Tokenized provides a means of
estimating the probability of a sequence of tokens. These may
be returned in either linear or log form.LanguageModel.Conditional, LanguageModel.Dynamic, LanguageModel.Process, LanguageModel.Sequence, LanguageModel.Tokenized| Modifier and Type | Method and Description |
|---|---|
double |
tokenLog2Probability(String[] tokens,
int start,
int end)
Returns the log (base 2) probability of the specified
token slice in the underlying token n-gram distribution.
|
double |
tokenProbability(String[] tokens,
int start,
int end)
Returns the probability of the specified token slice in the
token n-gram distribution.
|
log2Estimate, log2Estimatedouble tokenLog2Probability(String[] tokens, int start, int end)
tokens - Underlying array of tokens.start - Index of first token in slice.end - Index of one past the last token in the slice.double tokenProbability(String[] tokens, int start, int end)
tokens - Underlying array of tokens.start - Index of first token in slice.end - Index of one past the last token in the slice.Copyright © 2016 Alias-i, Inc.. All rights reserved.