Ran0/JieZi
JieZi (解字) 💻 Project · 📦 Dataset · 🌐 Demo JieZi (解字) is a large-scale, expert-audited visual question answering (VQA) dataset dedicated to ancient Chinese character exegesis. It pairs high-quality character glyph images with fine-grained expert annotations across nine paleographic tasks—including headword recognition, etymology, structural analysis, glyph evolution, and component function—providing a rigorous benchmark for multimodal… See the full description on the dataset page: https://huggingface.co/datasets/Ran0/JieZi.
JieZi (解字)
<p align="center"> <a href="https://github.com/Ran00w/JieZi"><b>💻 Project</b></a> · <a href="https://huggingface.co/datasets/Ran0/JieZi"><b>📦 Dataset</b></a> · <a href="https://ran00w.github.io/JieZi"><b>🌐 Demo</b></a> </p>
JieZi (解字) is a large-scale, expert-audited visual question answering (VQA) dataset dedicated to ancient Chinese character exegesis. It pairs high-quality character glyph images with fine-grained expert annotations across nine paleographic tasks—including headword recognition, etymology, structural analysis, glyph evolution, and component function—providing a rigorous benchmark for multimodal understanding of Chinese paleography and calligraphy. Each character image is sourced from the MegaHan97K historical document collection, covering seven major Chinese script types from oracle bone to cursive.
📊 Dataset at a Glance
Task Distribution
The dataset covers nine paleographic tasks. Each task asks a different dimension of question about the same set of glyph images:
Script Distribution
Note on 楷书 (Regular Script): The 16,267 regular-script images are sourced from the MegaHan97K M5HisDoc historical document collection, ensuring high authenticity for printed and handwritten regular script glyphs. The 4,465 characters covered represent those with matching historical document sources.
🗂️ Data Format
Each sample is a JSON object stored as one JSONL line. The full dataset has been shuffled and is ready for train/validation splitting.
Main VQA File — JieZi-Dataset/JieZi-Dataset.jsonl (505,867 records):
{
"image": "images/U+4E00/K/1.png",
"question": "请识别图中的字形,并阐述其文字学属性。",
"answer": "该字在现代字典中字头作「一」,图示为楷书字形。就造字法与结构而言,该字属独体结构之指事字...",
"character": "一",
"script": "楷书",
"task": "analysis"
}Metadata Files — metadata/{script_type}/{char}_{script}.json (36,131 files):
{
"character": "一",
"script": "楷书",
"creation_method": ["指事字"],
"structure": "独体",
"special_structure": "独体",
"components": [
{"component": "一", "function": ["表意"], "explanation": "象一根算筹横置之形"}
],
"original_meaning": "数目一",
"evolution": "甲骨文、金文、战国文字、篆书皆象一根算筹横置之形...",
"pinyin": ["yī"],
"meaning_chunks": [
{"pinyin": "yī", "pos": "数词", "meaning": "数目一", "notes": "本义", "examples": ""}
],
"images": ["JieZi-Dataset/images/U+4E00/K/1.png", "JieZi-Dataset/images/U+4E00/K/2.png"]
}Field Description — VQA Records
Field Description — Metadata Records
🔍 VQA Examples by Task
Below are representative samples for all nine task types. Open the Dataset Viewer tab above to browse all 505,867 samples interactively.
1. Comprehensive Analysis (analysis)
2. Headword Recognition (headword)
3. Script Classification (script)
4. Etymology (etymology)
5. Structural Analysis (structure)
6. Original Meaning (meaning)
7. Glyph Evolution (evolution)
8. Component Analysis (components)
9. Component Function (function)
🚀 Usage
Quick Start with Hugging Face datasets
from datasets import load_dataset
# Load from the Hub
dataset = load_dataset("Ran0/JieZi", split="train")
# Inspect a sample
sample = dataset[0]
print(sample["question"]) # 请识别图中的字形,并阐述其文字学属性。
print(sample["answer"]) # 该字在现代字典中字头作「㐁」...
print(sample["character"]) # 㐁 (modern standard character)
print(sample["script"]) # 楷书 (script type)
print(sample["task"]) # analysis (task type)
sample["image"].show() # Display the character imageManual Loading
If you prefer to work with the raw JSONL directly:
import json
from pathlib import Path
root = Path("JieZi-Dataset")
with (root / "JieZi-Dataset.jsonl").open("r", encoding="utf-8") as f:
for line in f:
item = json.loads(line)
image_path = root / item["image"] # relative path
question = item["question"]
answer = item["answer"]
character = item["character"]
script = item["script"]
task = item["task"]
# ... your processing logic ...Loading Metadata
import json
# Load metadata for a specific character-script pair
with open("metadata/楷书/一_楷书.json", "r", encoding="utf-8") as f:
meta = json.load(f)
print(meta["character"]) # 一
print(meta["creation_method"]) # ['指事字']
print(meta["structure"]) # 独体
print(meta["components"]) # [{'component': '一', 'function': ['表意'], 'explanation': '...'}]
print(meta["pinyin"]) # ['yī']
print(meta["meaning_chunks"]) # list of meaning entries with POS, examples, etc.
print(meta["images"]) # ['JieZi-Dataset/images/U+4E00/K/1.png', ...]⚠️ Path Note: When using the raw JSONL, keep the relative path relationship betweenJieZi-Dataset.jsonlandimages/unchanged. Images are organized hierarchically asimages/U+{codepoint}/{script_letter}/{index}.{ext}, wherecodepointis the Unicode of the character,script_letteris one uppercase letter (J/B/G/S/L/K/C), andindexis the sequential number for that glyph variant.
🏗️ Project Structure
JieZi/
├── JieZi-Dataset/
│ ├── JieZi-Dataset.jsonl # Main dataset file (505,867 VQA records, shuffled)
│ └── images/ # Glyph image directory (132,544 images)
│ ├── U+4E00/ # Unicode folder for character "一"
│ │ ├── J/ # 甲骨文 (Jiaguwen / Oracle Bone)
│ │ ├── K/ # 楷书 (Kaishu / Regular — MegaHan97K)
│ │ └── ...
│ ├── U+4E01/ # Unicode folder for character "丁"
│ │ ├── B/ # 金文 (Jinwen / Bronze)
│ │ ├── S/ # 篆书 (Zhuanshu / Seal)
│ │ └── ...
│ └── ... # One folder per character (U+XXXX)
├── metadata/ # Character metadata (36,131 JSON files)
│ ├── 隶书/ # 8,662 files
│ ├── 篆书/ # 8,679 files
│ ├── 草书/ # 8,580 files
│ ├── 楷书/ # 6,923 files (includes chars without VQA images)
│ ├── 金文/ # 1,655 files
│ ├── 甲骨文/ # 1,226 files
│ └── 战国文字/ # 406 files
├── JieZi-bench/ # Benchmark subset (512 hard characters)
│ ├── hard_04EB5_亵/ # One folder per benchmark character
│ │ ├── entry.json # Character metadata & annotations
│ │ └── images/ # Glyph images for this character
│ └── ...
├── README.md # Dataset documentation (this file)
└── main_figure.png # Project teaser figure📚 Citation
If you use this dataset in your research, please cite:
@misc{jiezi2024,
title={JieZi: A Large-Scale Expert-Audited Dataset and Benchmark for Ancient Chinese Character Exegesis},
author={Ran et al.},
year={2024},
howpublished={\url{https://huggingface.co/datasets/Ran0/JieZi}}
}📜 License
This dataset is released under CC BY-NC-ND 4.0 for non-commercial research purposes only. By downloading or using the data, you agree to comply with the terms of this license.
