mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 11:50:00 +02:00
📓 dinglehopper: Document editops()
This commit is contained in:
parent
e1c8546336
commit
dc85294380
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,11 @@ def seq_editops(seq1, seq2):
|
|||
|
||||
|
||||
def editops(word1, word2):
|
||||
# XXX Note that this returns indices to the _grapheme clusters_, not characters!
|
||||
"""
|
||||
Return sequence of edit operations transforming one string to another.
|
||||
|
||||
Note that this returns indices to the _grapheme clusters_, not characters!
|
||||
"""
|
||||
word1 = list(grapheme_clusters(unicodedata.normalize('NFC', word1)))
|
||||
word2 = list(grapheme_clusters(unicodedata.normalize('NFC', word2)))
|
||||
return seq_editops(word1, word2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue