* Use empty tag map in vocab if none supplied

This commit is contained in:
Matthew Honnibal 2015-09-06 20:19:27 +02:00
parent 4f8e38271d
commit f6ec5bf1b0

View File

@ -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()