AceParse
收藏AceParse 数据集概述
概述
AceParse 是一个综合性的数据集,包含多种结构化文本,如公式、表格、算法、列表以及嵌入数学表达式的句子等。该数据集旨在用于学术文献解析。
数据集结构
数据集的组织结构如下:
dataset/ ├── downloads/ # 原始源文件 ├── TEX/ # 从源文件中提取的 .tex 文件 ├── SYNS_TEX/ # 合成的 .tex 文件 ├── SYNS_PDF/ # 编译合成 .tex 后生成的 pdf 文件 ├── IMAGE/ # 从合成 .pdf 中裁剪出的 .png 图像 ├── data/ │ ├── images/ # 图像路径 │ └── labels/ # tex 标签路径 └── samples # AceParse 的样本
数据生成流程
- 下载源文件并提取 LaTeX 代码。
- 合成 LaTeX 代码并生成 PDF 文件。
- 从 PDF 文件中裁剪出图像。
- 分割数据集,生成训练、验证和测试集的图像路径及对应的解析文本。
数据加载与显示
AceParse 数据集已上传至 huggingface🤗。可以使用以下代码直接导入数据集: python from datasets import load_dataset from PIL import Image import io import numpy as np import matplotlib.pyplot as plt
ds = load_dataset("jihuawei/AceParse", split=train)
将二进制图像转换为 PIL 图像
image = Image.open(io.BytesIO(ds[0][image]))
获取 numpy 图像
image_array = np.array(image)
标签
label = ds[0][label]
显示图片
plt.imshow(image_array) plt.axis(off) plt.show()
打印标签
print("Label:", label)
引用
@misc{huawei2024aceparse, title={AceParse: A Comprehensive Dataset with Diverse Structured Texts for Academic Literature Parsing}, author={Huawei Ji and Cheng Deng and Bo Xue and Zhouyang Jin and Jiaxin Ding and Xiaoying Gan and Luoyi Fu and Xinbing Wang and Chenghu Zhou}, year={2024}, eprint={2409.10016}, archivePrefix={arXiv}, primaryClass={cs.CL} }

- 1AceParse: A Comprehensive Dataset with Diverse Structured Texts for Academic Literature Parsing上海交通大学 · 2024年



