B
B
bublov2019-11-09 13:17:37
Python
bublov, 2019-11-09 13:17:37

How to make Damerau-Levenshtein algorithm using list in Python?

The point is that the words are stored in a list and it is necessary to check which element with the original word has the least length. There are many algorithms on the Internet, but only two words, but the list is large and it will take a very long time to do it by brute force. How can this process be optimized?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Dugin, 2019-11-09
@adugin Куратор тега Python

from difflib import SequenceMatcher

D
Dimonchik, 2019-11-09
@dimonchik2013

подойти итерационно
типа ИНДЕКС

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question