* Ensure we don't use orth_encode on OOV words.

This commit is contained in:
Matthew Honnibal 2015-07-27 02:12:01 +02:00
parent 912511f0aa
commit af6ed18f2a

View File

@ -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)