mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
* Update Doc serialization for new Packer interface
This commit is contained in:
parent
1f7170e0e1
commit
8743a8c084
|
@ -403,7 +403,5 @@ cdef class Doc:
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
keep_reading = False
|
keep_reading = False
|
||||||
bits = BitArray(data)
|
bits = BitArray(data)
|
||||||
array = vocab.packer.unpack(bits)
|
doc = vocab.packer.unpack(bits)
|
||||||
doc = Doc(vocab, array[:, :2])
|
|
||||||
doc.from_array(vocab.packer.attrs, array)
|
|
||||||
yield doc
|
yield doc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user