Returns cosine similarity of a and b when treated as bags of words.
a
b
double textSimilarity(String a, String b) => cosineSimilarity(textToTf(a), textToTf(b));