From ebb6c49cd587ccef3cdd9432597e6104eb4139cc Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 4 Jun 2017 20:26:42 -0500 Subject: [PATCH] Make alignment case-insensitive for gold --- spacy/gold.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/gold.pyx b/spacy/gold.pyx index 51de7e160..42aaf1f84 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -89,8 +89,8 @@ def _min_edit_path(cand_words, gold_words): # TODO: Fix this --- just do it properly, make the full edit matrix and # then walk back over it... # Preprocess inputs - cand_words = [punct_re.sub('', w) for w in cand_words] - gold_words = [punct_re.sub('', w) for w in gold_words] + cand_words = [punct_re.sub('', w).lower() for w in cand_words] + gold_words = [punct_re.sub('', w).lower() for w in gold_words] if cand_words == gold_words: return 0, ''.join(['M' for _ in gold_words])