Datasets:

Languages:
English
ArXiv:
License:

Incorrect mention span annotation in BookCoref (test split, sample 2, animal_farm_0, mention id 1583)

#1
by AntoineBourgois - opened

In the dataset sapienzanlp/bookcoref, one mention span in the TEST split (index 2, animal_farm_0) appears to be incorrectly annotated. A mention that should correspond to the pronoun “he” is instead mapped to a punctuation token ",", indicating a likely off-by-one or misaligned token index in the clusters annotation.

Minimal reproduction

from datasets import load_dataset

bookcoref = load_dataset("sapienzanlp/bookcoref", trust_remote_code=True)

file_dict = bookcoref["test"][2]
tokens = [token for sentence in file_dict["sentences"] for token in sentence]
all_mentions = [token for sentence in file_dict["clusters"] for token in sentence]
erroneous_mention_id = 1583
erroneous_mention = all_mentions[erroneous_mention_id]
start_token, end_token = erroneous_mention
print(f"Erroneous mention: {erroneous_mention}")
erroneous_mention_text = " ".join(tokens[start_token:end_token + 1])
print(f"Erroneous mention text: {erroneous_mention_text!r}")

correct_mention_ids = [34051, 34051]
corrected_start_token, corrected_end_token = correct_mention_ids
corrected_mention_text = " ".join(tokens[corrected_start_token:corrected_end_token + 1])
in_context_corrected_mention_text = " ".join(tokens[corrected_start_token-5:corrected_end_token + 1 +5])

print(f"Corrected mention text: {corrected_mention_text!r}")
print(f"In context Corrected mention text: {in_context_corrected_mention_text!r}")

Erroneous mention: [34050, 34050]
Erroneous mention text: ','

correct_mention_ids = [34051, 34051]
Corrected mention text: 'he'

In context Corrected mention text: 'various chins turned purple , he managed to get it out'

Sign up or log in to comment