Adjust end indices

It's not clear if this is technically correct or not but it won't run
without it for me.
This commit is contained in:
Paul O'Leary McCann 2022-04-13 20:19:21 +09:00
parent b53113e3b8
commit d470fa03c1

View File

@ -567,7 +567,9 @@ class SpanPredictor(TrainablePipe):
if key.startswith(self.output_prefix):
for mention in sg:
starts.append(mention.start)
ends.append(mention.end)
# 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)
starts = self.model.ops.xp.asarray(starts)
ends = self.model.ops.xp.asarray(ends)