From 3ee3649b525a9bc1ddd8f531a10ffc213d185e46 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 5 Oct 2020 16:59:49 +0200 Subject: [PATCH] Fix augment --- spacy/training/augment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/training/augment.py b/spacy/training/augment.py index b6e22542a..e76ee49f7 100644 --- a/spacy/training/augment.py +++ b/spacy/training/augment.py @@ -144,8 +144,8 @@ def make_orth_variants( # backup option: random left vs. right from pair pair_idx = random.choice([0, 1]) # best option: rely on paired POS tags like `` / '' - if len(ndpv[punct_idx]["TAG"]) == 2: - pair_idx = ndpv[punct_idx]["TAG"].index(tags[word_idx]) + if len(ndpv[punct_idx]["tags"]) == 2: + pair_idx = ndpv[punct_idx]["tags"].index(tags[word_idx]) # next best option: rely on position in variants # (may not be unambiguous, so order of variants matters) else: