similarity

Compute the cosine similarity between strings.

It is computed as V1.V2/(|V1|*|V2|) where V1 and V2 are vector representation of first and second.

Return

the cosine similarity in the range [0, 1].

Parameters

first

first string to compare.

second

second string to compare.