Skip to content
Snippets Groups Projects
Commit 2188f908 authored by Haak, R. (Romeo)'s avatar Haak, R. (Romeo)
Browse files

Removed shadow and source.reverse statements and removed the statements where...

Removed shadow and source.reverse statements and removed the statements where the shadowed attribute was set to True when words were aligned due to some mistake.
parent d482341c
No related branches found
No related tags found
1 merge request!148Sc 160/private calls and bugs cleanup
......@@ -156,9 +156,6 @@ class NeedlemanWunsch(AlignmentStrategy):
self._shadow[i - 1].mistake = Mistake.REPETITION
i -= 1
alignment_source.reverse()
alignment_shadow.reverse()
def _check_repetition(self, index):
"""Check whether the ShadowWord at the given index is repeated.
......@@ -223,17 +220,14 @@ class NeedlemanWunsch(AlignmentStrategy):
shadow.correct = True
source.shadow = shadow
elif self._seman_checker.related(source.word, shadow.word):
source.shadowed = True
source.mistake = Mistake.SEMANTIC
shadow.mistake = Mistake.SEMANTIC
source.shadow = shadow
elif self._form_checker.related(source.word, shadow.word):
source.shadowed = True
source.mistake = Mistake.FORM
shadow.mistake = Mistake.FORM
source.shadow = shadow
elif self._phon_checker.related(source.word, shadow.word):
source.shadowed = True
source.mistake = Mistake.PHONETIC
shadow.mistake = Mistake.PHONETIC
source.shadow = shadow
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment