Compute the similarity of two strings based on the trigram (n-gram) method