From dc85294380406ee1d8e67cf4165d21409c7d24ff Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 12 Jun 2020 17:01:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=20dinglehopper:=20Document=20edito?= =?UTF-8?q?ps()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/dinglehopper/edit_distance.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qurator/dinglehopper/edit_distance.py b/qurator/dinglehopper/edit_distance.py index dc1cb24..a6643c7 100644 --- a/qurator/dinglehopper/edit_distance.py +++ b/qurator/dinglehopper/edit_distance.py @@ -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)