mirror of https://github.com/explosion/spaCy.git
Allow Vocab to load without serializer_freqs
This commit is contained in:
parent
be8ed811f6
commit
8978806ea6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue