mirror of https://github.com/explosion/spaCy.git
* Finally get string types right for orth function
This commit is contained in:
parent
dc681920bc
commit
6b68f7ef75
|
@ -138,7 +138,7 @@ cpdef unicode word_shape(unicode string):
|
|||
|
||||
|
||||
cpdef bytes asciied(unicode string):
|
||||
ascii_string = unidecode(string)
|
||||
if not ascii_string:
|
||||
cdef str stripped = unidecode(string)
|
||||
if not stripped:
|
||||
return b'???'
|
||||
return ascii_string
|
||||
return stripped.encode('ascii')
|
||||
|
|
Loading…
Reference in New Issue