[#58526092] cosine similarity macro + tests; piggback fix to NGramTokeni...

...ze