fix some bugs in algorithm
Merge branch 'master' of https://github.com/KatrinP/Language-recognizer