mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Fix type declaration in asciied function
This commit is contained in:
parent
9ff288c7bb
commit
b125289f30
|
@ -11,6 +11,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from text_unidecode import unidecode
|
from text_unidecode import unidecode
|
||||||
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
@ -165,7 +166,7 @@ cpdef unicode norm1(unicode string, lower_pc=0.0, upper_pc=0.0, title_pc=0.0):
|
||||||
|
|
||||||
|
|
||||||
cpdef bytes asciied(unicode string):
|
cpdef bytes asciied(unicode string):
|
||||||
cdef str stripped = unidecode(string)
|
stripped = unidecode(string)
|
||||||
if not stripped:
|
if not stripped:
|
||||||
return b'???'
|
return b'???'
|
||||||
return stripped.encode('ascii')
|
return stripped.encode('ascii')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user