public interface LanguageModel
sequence of tokens
, given its underlying vocabulary.Modifier and Type | Method and Description |
---|---|
double |
calculateProbability(String... tokens)
Calculate the probability of a series of tokens (e.g.
|
double |
calculateProbability(StringList tokens)
Deprecated.
|
String[] |
predictNextTokens(String... tokens)
Predict the most probable output sequence of tokens, given an input sequence of tokens.
|
StringList |
predictNextTokens(StringList tokens)
Deprecated.
|
@Deprecated double calculateProbability(StringList tokens)
calculateProbability(String...)
tokens
- the text tokens to calculate the probability fordouble calculateProbability(String... tokens)
tokens
- the text tokens to calculate the probability for@Deprecated StringList predictNextTokens(StringList tokens)
predictNextTokens(String...)
tokens
- a sequence of tokensCopyright © 2020 The Apache Software Foundation. All rights reserved.