diff --git a/umbra/mistake_finder.py b/umbra/mistake_finder.py index 8587e1bd14972ab7c37faeb5314a5f9c08b158f5..6165263553de4fbd78fcb2152c980c638028338e 100644 --- a/umbra/mistake_finder.py +++ b/umbra/mistake_finder.py @@ -30,6 +30,8 @@ class MistakeFinder: # Loop over the shadow: for index, word in enumerate(self._shadow): if not word.correct and word.mistake is None: + if word.word == "geen": + print("boo") self._determine_mistake(index, word) # Loop over the source: for word in self._source: diff --git a/umbra/words.py b/umbra/words.py index f65e5d7dff38a06969c70bb3c3246446e5fec2fe..6629ddb493b1f0f6ac7cf9a9f3dda24a5ca22fa9 100644 --- a/umbra/words.py +++ b/umbra/words.py @@ -242,6 +242,12 @@ class Sentence(list): def __init__(self, words): super().__init__(words) + def index(self, word): + for index in range(0, len(self)): + if self[index].onset == word.onset: + return index + return -1 + def find_previous_anchor(self, index): """Find the index of the last anchor before specified index.