Skip to main content

containment

Function containment 

Source
pub fn containment(a: &str, b: &str) -> f64
Expand description

How much of the smaller text’s vocabulary the larger one already contains, from 0.0 to 1.0.

Containment rather than Jaccard on purpose: a one line title and a paragraph describing the same defect should read as the same point, and Jaccard punishes them for differing in length.