 It is also possible to take a more principled approach to the statistics of "n"-grams, modeling similarity as the likelihood that two strings came from the same source directly in terms of a problem in Bayesian inference.