mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 18:56:36 +03:00
* 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):
|
cpdef bytes asciied(unicode string):
|
||||||
ascii_string = unidecode(string)
|
cdef str stripped = unidecode(string)
|
||||||
if not ascii_string:
|
if not stripped:
|
||||||
return b'???'
|
return b'???'
|
||||||
return ascii_string
|
return stripped.encode('ascii')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user