* Fix issue #112: Replace unidecode with text-unidecode, to avoid license problems.

This commit is contained in:
Matthew Honnibal 2015-09-28 23:39:37 +10:00
parent 37729b9592
commit f9d2a5b651
2 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,7 @@ pathlib
preshed == 0.41
thinc == 3.3
murmurhash == 0.24
unidecode
text-unidecode
numpy
wget
plac

View File

@ -1,7 +1,16 @@
# -*- coding: utf8 -*-
from __future__ import unicode_literals
import unicodedata
from unidecode import unidecode
# If your license is not GPL compatible, use text_unidecode. But if your code
# is, you should use the unidecode library, because its performance is better.
# spaCy does not list unidecode as a dependency, in case your license is not
# GPL compatible.
try:
from unidecode import unidecode
except ImportError:
from text_unidecode import unidecode
import re
import math