Initialise Vocab length correctly

This commit is contained in:
ines 2017-06-02 10:57:25 +02:00
parent 53b82f972a
commit 41a6adf1f6
1 changed files with 1 additions and 2 deletions

View File

@ -54,6 +54,7 @@ cdef class Vocab:
self._by_hash = PreshMap()
self._by_orth = PreshMap()
self.strings = StringStore()
self.length = 0
if strings:
for string in strings:
_ = self[string]
@ -63,8 +64,6 @@ cdef class Vocab:
self.lex_attr_getters = lex_attr_getters
self.morphology = Morphology(self.strings, tag_map, lemmatizer)
self.length = 1
property lang:
def __get__(self):
langfunc = None