How to calculate the distance in the meaning of two words in Python

I am wondering if it is possible to calculate the distance / similarity between two related words in Python (for example, β€œfraud” and β€œtheft”). These two words are not synonyms per se, but they are clearly related. Are there any concepts / algorithms in NLP that can show this ratio numerically? Maybe through NLTK?

I am not looking for the Levenshtein distance, which refers to the individual characters that make up the word. I am looking for how it matters.

Would thank for the help provided.

+4
source share
2 answers

My suggestion is as follows:

  • , .
  • .
  • .

:

  • .
  • .

!...

  • , .
  • n (= 5 ) , .
  • , .
  • .
  • .
  • .
+2

, Word2Vec, FastText ..

gensim - Python, .

0

Source: https://habr.com/ru/post/1674710/


All Articles