diff --git a/deeppavlov/vocabs/typos.py b/deeppavlov/vocabs/typos.py index c64e992669..b6d7e43939 100644 --- a/deeppavlov/vocabs/typos.py +++ b/deeppavlov/vocabs/typos.py @@ -62,8 +62,10 @@ def __init__(self, data_dir: [Path, str] = '', *args, dictionary_name: str = 'di words = {self._normalize(word) for word in words} alphabet = {c for w in words for c in w} - alphabet.remove('⟬') - alphabet.remove('⟭') + if '⟬' in alphabet: + alphabet.remove('⟬') + if '⟭' in alphabet: + alphabet.remove('⟭') save_pickle(alphabet, alphabet_path) save_pickle(words, words_path)