Function got_ya_id::similarity::cosine::cosine_similarity [−][src]
pub async fn cosine_similarity(text1: &str, text2: &str) -> f64
Finds the cosine similarity between two strings
Arguments
text1, text2
REMOVED in favour of a uniform alphanumeric pattern regex: Name of the Mathing pattern The default metric used is similarity in the string’s alphaneumerics (“\w”). To base the similarity on words(“\w+”) instead, specify regex=words