Skip to content

Commit

Permalink
Oops, off by one. Must check the sentence id based on the actual last…
Browse files Browse the repository at this point in the history
… word... reported in #1333
  • Loading branch information
AngledLuffa committed Jan 20, 2024
1 parent 889de55 commit f1fbaaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stanza/pipeline/coref_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def process(self, document):
# manipulating the spans, since we will expect it to
# be this way for multiple usages of the spans
sent_id = sent_ids[span[0]]
if sent_ids[span[1]] != sent_id:
if sent_ids[span[1]-1] != sent_id:
raise ValueError("The coref model predicted a span that crossed two sentences! Please send this example to us on our github")

# treat the longest span as the representative
Expand Down

0 comments on commit f1fbaaa

Please sign in to comment.