Changed search mathid in grup_words_by_cores

old: if word =~ /^#{cores[0]}/
new: if word =~ /#{cores[0]}/