Answer the question
In order to leave comments, you need to log in
How can I implement word comparison taking into account word forms in Golang?
How can words be compared taking into account word forms? Are there ready-made algorithms that allow you to get an abstract function that will work like thiscompareWords(first string, second string) bool
compareWords("автомобиль", "автомобильный") == true
compareWords("автомобиль", "aвиационный") == false
Levenshtein distance
did not fit, since this algorithm, for example, considers the words инициация
and to be similar ИИ
. Too many false positives.
Answer the question
In order to leave comments, you need to log in
As already answered, you need a stemmer to normalize words.
Concrete implementation in Go:
https://github.com/blevesearch/snowballstem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question