Update Cosine Similarity, Levenshein Distance, Segmentation, Spell Check

Segmentation, Spell Check: refer to Peter Norvig’s blog
(norvig.com/spell-correct.html)