File size: 8,635 Bytes
59585fe 765119f 59585fe 04779e4 59585fe 765119f 59585fe d899fde 59585fe d899fde dd4f9c8 d899fde 86d55ac d899fde 92fc199 048f750 d960bc3 d899fde d960bc3 92fc199 d960bc3 d899fde 04779e4 d899fde d960bc3 04779e4 d960bc3 2a502dd d899fde d960bc3 d899fde d960bc3 d899fde d960bc3 d899fde d960bc3 d899fde d960bc3 d899fde d960bc3 d899fde 86d55ac d899fde 86d55ac d899fde 86d55ac d899fde 86d55ac d899fde 048f750 d899fde 157776b d960bc3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
---
dataset_info:
- config_name: full
features:
- name: doc_key
dtype: string
- name: gutenberg_key
dtype: string
- name: sentences
sequence:
sequence: string
- name: clusters
sequence:
sequence:
sequence: int64
- name: characters
list:
- name: name
dtype: string
- name: mentions
sequence:
sequence: int64
splits:
- name: train
num_bytes: 118643409
num_examples: 45
- name: validation
num_bytes: 5893208
num_examples: 5
- name: test
num_bytes: 2732407
num_examples: 3
download_size: 317560335
dataset_size: 127269024
- config_name: split
features:
- name: doc_key
dtype: string
- name: gutenberg_key
dtype: string
- name: sentences
sequence:
sequence: string
- name: clusters
sequence:
sequence:
sequence: int64
- name: characters
list:
- name: name
dtype: string
- name: mentions
sequence:
sequence: int64
splits:
- name: train
num_bytes: 118849212
num_examples: 7544
- name: validation
num_bytes: 5905814
num_examples: 398
- name: test
num_bytes: 2758250
num_examples: 152
download_size: 317560335
dataset_size: 127513276
language:
- en
pretty_name: BOOKCOREF
size_categories:
- 10M<n<100M
tags:
- coreference-resolution
license: cc-by-sa-4.0
---
<div align="center">
<img src="assets/bookcoref.png" width="700">
</div>
<div style="display: flex; justify-content: center; align-items: center; gap: 8px;">
<a href="https://2025.aclweb.org/" style="line-height: 0;"><img src="http://img.shields.io/badge/ACL-2025-4b44ce.svg" style="display: block; margin: 0;"/></a>
<a href="https://aclanthology.org/2025.acl-long.1197/" style="line-height: 0;"><img src="http://img.shields.io/badge/paper-ACL--anthology-B31B1B.svg" style="display: block; margin: 0;"/></a>
<a href="https://arxiv.org/abs/2507.12075" style="line-height: 0;"><img src="https://img.shields.io/badge/arXiv-2507.12075-008080.svg" style="display: block; margin: 0;"/></a>
</div>
<!-- Aggiungi nome degli autori, ACL 2025, link -->
This data repository contains the <span style="font-variant: small-caps;">BookCoref</span> dataset, introduced in the paper <a href="https://aclanthology.org/2025.acl-long.1197/"><span style="font-variant: small-caps;">BookCoref</span>: Coreference Resolution at Book Scale</a> by G. Martinelli, T. Bonomo, P. Huguet Cabot and R. Navigli, presented at the <a href="https://2025.aclweb.org/">ACL 2025</a> conference.
We release both the manually-annotated `test` split (<span style="font-variant: small-caps;">BookCoref</span><sub>gold</sub>) and the pipeline-generated `train` and `validation` splits (<span style="font-variant: small-caps;">BookCoref</span><sub>silver</sub>).
In order to enable the replication of our results, we also release a version of the `train`, `validation`, and `test` partitions split into 1500 tokens under the configuration name `split`.
<!-- As specified in the paper, this version is obtained through chunking the text into contiguous windows of 1500 tokens, retaining the coreference clusters of each window. -->
## ⚠️ Project Gutenberg license disclaimer
<span style="font-variant: small-caps;">BookCoref</span> is based on books from Project Gutenberg, which are publicly available under the [Project Gutenberg License](https://www.gutenberg.org/policy/license.html).
This license holds for users located in the United States, where the books are in the public domain.
We do not distribute the original text of the books, rather our dataset consists of a script that downloads and preprocesses the books from an archived verion of Project Gutenberg through the [Wayback Machine](https://web.archive.org/).
Users are responsible for checking the copyright status of each book in their country.
## 📚 Quickstart
To use the <span style="font-variant: small-caps;">BookCoref</span> dataset, you need to install the following Python packages in your environment:
```bash
pip install "datasets==3.6.0" "deepdiff==8.5.0" "spacy==3.8.7" "nltk==3.9.1"
```
You can then load each configuration through Huggingface's `datasets` library:
```python
from datasets import load_dataset
bookcoref = load_dataset("sapienzanlp/bookcoref")
bookcoref_split = load_dataset("sapienzanlp/bookcoref", name="split")
```
These commands will download and preprocess the books, add the coreference annotations, and return a `DatasetDict` according to the requested configuration.
```python
>>> bookcoref
DatasetDict({
train: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 45
})
validation: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 5
})
test: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 3
})
})
>>> bookcoref_split
DatasetDict({
train: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 7544
})
validation: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 398
})
test: Dataset({
features: ['doc_key', 'gutenberg_key', 'sentences', 'clusters', 'characters'],
num_rows: 152
})
})
```
## ℹ️ Data format
<span style="font-variant: small-caps;">BookCoref</span> is a collection of annotated books.
Each item contains the annotations of one book following the structure of OntoNotes:
```python
{
doc_id: "pride_and_prejudice_1342", # (str) i.e., ID of the document
gutenberg_key: "1342", # (str) i.e., key of the book in Project Gutenberg
sentences: [["CHAPTER", "I."], ["It", "is", "a", "truth", "universally", "acknowledged", ...], ...], # list[list[str]] i.e., list of word-tokenized sentences
clusters: [[[79,80], [81,82], ...], [[2727,2728]...], ...], # list[list[list[int]]] i.e., list of clusters' mention offsets
characters: [
{
name: "Mr Bennet",
cluster: [[79,80], ...],
},
{
name: "Mr. Darcy",
cluster: [[2727,2728], [2729,2730], ...],
}
] # list[character], list of characters objects consisting of name and mentions offsets, i,e., dict[name: str, cluster: list[list[int]]]
}
```
<!-- Add description of fields in example, maybe OntoNotes format is not enough -->
We also include character names, which are not exploited in traditional coreference settings but could inspire future directions in Coreference Resolution.
## 📊 Dataset statistics
<span style="font-variant: small-caps;">BookCoref</span> has distinctly book-scale characteristics, as summarized in the following table:
<!-- chage to markdown table -->
<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/64f85270ceabf1e6fc524bb8/DgYU_2yKlZuwDTV-duGWh.png" width=1000/>
</div>
## 🖋️ Cite this work
This work has been published at ACL 2025 (main conference). If you use any artifact of this dataset, please consider citing our paper as follows:
```bibtex
@inproceedings{martinelli-etal-2025-bookcoref,
title = "{BOOKCOREF}: Coreference Resolution at Book Scale",
author = "Martinelli, Giuliano and
Bonomo, Tommaso and
Huguet Cabot, Pere-Llu{\'i}s and
Navigli, Roberto",
editor = "Che, Wanxiang and
Nabende, Joyce and
Shutova, Ekaterina and
Pilehvar, Mohammad Taher",
booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2025",
address = "Vienna, Austria",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.acl-long.1197/",
pages = "24526--24544",
ISBN = "979-8-89176-251-0",
}
```
## Authors
- [Giuliano Martinelli](https://www.linkedin.com/in/giuliano-martinelli-20a9b2193/)
- [Tommaso Bonomo](https://www.linkedin.com/in/tommaso-bonomo/)
- [Pere-lluis Huguet Cabot](https://www.linkedin.com/in/perelluis/)
- [Roberto Navigli](https://www.linkedin.com/in/robertonavigli/)
## ©️ License information
All the annotations provided by this repository are licensed under the [ Creative Commons Attribution-NonCommercial-ShareAlike 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.
<!-- The tokenized text of books is a modification of books from Project Gutenberg, following [their license](https://www.gutenberg.org/policy/license.html). --> |