From 08729e0fbd46f2a595b8c14f4fef4dd4241b06e2 Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Thu, 14 Apr 2022 18:31:30 +0900 Subject: [PATCH] Remove end adjustment The difference in environments was due to a change in Thinc, the code here is fine. --- spacy/pipeline/coref.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spacy/pipeline/coref.py b/spacy/pipeline/coref.py index 489f8875b..ab315720f 100644 --- a/spacy/pipeline/coref.py +++ b/spacy/pipeline/coref.py @@ -561,9 +561,7 @@ class SpanPredictor(TrainablePipe): if key.startswith(self.output_prefix): for mention in sg: starts.append(mention.start) - # TODO check: Is the -1 here correct? - # In Akos's env it works without, but in Paul's it doesn't. - ends.append(mention.end - 1) + ends.append(mention.end) starts = self.model.ops.xp.asarray(starts) ends = self.model.ops.xp.asarray(ends)