Trying to implement words grouping by similarity