1
0
Fork 0
mirror of https://github.com/qurator-spk/dinglehopper.git synced 2025-07-01 14:40:00 +02:00

🚧 dinglehopper: Test aligning by character while retaining segment id info

This commit is contained in:
Gerber, Mike 2020-06-11 14:50:32 +02:00
parent 98f6c68df7
commit 1b9497dfb0

View file

@ -52,6 +52,8 @@ def test_align():
for left, right in seq_align(grapheme_clusters(test1.text), grapheme_clusters(test2.text)):
left_id = test1.segment_id_for_pos(left_pos) if left is not None else None
right_id = test2.segment_id_for_pos(right_pos) if right is not None else None
# XXX note that deletions and inserts only produce one id + None, UI must
# support this, i.e. display for the one id produced
el = AlignmentElement(left, right, left_id, right_id)
alignment.append(el)
if left is not None: