corpus
收藏资源简介:
FieldBench Corpus 是一个跨领域、字段级的基准测试数据集,专为模式驱动的文档提取任务(从文档到结构化 JSON)而设计。该数据集包含 1,470 份文档,覆盖 12 个不同类别(如财务报表、发票、医疗记录等),每个字段都提供了真实标注,旨在使提取准确性的声明可验证和可比较。每个数据样本包含以下字段:文档标识符(doc_id)、类别(category)、来源(source,分为“真实”或“合成”)、原始格式(original_format)、用于提取的 Markdown 表示(document)、真实字段映射的 JSON 字符串(expected)以及定义该类别字段的模式文件名(schema)。数据集中约 90% 的文档是基于干净文本的提取,而非从渲染页面(如图像/PDF)中提取;合成文档约占 48%,其准确性可能相对真实文档被高估,因此在使用时需分别报告真实和合成数据的结果。数据集的许可证因来源而异,包括 CC0、CC BY 4.0、公共领域等。该数据集适用于文档信息提取、模式驱动提取等任务的评估和基准测试。
FieldBench Corpus is a cross-domain, field-level benchmark dataset designed for schema-driven document extraction tasks (from documents to structured JSON). It contains 1,470 documents covering 12 different categories (such as financial reports, invoices, medical records, etc.), with ground truth annotations provided for each field to make extraction accuracy claims verifiable and comparable. Each data sample includes the following fields: document identifier (doc_id), category, source (divided into real or synthetic), original format, Markdown representation for extraction (document), JSON string of ground truth field mappings (expected), and the schema file name defining fields for that category. Approximately 90% of the documents in the dataset are based on clean text extraction, rather than extraction from rendered pages (e.g., images/PDFs); synthetic documents account for about 48%, and their accuracy may be overestimated compared to real documents, so results should be reported separately for real and synthetic data when using the dataset. The datasets licenses vary by source, including CC0, CC BY 4.0, public domain, etc. This dataset is suitable for evaluation and benchmarking in tasks such as document information extraction and schema-driven extraction.
FieldBench Corpus 数据集详情
数据集概述
FieldBench Corpus 是一个跨领域、字段级基准测试数据集,用于模式驱动的文档抽取任务(从文档到结构化 JSON)。该数据集包含 1,441 份文档,覆盖 10 个类别,并为每个字段提供真实标注(ground truth),使抽取准确率声明具有可证伪性和可比性。
数据集构成
| 维度 | 说明 |
|---|---|
| 文档数量 | 1,441 份 |
| 类别数量 | 10 类(包括 sec_filings、invoices、medical_records 等) |
| 数据来源 | 真实文档(real)与合成文档(synthetic),约 48% 为合成数据 |
| 许可证 | CC-BY-4.0 |
| 语言 | 英语 |
| 数据规模 | 1K < n < 10K |
字段说明
| 字段名 | 描述 |
|---|---|
doc_id |
文档标识符 |
category |
文档所属类别(10 类之一) |
source |
数据来源:real 或 synthetic,报告结果时必须按此分层 |
original_format |
文档进入抽取器的方式 |
document |
待抽取的 Markdown 格式文档内容 |
expected |
真实标注的 {字段: 值} 映射,以 JSON 字符串形式存储 |
schema |
定义该类别的字段的 schema 文件名 |
重要注意事项
- 约 90% 的文档为纯文本抽取,而非渲染页面抽取(仅 9.8% 来自图片/PDF)。解析阶段的难度基本不存在,准确率声明需相应限定范围。
- 合成文档(约 48%)会高估准确率,相对于真实文档。切勿在不提供真实/合成数据拆分的情况下报告包含合成的整体结果。
- 许可协议按来源区分:合成数据为 CC0;SEC EDGAR 为公共披露;SROIE 为 CC BY 4.0;MTSamples 为教育用途需注明出处;Caselaw Access Project 和政府表格为公共领域。ACORD/ISO 版权表格不包含在内(相关类别使用合成等价物)。
使用方式
python from datasets import load_dataset ds = load_dataset("fieldbench/corpus")["test"] ex = ds[0]
ex["document"] -> 待抽取的 Markdown 表示
ex["expected"] -> 真实标注字段映射(JSON 字符串,需 json.loads)
ex["category"], ex["source"] ("real"|"synthetic"), ex["schema"]
评分工具:
bash pip install fieldbench fieldbench score --corpus <corpus-checkout> --results <your-predictions>/
相关资源
- 代码与评分器:https://github.com/fieldbench/fieldbench
- 完整语料库与数据表:https://github.com/fieldbench/corpus
- 数据表文档:语料库仓库中的
DATASHEET.md,在得出结论前请先阅读




