mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Improve alignment around quotes
This commit is contained in:
parent
66a3f2ba21
commit
00febda2e3
|
@ -186,6 +186,10 @@ def _convert_sequence(seq):
|
||||||
cdef np.ndarray output = numpy.zeros((len(seq),), dtype='uint32')
|
cdef np.ndarray output = numpy.zeros((len(seq),), dtype='uint32')
|
||||||
cdef bytes item_bytes
|
cdef bytes item_bytes
|
||||||
for i, item in enumerate(seq):
|
for i, item in enumerate(seq):
|
||||||
|
if item == "``":
|
||||||
|
item = '"'
|
||||||
|
elif item == "''":
|
||||||
|
item = '"'
|
||||||
if isinstance(item, unicode):
|
if isinstance(item, unicode):
|
||||||
item_bytes = item.encode('utf8')
|
item_bytes = item.encode('utf8')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user