* Check serializer freqs exist before loading

This commit is contained in:
Matthew Honnibal 2015-09-12 23:49:38 +02:00
parent a412c66c8c
commit e1dfaeed8a
1 changed files with 1 additions and 1 deletions

View File

@ -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)