mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Ensure we don't use orth_encode on OOV words.
This commit is contained in:
parent
912511f0aa
commit
af6ed18f2a
|
@ -132,6 +132,9 @@ cdef class Packer:
|
|||
return doc
|
||||
|
||||
def _orth_encode(self, Doc doc):
|
||||
for t in doc:
|
||||
if t.is_oov:
|
||||
return None
|
||||
cdef BitArray bits = BitArray()
|
||||
cdef int32_t length = len(doc)
|
||||
bits.extend(length, 32)
|
||||
|
|
Loading…
Reference in New Issue
Block a user