Allow Vocab to load without serializer_freqs

This commit is contained in:
Ines Montani 2016-12-21 18:05:23 +01:00
parent be8ed811f6
commit 8978806ea6
1 changed files with 2 additions and 0 deletions

View File

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