From 7bcec133a4cf9b8c67e9346ee06282c410d64454 Mon Sep 17 00:00:00 2001 From: "Vriezen, E.C. (Emma)" <e.vriezen@student.ru.nl> Date: Mon, 16 Dec 2019 19:51:36 +0100 Subject: [PATCH] Non-anchor source words that are matched in the shadow algorithm have their shadow attribute set to the corresponding shadow word. --- umbra/anchor_algorithm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umbra/anchor_algorithm.py b/umbra/anchor_algorithm.py index d0d31ff2..7ea44023 100644 --- a/umbra/anchor_algorithm.py +++ b/umbra/anchor_algorithm.py @@ -82,6 +82,7 @@ class AnchorAlgorithm(AlignmentStrategy): found = True competing_over = None src_word.shadowed = True + src_word.shadow = shd_word shd_word.correct = True shd_word.source = src_word else: # If potential shadow is already flagged, store it @@ -89,6 +90,7 @@ class AnchorAlgorithm(AlignmentStrategy): # If true, then competing_over was wrongly flagged as correct: if competing_over is not None: competing_over.source.shadowed = False + competing_over.source.shadow = None competing_over.source = src_word # Shadow to new source word src_word.shadowed = True -- GitLab