Function fragment::matching::similarity [] [src]

pub fn similarity(query: &str, data: &str) -> f32

Looks for space delimited terms in query that occur in data, returning a score between 0 and 1, based on the percentage of letters covered in data. Queries with terms that do not exist in data return a score of 0.