ReCaRe / README.md
Chielax's picture mpkato's picture
Duplicate from kasys/ReCaRe
32ff2c2
|
Raw History Blame Contribute Delete
20.5 kB
---
# For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
# Doc / guide: https://huggingface.co/docs/hub/datasets-cards
language:
- en
- ja
license:
- cc-by-4.0
- cc0-1.0
tags:
- legal
- law
- multilingual
- bilingual
- retrieval
- benchmark
- eu-law
- japanese-law
language_creators:
- expert-generated
pretty_name: "ReCaRe: A Bilingual Legal Benchmark for Revision Candidate Retrieval"
size_categories:
- 100K<n<1M
source_datasets:
- original
task_categories:
- text-retrieval
configs:
- config_name: corpus-en
data_files:
- split: corpus
path: corpus-en/corpus.jsonl
- config_name: corpus-ja
data_files:
- split: corpus
path: corpus-ja/corpus.jsonl
- config_name: queries-rat2rev-en
data_files:
- split: queries
path: queries-rat2rev-en/queries.jsonl
- config_name: queries-rat2rev-ja
data_files:
- split: queries
path: queries-rat2rev-ja/queries.jsonl
- config_name: queries-rev2rev-en
data_files:
- split: queries
path: queries-rev2rev-en/queries.jsonl
- config_name: queries-rev2rev-ja
data_files:
- split: queries
path: queries-rev2rev-ja/queries.jsonl
- config_name: qrels-rat2rev-en
data_files:
- split: train
path: qrels-rat2rev-en/train.jsonl
- split: validation
path: qrels-rat2rev-en/validation.jsonl
- split: test
path: qrels-rat2rev-en/test.jsonl
- config_name: qrels-rat2rev-ja
data_files:
- split: train
path: qrels-rat2rev-ja/train.jsonl
- split: validation
path: qrels-rat2rev-ja/validation.jsonl
- split: test
path: qrels-rat2rev-ja/test.jsonl
- config_name: qrels-rev2rev-en
data_files:
- split: train
path: qrels-rev2rev-en/train.jsonl
- split: validation
path: qrels-rev2rev-en/validation.jsonl
- split: test
path: qrels-rev2rev-en/test.jsonl
- config_name: qrels-rev2rev-ja
data_files:
- split: train
path: qrels-rev2rev-ja/train.jsonl
- split: validation
path: qrels-rev2rev-ja/validation.jsonl
- split: test
path: qrels-rev2rev-ja/test.jsonl
- config_name: metadata-en
data_files:
- split: metadata
path: metadata-en/dataset.jsonl
- config_name: metadata-ja
data_files:
- split: metadata
path: metadata-ja/dataset.jsonl
---
# ReCaRe: A Bilingual Legal Benchmark for Revision Candidate Retrieval
<!-- Provide a quick summary of the dataset. -->
ReCaRe (pronounced "re-care") is a bilingual legal benchmark for **Revision
Candidate Retrieval (RCR)**: given information about a change, retrieve and
rank documents that are plausible candidates for expert inspection and
possible revision. It spans European Union law (EUR-Lex, English) and
Japanese law (e-Gov, Japanese), with **703 amendment events (340 EU + 363
JA)** and **181,531 articles (91,361 EU + 90,170 JA)**, supporting two
retrieval tasks (Rat2Rev and Rev2Rev) over bilingual corpora.
- **DOI**: [10.57967/hf/8642](https://doi.org/10.57967/hf/8642)
- **Code**: [github.com/kasys-lab/ReCaRe](https://github.com/kasys-lab/ReCaRe)
## Dataset Details
### Dataset Description
<!-- Provide a longer summary of what this dataset is. -->
Document corpora in regulated domains evolve: statutes are amended,
internal policies revised, software specifications updated. Yet most
information retrieval research has framed retrieval as a one-shot
question-answering problem over a frozen corpus, leaving the IR aspects
of *document maintenance* — finding which documents need to change, and
which other documents must change with them — comparatively underexplored.
ReCaRe formalizes two complementary RCR tasks over bilingual corpora of EU
and Japanese law. Let `D` denote the article-level corpus, `q` a query, and
`D⁺_q ⊂ D` the set of relevant articles for `q`. For each amendment event
`e`, let `r_e` denote its amendment rationale and let `A_e ⊂ D` denote the
set of target articles (the pre-revision versions of articles modified by
the amending act of `e`).
- **Rat2Rev (Rationale-to-Revision).** Given the amendment rationale `r_e`
as the query `q`, retrieve the target articles from `D`, where
`D⁺_q = A_e`.
- **Rev2Rev (Revision-to-Revision).** Given an observed revision of a
target article `a ∈ A_e` as the query `q` — represented by its pre- and
post-revision versions — retrieve the other target articles in the same
amendment event from `D \ {a}`, where `D⁺_q = A_e \ {a}`.
Properties:
- **Curated by:** Takumi Ito, Yuma Kurokawa (University of Tsukuba),
Makoto P. Kato (University of Tsukuba / National Institute of
Informatics), Sumio Fujita (LY Corporation).
- **Language(s):** English (`en`, EU subset) and Japanese (`ja`, Japanese
subset).
- **License:** CC BY 4.0 (EU-owned consolidated texts, Japanese e-Gov
consolidated statutes) / CC0 1.0 (metadata from EUR-Lex). See
[Licensing Information](#licensing-information) for per-source detail.
## Uses
<!-- Address questions around how the dataset is intended to be used. -->
### Direct Use
<!-- This section describes suitable use cases for the dataset. -->
ReCaRe is intended as a research benchmark for:
- Training and evaluating retrieval models on legal text where queries
and target documents differ markedly in length and register.
- Studying *document maintenance* retrieval: surfacing revision candidates
for expert review, distinct from question-answering or paragraph-level
retrieval.
- Comparative benchmarking against general-domain IR resources (e.g. BEIR)
to characterise the difficulty of low-overlap, multi-target retrieval
with implicit dependency.
- Ablation of long-context vs. short-context retrieval models, given that
Rat2Rev queries are substantially longer than typical IR queries.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
ReCaRe is **not** designed for, and should not be used as, a basis for:
- Automated legal drafting, automated revision recommendation, or any other
production legal workflow without expert review. Retrieved articles are
*candidates* for expert review, not authoritative outputs.
- Provision of legal advice to end-users.
- Inference of personal or demographic information about individuals — the
data contains only public legal text, but personal names appearing in
legal records (e.g. drafters, ministers) should not be used to build
profiles of those individuals.
- Generalisation claims about legal systems other than the EU and Japan,
or about time periods outside the included windows (EU 2010-2025; JP
2019-2025).
## Dataset Structure
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
The dataset is organised as **12 configs** sharing two language-aligned
corpora:
| Config | Splits | Schema | Records |
| --- | --- | --- | --- |
| `corpus-en` | `corpus` | `{_id, text}` | 91,361 |
| `corpus-ja` | `corpus` | `{_id, text}` | 90,170 |
| `queries-rat2rev-en` | `queries` | `{_id, text}` | 340 |
| `queries-rat2rev-ja` | `queries` | `{_id, text}` | 363 |
| `queries-rev2rev-en` | `queries` | `{_id, text}` | 1,509 |
| `queries-rev2rev-ja` | `queries` | `{_id, text}` | 1,653 |
| `qrels-rat2rev-en` | `train` / `validation` / `test` | `{query-id, corpus-id, score}` | 2,063 / 1,948 / 2,080 |
| `qrels-rat2rev-ja` | same | same | 3,228 / 2,501 / 3,395 |
| `qrels-rev2rev-en` | same | same | 12,088 / 8,189 / 8,156 |
| `qrels-rev2rev-ja` | same | same | 15,054 / 13,591 / 14,853 |
| `metadata-en` | `metadata` | 16-field amendment metadata (see below) | 91,361 |
| `metadata-ja` | `metadata` | 17-field amendment metadata (see below) | 90,170 |
All files are JSONL with one JSON object per line. The schemas follow BEIR
conventions (`_id`, `text`, `query-id`, `corpus-id`, `score`) so that
existing tooling such as `ir_measures`, `pytrec_eval`, and Pyserini works
without adapter code.
### Query and qrel statistics
| Per (task, lang) | Rat2Rev EU | Rat2Rev JA | Rev2Rev EU | Rev2Rev JA |
|-----------------------------|-----------:|-----------:|-----------:|-----------:|
| # queries (train) | 113 | 121 | 506 | 563 |
| # queries (validation) | 114 | 121 | 503 | 555 |
| # queries (test) | 113 | 121 | 503 | 535 |
| # amendment events (total) | 340 | 363 | 340 | 363 |
| queries per event (mean) | 1.00 | 1.00 | 4.45 | 4.55 |
| \|D⁺_q\| mean (test) | 18.41 | 28.06 | 16.21 | 27.76 |
| \|D⁺_q\| median (test) | 8 | 14 | 8 | 14 |
| \|D⁺_q\| min / max (test) | 2 / 177| 2 / 219| 1 / 176| 1 / 222|
Each amendment event with `|A_e| ≥ 2` provides up to 5 Rev2Rev queries by
random target-article selection. Splits are constructed at amendment-event
granularity into approximately equal thirds; all queries from the same
event are assigned to the same split to prevent event-level leakage. EU
and JA amendment events are disjoint by construction (independently
sourced corpora) and cross-split overlap is zero.
### Metadata schema
**`metadata-en`** (16 fields) and **`metadata-ja`** (17 fields, additionally
including `amendment_reason_url`) carry the full revision metadata, one
row per article version: `amendment_law_id`, `amendment_reason`,
`amendment_reason_url` (JA only), `law_id`, `type_of_change`,
`law_title_before`, `revision_id_before`, `article_id_before`,
`article_number_before`, `caption_before`, `text_before`,
`law_title_after`, `revision_id_after`, `article_id_after`,
`article_number_after`, `caption_after`, `text_after`.
Records with `amendment_law_id == null` are corpus-only articles (≈ 93-94 %
of metadata rows); records with non-null `amendment_law_id` are revisions
traceable to a specific amending act. The metadata configs are provided
for downstream provenance analyses and are not required to run the
retrieval tasks themselves.
**Splits.** The `qrels-*` configs use train / validation / test splits.
The `corpus-*`, `queries-*`, and `metadata-*` configs are not split — the
full corpus is used at retrieval time, and queries split membership is
encoded through the qrels.
### Quick start
```python
from datasets import load_dataset
corpus = load_dataset("kasys/ReCaRe", "corpus-en", split="corpus")
queries = load_dataset("kasys/ReCaRe", "queries-rat2rev-en", split="queries")
qrels = load_dataset("kasys/ReCaRe", "qrels-rat2rev-en") # train/validation/test
```
Or using the Hugging Face Hub directly:
```python
from huggingface_hub import hf_hub_download
import json
def load_jsonl(filename):
path = hf_hub_download(repo_id="kasys/ReCaRe", filename=filename, repo_type="dataset")
with open(path, "r", encoding="utf-8") as f:
return [json.loads(line) for line in f]
corpus = load_jsonl("corpus-en/corpus.jsonl")
queries = load_jsonl("queries-rat2rev-en/queries.jsonl")
qrels = load_jsonl("qrels-rat2rev-en/test.jsonl")
```
Reference baselines (BM25, dense retrievers, cross-encoder rerankers,
RankGPT, query/document expansion, and dense-retriever domain adaptation)
are available in [github.com/kasys-lab/ReCaRe](https://github.com/kasys-lab/ReCaRe).
## Dataset Creation
### Curation Rationale
<!-- Motivation for the creation of this dataset. -->
Existing legal-IR benchmarks (e.g. COLIEE, BSARD, LeCaRD, STARD,
LegalBench-RAG) cover statutory or case-law question answering but not
*document maintenance* — finding which provisions must change when a
corpus evolves. ReCaRe was constructed to give the IR community a shared,
bilingual benchmark for two practically motivated retrieval tasks
(Rat2Rev, Rev2Rev) over legal corpora, in two jurisdictions whose
legal-revision practices differ (EU consolidation tradition vs. Japanese
amending-act tradition).
### Source Data
<!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
The dataset contains **only public legal text** drawn from official portals:
- **EU subset:** [EUR-Lex](https://eur-lex.europa.eu/) — English Legislative
Acts (Regulations, Directives, Decisions) published between 2010 and
2025. The amendment rationale is taken from sections of the
corresponding COM document (the originating European Commission
proposal) that describe the proposal motivation, such as
"Reasons for and objectives of the proposal" and "General context".
- **Japanese subset:** [e-Gov 法令検索](https://laws.e-gov.go.jp/) —
amending acts and amended acts from 2019-2025. For each amending act,
the corresponding bill is identified via the [Japanese Laws and
Regulations Index](https://hourei.ndl.go.jp/) and the bill text is
collected from the
[House of Representatives' bill page](https://www.shugiin.go.jp/); its
"Reasons" section is used as the amendment rationale.
#### Data Collection and Processing
<!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
Acquisition spanned 2025-2026.
**Amendment events.** Each amendment event comprises (1) an amending act,
(2) an amendment rationale, (3) the amended acts modified by the amending
act, and (4) the target articles (pre-revision versions of articles
modified by the amending act).
**Article alignment.** Each version of an amended act is split into
articles represented by article number, caption, and body. Unchanged
articles and articles with unchanged body text are removed. Pre- and
post-revision articles are then aligned using:
- **Body similarity by Dice coefficient** (word-level tokens for EU,
character-level tokens for JA) with threshold ≥ 0.7, greedily accepted
as one-to-one alignments.
- For lower-Dice pairs, the **Simpson coefficient** is used to retain
cases where one version preserves a substantial part of the other,
accepting pairs with Simpson ≥ 0.95 and article length above 40
characters.
- **Article-number matches** are used only when no article-number movement
is detected within the same act.
Thresholds and filtering rules were tuned through manual inspection,
prioritising the avoidance of incorrect alignments. Minor edits (typo
corrections, cross-reference renumbering) and near-identical pairs
(Dice ≥ 0.99) are discarded. Newly added articles are excluded because
they have no pre-revision version. The pre-revision articles in the
remaining aligned pairs constitute the **target articles**.
**Article-level corpus.** Each article in the corpus has a single fixed
version. For each amended act, we use the version immediately before its
earliest amendment included in the collection window; for acts not amended
during the window we use the version in force at the start of the window
(2010 for EU, 2019 for JA). If an article is amended multiple times,
only the earliest amendment is retained, because later amendments would
refer to a pre-revision version that differs from the corpus version.
**Queries and qrels** are then derived deterministically from this
alignment:
- **Rat2Rev queries** are the amendment rationale of each amending act
(one query per amendment).
- **Rev2Rev queries** are individual revised articles (up to five queries
per amendment, randomly sampled from `A_e` when `|A_e| > 5`).
- A `(rationale, article)` pair is positive iff the article is a target
of that amendment.
- A `(revised-article, article)` pair is positive iff both are targets of
the same amendment event.
#### Who are the source data producers?
<!-- This section describes the people or systems who originally created the data. -->
The original legal text was authored by the **European Union legislative
bodies** (Council, Parliament, Commission, etc.) and by **the Government
of Japan** (Diet, ministries, etc.), and is published in their respective
official portals as public law. Producers are state-level institutions
acting in a public legislative or regulatory capacity; no individual
authorship metadata is included in the dataset beyond what appears in the
text of the law itself.
### Personal and Sensitive Information
<!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
The dataset contains **only public legal text** released by the European
Union and the Japanese government. The dataset may contain names of
public officials and administrative bodies as part of the legislative
record, but does not include personal data newly collected from research
participants. References to officials, ministers, or other named parties
appear because they are part of the public legislative record; they are
not subject to research-purpose privacy obligations and have not been
anonymised.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
- **Legal scope.** The dataset is grounded in EU and Japanese law and
inherits the conventions, drafting traditions, and any latent biases of
those legal systems. Conclusions should not be transferred to other
jurisdictions or to non-statutory legal text without further validation.
- **Not a substitute for legal advice.** The dataset is a research
resource. Retrieved articles are revision *candidates* for expert review.
- **Automatic qrels.** Relevance labels (qrels) are produced automatically
from the official amendment alignment described above; there is no
per-pair human labelling in the released qrels.
## Licensing Information
ReCaRe is built from publicly available legal documents and reused under
the licenses of the original sources:
- **EU content** (corpus-en, metadata-en, Rat2Rev rationales, Rev2Rev
articles): reused under the [EUR-Lex legal notice](https://eur-lex.europa.eu/content/legal-notice/legal-notice.html),
i.e. **CC BY 4.0** for EU-owned consolidated texts and **CC0 1.0** for
metadata.
- **Japanese statutory articles** (corpus-ja, metadata-ja, Rev2Rev
articles): reused from e-Gov under its **CC BY 4.0** terms.
- **Japanese bill texts** (used to extract Rat2Rev rationales):
legislative bill texts placed in the legislative process; reuse relies,
where applicable, on **Article 13 of the Japanese Copyright Act** (texts
of laws, ordinances, notifications and the like enacted by national or
local government bodies are not the subject of copyright).
## Glossary
<!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
- **RCR (Revision Candidate Retrieval).** The retrieval task of locating
documents that constitute plausible candidates for an authoritative
revision.
- **Rat2Rev (Rationale-to-Revision Retrieval).** Given an amendment's
textual rationale, retrieve the concrete articles to be modified.
- **Rev2Rev (Revision-to-Revision Retrieval).** Given an article to be
revised, retrieve the other articles revised in the same amendment
event.
- **Amendment event.** One amending act (a single Regulation, Directive,
or domestic amending law) that modifies one or more prior provisions.
- **`A_e`.** Set of target articles of amendment event `e` (pre-revision
versions of articles modified by the amending act).
- **`D⁺_q`.** Set of relevant articles for query `q`.
## Citation
```bibtex
@misc{ito2026recare,
title = {ReCaRe: A Bilingual Legal Benchmark for Revision Candidate
Retrieval},
author = {Ito, Takumi and Kurokawa, Yuma and Kato, Makoto P. and
Fujita, Sumio},
year = {2026},
doi = {10.57967/hf/8642},
url = {https://huggingface.co/datasets/kasys/ReCaRe},
note = {Manuscript under review}
}
```