From f6ec5bf1b0485a64e25a9b1828fadde5884b5f10 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 6 Sep 2015 20:19:27 +0200 Subject: [PATCH] * Use empty tag map in vocab if none supplied --- spacy/vocab.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 596570a98..012909755 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -38,6 +38,8 @@ cdef class Vocab: '''A map container for a language's LexemeC structs. ''' def __init__(self, get_lex_attr=None, tag_map=None, vectors=None): + if tag_map is None: + tag_map = {} self.mem = Pool() self._by_hash = PreshMap() self._by_orth = PreshMap()