From b125289f304ecbf47b825904971a9989a77d22d5 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 9 Oct 2015 13:46:57 +1100 Subject: [PATCH] * Fix type declaration in asciied function --- spacy/orth.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/orth.pyx b/spacy/orth.pyx index 27123bb4e..882e06bf2 100644 --- a/spacy/orth.pyx +++ b/spacy/orth.pyx @@ -11,6 +11,7 @@ try: except ImportError: from text_unidecode import unidecode + import re 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): - cdef str stripped = unidecode(string) + stripped = unidecode(string) if not stripped: return b'???' return stripped.encode('ascii')