pub fn count_tokens(text: &str) -> usize {
text.split_whitespace().count()
}
pub fn token_savings(original: &str, filtered: &str) -> (f64, bool) {
let orig = count_tokens(original);
let filt = count_tokens(filtered);
if orig == 0 {
return (0.0, false);
}
let savings = 1.0 - (f64::from(filt as u32) / f64::from(orig as u32));
(savings * 100.0, savings >= 0.6)
}