Skip to content

Commit f1fbaaa

Browse files
committed
Oops, off by one. Must check the sentence id based on the actual last word... reported in #1333
1 parent 889de55 commit f1fbaaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stanza/pipeline/coref_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def process(self, document):
109109
# manipulating the spans, since we will expect it to
110110
# be this way for multiple usages of the spans
111111
sent_id = sent_ids[span[0]]
112-
if sent_ids[span[1]] != sent_id:
112+
if sent_ids[span[1]-1] != sent_id:
113113
raise ValueError("The coref model predicted a span that crossed two sentences! Please send this example to us on our github")
114114

115115
# treat the longest span as the representative

0 commit comments

Comments
 (0)