V
V
Veritas232019-12-29 12:03:54
Python
Veritas23, 2019-12-29 12:03:54

How to match strings to each other in Python?

Two columns are given, you need to automatically match the columns that are more similar to each other (that is, they contain more identical sequences of letters (words).
1 column:
Came - saw - defeated
Roger Rabbit
Vasilisa the Wise
2 column:
Who offended Roger Rabbit
Caesar: "came - I saw, I conquered"
Vasilisa from the fairy tale
Here you need to automatically make sure that each line from the second column is matched with the corresponding one from the first, something like this: I
came - I saw - I conquered ////// Caesar: " I came , I saw , I conquered " Roger
Rabbit ////// Who offended the rabbit and Roger and
Vasilisa the Wise ////// Vasilisa from the fairy tale

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-12-29
@Veritas23

Levenshtein distance
https://github.com/ztane/python-Levenshtein

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question