From 8e7df3c4cafdf589750987a0197876a5e21a1045 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 27 Sep 2016 14:02:12 +0200 Subject: [PATCH] Expect the parser data, if parser.load() is called. --- spacy/syntax/parser.pyx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 0584c6e68..86f4a93f7 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -80,9 +80,8 @@ cdef class ParserModel(AveragedPerceptron): cdef class Parser: @classmethod def load(cls, path, Vocab vocab, moves_class): - if (path / 'config.json').exists(): - with (path / 'config.json').open() as file_: - cfg = json.load(file_) + with (path / 'config.json').open() as file_: + cfg = json.load(file_) moves = moves_class(vocab.strings, cfg['labels']) templates = get_templates(cfg['features']) model = ParserModel(templates)