>


word/predict

Predict the most likely words based on what is to the left, right, and/or the prefix of the current word.

Parameter Required Description Valid values Default
left no Left text context One or more words separated by spaces (none)
right no Right text context One or more words separated by spaces (none)
prefix no Prefix of current word Sequence of one or more characters (none)
num no Number of results Positive integer 5
vocab no Filter to words in this vocabulary 1k, 5k, 10k, 20k, 40k, 100k, 500k 100k
sort no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability, largest first
rev-logprob = log probability, smallest first
logprob
safe no Safe mode, filters obscene words. true or false false
lang no Language code Language to use (see list) en

Example:


character/predict

Get the probability of all next characters given the left text context.

Parameter Required Description Valid values Default
left no Left text context A sequence of characters (none)
sort no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability of next character, largest first
rev-logprob = log probability of next character, smallest first
logprob-next = character set max log probability, largest first
rev-logprob-next = character set log probability, smallest first
alpha
lang no Language code Language to use (see list) en

Example: