Skip to main content

bigram_perplexity

Function bigram_perplexity 

Source
pub fn bigram_perplexity(text: &str) -> f64
Expand description

Compute character-class bigram perplexity for a string.

Returns the perplexity score — higher values indicate more “random” text. Natural English text typically scores 3-8; adversarial suffixes score 15+.