Returns the average per-word perplexity of a sentence under the word language model.
Parameter | Required | Description | Valid values | Default |
---|---|---|---|---|
text | yes | Sentence text | Sequence of words separated by spaces | (none) |
lang | no | Language code | Language to use (see list) | en |
Example:
Returns the average per-character perplexity of a sentence under the character language model.
Parameter | Required | Description | Valid values | Default |
---|---|---|---|---|
text | yes | Sentence text | Sequence of characters | (none) |
lang | no | Language code | Language to use (see list) | en |
Example: