Skip to main content

token_coverage

Function token_coverage 

Source
pub fn token_coverage(content: &str, query: &str) -> f64
Expand description

Fraction of a query’s stopword-stripped terms present in content (stemming-aware).

For callers that need an abstention signal on retrieval paths without a matched_terms count (the FTS route). Score floors do not separate nonsense from real queries on the hosted corpus (measured 2026-09-22: nonsense up to 4.55, real from 2.06); coverage does.