Java implementation of Levensthein words algorithm