mirror of https://github.com/explosion/spaCy.git
Initialise Vocab length correctly
This commit is contained in:
parent
53b82f972a
commit
41a6adf1f6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue