diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 6f711260b..a3d6b999b 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -47,7 +47,10 @@ cdef class Vocab: tag_map = json.load(open(path.join(data_dir, 'tag_map.json'))) lemmatizer = Lemmatizer.from_dir(path.join(data_dir, '..')) - serializer_freqs = json.load(open(path.join(data_dir, 'serializer.json'))) + if path.exists(path.join(data_dir, 'serializer.json')): + serializer_freqs = json.load(open(path.join(data_dir, 'serializer.json'))) + else: + serialize_feqs=None cdef Vocab self = cls(get_lex_attr=get_lex_attr, vectors=vectors, tag_map=tag_map, lemmatizer=lemmatizer, serializer_freqs=serializer_freqs)