mirror of https://github.com/explosion/spaCy.git
* Check serializer freqs exist before loading
This commit is contained in:
parent
a412c66c8c
commit
e1dfaeed8a
|
@ -50,7 +50,7 @@ cdef class Vocab:
|
||||||
if path.exists(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')))
|
serializer_freqs = json.load(open(path.join(data_dir, 'serializer.json')))
|
||||||
else:
|
else:
|
||||||
serialize_feqs=None
|
serializer_freqs = None
|
||||||
cdef Vocab self = cls(get_lex_attr=get_lex_attr, vectors=vectors, tag_map=tag_map,
|
cdef Vocab self = cls(get_lex_attr=get_lex_attr, vectors=vectors, tag_map=tag_map,
|
||||||
lemmatizer=lemmatizer, serializer_freqs=serializer_freqs)
|
lemmatizer=lemmatizer, serializer_freqs=serializer_freqs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue