diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index e3eb8a0b2..a44c1461a 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -96,6 +96,8 @@ cdef class Vocab: if serializer_freqs is True and (path / 'vocab' / 'serializer.json').exists(): with (path / 'vocab' / 'serializer.json').open('r', encoding='utf8') as file_: serializer_freqs = json.load(file_) + else: + serializer_freqs = None cdef Vocab self = cls(lex_attr_getters=lex_attr_getters, tag_map=tag_map, lemmatizer=lemmatizer, serializer_freqs=serializer_freqs)