diff --git a/source/spell_checker.py b/source/spell_checker.py index 8a715e5..a6fbe7d 100644 --- a/source/spell_checker.py +++ b/source/spell_checker.py @@ -30,7 +30,9 @@ def prediction(self, sentence: List[str], k: Optional[int] = 10, :return a list of word of a sentence :rtype List[str] """ - + # Removing empty string (" ") from the list of words in a sentence + sentence = [item for item in sentence if item != ''] + __ner_prediction: List[NERModelPrediction] = self._get_ner_prediction(sentence + ["ред"]) # print(__ner_prediction) __masked_sentences: List[List[str]] = self.__create_mask(sentence)