mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 20:00:01 +02:00
🐛 Update editops() and seq_align() due to RapidFuzz API changes
This commit is contained in:
parent
15dfbac3a7
commit
c4e85da5ab
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ def seq_align(s1, s2):
|
||||||
try:
|
try:
|
||||||
ot = ops[0]
|
ot = ops[0]
|
||||||
if ot[1] == i and ot[2] == j:
|
if ot[1] == i and ot[2] == j:
|
||||||
ops = ops[1:]
|
del ops[0]
|
||||||
o = ot
|
o = ot
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -40,4 +40,4 @@ def editops(word1, word2):
|
||||||
"""
|
"""
|
||||||
word1 = list(grapheme_clusters(unicodedata.normalize("NFC", word1)))
|
word1 = list(grapheme_clusters(unicodedata.normalize("NFC", word1)))
|
||||||
word2 = list(grapheme_clusters(unicodedata.normalize("NFC", word2)))
|
word2 = list(grapheme_clusters(unicodedata.normalize("NFC", word2)))
|
||||||
return Levenshtein.editops(word1, word2)
|
return Levenshtein.editops(word1, word2).as_list()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue