From e4a1726f77c2eee2337766f1390308aa6207f056 Mon Sep 17 00:00:00 2001 From: maxirmx Date: Wed, 21 Oct 2015 14:16:18 +0300 Subject: [PATCH] Fixing encoding issue UTF-8 --- spacy/lemmatizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py index c1d296d7c..4109699fe 100644 --- a/spacy/lemmatizer.py +++ b/spacy/lemmatizer.py @@ -19,7 +19,7 @@ class Lemmatizer(object): index[pos] = read_index(path.join(data_dir, 'wordnet', 'index.%s' % pos)) exc[pos] = read_exc(path.join(data_dir, 'wordnet', '%s.exc' % pos)) if path.exists(path.join(data_dir, 'vocab', 'lemma_rules.json')): - rules = json.load(open(path.join(data_dir, 'vocab', 'lemma_rules.json'))) + rules = json.load(open(path.join(data_dir, 'vocab', 'lemma_rules.json')), encoding="UTF-8") else: rules = {} return cls(index, exc, rules)