pub fn compute_entropy(text: &str) -> f64
Compute Shannon entropy for a string (public for use by EntropyAnalyzer).