* Finally get string types right for orth function

This commit is contained in:
Matthew Honnibal 2015-01-06 03:17:39 +11:00
parent dc681920bc
commit 6b68f7ef75
1 changed files with 3 additions and 3 deletions

View File

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