mirror of https://github.com/explosion/spaCy.git
* Fix lexemes.bin
This commit is contained in:
parent
c301bebd33
commit
d6561988cf
|
@ -222,7 +222,7 @@ cdef class Vocab:
|
||||||
cdef attr_t orth
|
cdef attr_t orth
|
||||||
cdef hash_t key
|
cdef hash_t key
|
||||||
cdef unicode py_str
|
cdef unicode py_str
|
||||||
cdef uint64_t bad_bytes
|
assert sizeof(orth) == sizeof(lexeme.orth)
|
||||||
i = 0
|
i = 0
|
||||||
while True:
|
while True:
|
||||||
lexeme = <LexemeC*>self.mem.alloc(sizeof(LexemeC), 1)
|
lexeme = <LexemeC*>self.mem.alloc(sizeof(LexemeC), 1)
|
||||||
|
@ -230,8 +230,6 @@ cdef class Vocab:
|
||||||
fp.read_into(&orth, 1, sizeof(orth))
|
fp.read_into(&orth, 1, sizeof(orth))
|
||||||
except IOError:
|
except IOError:
|
||||||
break
|
break
|
||||||
# This 64 bit chunk is there for backwards compatibility. Remove on next release.
|
|
||||||
fp.read_into(&bad_bytes, 1, sizeof(bad_bytes))
|
|
||||||
# Copy data from the file into the lexeme
|
# Copy data from the file into the lexeme
|
||||||
fp.read_into(&lexeme.flags, 1, sizeof(lexeme.flags))
|
fp.read_into(&lexeme.flags, 1, sizeof(lexeme.flags))
|
||||||
fp.read_into(&lexeme.id, 1, sizeof(lexeme.id))
|
fp.read_into(&lexeme.id, 1, sizeof(lexeme.id))
|
||||||
|
|
Loading…
Reference in New Issue