From 6ee1df93c5a571e3e3decee19a6b2e2a46d1618d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 18 Dec 2016 16:51:10 +0100 Subject: [PATCH] Set tag_map to None if it's not seen in the data by vocab --- spacy/vocab.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 0a37b5c3b..e61c7f2ba 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -83,6 +83,8 @@ cdef class Vocab: if tag_map is True and (path / 'vocab' / 'tag_map.json').exists(): with (path / 'vocab' / 'tag_map.json').open('r', encoding='utf8') as file_: tag_map = json.load(file_) + elif tag_map is True: + tag_map = None if lex_attr_getters is not None \ and oov_prob is True \ and (path / 'vocab' / 'oov_prob').exists():