From 8978806ea677f9de208fb5facc16ce7afaa692a2 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 21 Dec 2016 18:05:23 +0100 Subject: [PATCH] Allow Vocab to load without serializer_freqs --- spacy/vocab.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index e3eb8a0b2..a44c1461a 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -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)