CoolFace
Datasetpublic

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.

sourceHugging Facecc-by-nc-nd-4.0updated 17d agoView on Hugging Face
2likes3.9kdownloads
Dataset Card

JieZi (解字)

[image]

<p align="center"> <a href="https://github.com/Ran00w/JieZi"><b>💻 Project</b></a> &nbsp;·&nbsp; <a href="https://huggingface.co/datasets/Ran0/JieZi"><b>📦 Dataset</b></a> &nbsp;·&nbsp; <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

PropertyValue
TaskVisual Question Answering (VQA)
LanguageChinese (中文)
Total VQA Records505,867
Unique Character Images132,544
Script Types7 (甲骨文, 金文, 战国文字, 篆书, 隶书, 楷书, 草书)
Question Types9 (analysis + 8 fine-grained tasks)
Metadata Files36,131 (one per character-script pair)
Image FormatPNG / JPG
Image SourceMegaHan97K Historical Document Collection
LicenseCC BY-NC-ND 4.0

Task Distribution

The dataset covers nine paleographic tasks. Each task asks a different dimension of question about the same set of glyph images:

TaskChinese NameCountPercentageDescription
analysis综合分析132,97826.3%Comprehensive exegesis from form, meaning, and origin
headword字头识别46,7009.2%Identify the modern standard Chinese character (字头)
evolution字形演变46,6649.2%Describe the historical glyph evolution
etymology造字法46,6519.2%Determine the method of character creation
script字形判断46,6209.2%Classify the script type (甲骨文, 金文, 战国文, 篆书, 隶书, 楷书, 草书)
function构件功能46,6209.2%Identify the semantic/phonetic function of a given component
meaning本义解释46,5799.2%Explain the original meaning (本义) of the character
structure结构分析46,5739.2%Analyze the structural composition (e.g., 独体, 左右, 上下)
components构件分析46,4829.2%Analyze each component's function and evolution

Script Distribution

ScriptRecordsCharactersUnique ImagesPercentage
隶书 (Clerical)117,4508,66214,27423.2%
篆书 (Seal)111,3408,67923,62822.0%
草书 (Cursive)98,8468,5809,93419.5%
楷书 (Regular)79,3504,46516,26715.7%
甲骨文 (Oracle Bone)59,2691,22648,14111.7%
金文 (Bronze)35,4741,65519,8747.0%
战国文字 (Ancient)4,1384064260.8%
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):

json
{
  "image": "images/U+4E00/K/1.png",
  "question": "请识别图中的字形,并阐述其文字学属性。",
  "answer": "该字在现代字典中字头作「一」,图示为楷书字形。就造字法与结构而言,该字属独体结构之指事字...",
  "character": "一",
  "script": "楷书",
  "task": "analysis"
}

Metadata Files — metadata/{script_type}/{char}_{script}.json (36,131 files):

json
{
  "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

FieldTypeDescription
imagestringRelative path to the glyph image, rooted at JieZi-Dataset/. Format: images/U+{codepoint}/{script_letter}/{index}.{ext}. The folder hierarchy is organized by Unicode codepoint (U+XXXX) and script type (one uppercase letter: J=甲骨文, B=金文, G=战国文字, S=篆书, L=隶书, K=楷书, C=草书).
questionstringNatural-language question about the character. Multiple paraphrased templates exist for each task.
answerstringExpert-verified ground-truth answer. Long-form for analysis, evolution, and components; short-form for headword, script, and etymology.
characterstringThe modern standard Chinese character (字头) that the depicted glyph corresponds to in contemporary dictionaries.
scriptstringThe script type (字形 / 书体): 甲骨文, 金文, 战国文字, 篆书, 隶书, 楷书, or 草书.
taskstringThe task type: analysis, headword, script, etymology, structure, meaning, evolution, components, or function.

Field Description — Metadata Records

FieldTypeDescription
characterstringModern standard Chinese character (字头)
scriptstringScript type (字形)
creation_methodlistMethod of character creation, e.g., ["象形字"], ["形声字"]
structurestringStructural composition, e.g., "独体", "⿰" (left-right), "⿱" (top-bottom)
special_structurestringSpecial or historical structural variant
componentslistArray of component objects, each with component (name), function (list), explanation (string)
original_meaningstringOriginal meaning of the character (本义)
evolutionstringDescription of historical glyph evolution across script types
pinyinlistModern pinyin readings
meaning_chunkslistArray of meaning entries, each with pinyin, pos (part of speech), meaning, notes, examples
imageslistRelative paths to all glyph images for this character-script pair

🔍 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)

ImageQuestionAnswer
[image]请对这幅古文字图像进行系统的释读。观察图像所示篆书字形,该字在现代字典中字头为「雹」。从文字学角度分析,此字为象形字。其构件构成如下:「雨」承担表意功能,演变类型为保留,构字解释为「象天穹降雨之形,标示降水现象。」;「冰粒」承担表意功能,演变类型为讹变,构字解释为「象冰雹颗粒之形,后讹变为声符"包"。」...

2. Headword Recognition (headword)

ImageQuestionAnswer
[image]请确认图中字形对应的现代字典字头。嶓

3. Script Classification (script)

ImageQuestionAnswer
[image]这张图里的字体类型是什么?甲骨文

4. Etymology (etymology)

ImageQuestionAnswer
[image]这个字的造字法是什么?形声字

5. Structural Analysis (structure)

ImageQuestionAnswer
[image]该字的结构应如何归类?左右结构

6. Original Meaning (meaning)

ImageQuestionAnswer
[image]图中字的原初意义(本义)是什么?巡视田禾

7. Glyph Evolution (evolution)

ImageQuestionAnswer
[image]请依时代先后,说明该字字形的演变轨迹。甲骨文作以戈击门形,金文讹变为手持棍敲门,后综合为从户从聿。篆文定型为三体结构,隶变后楷书分化为肁、肈、肇。草书在此基础上进一步连笔简化,保留上下结构特征。

8. Component Analysis (components)

ImageQuestionAnswer
[image]请完整分析该字的构件构成,包括每一构件的表意/表音功能、演变类型及解释。1. 构件凵:表意;演变类型为保留;象坑穴或容器之形,在此表示关押野兽的笼槛。2. 构件牛:功能为表意;演变类型为保留;象牛头及角之形,表示被关押的对象。

9. Component Function (function)

ImageQuestionAnswer
[image]请说明构件"水"在该字中的功能。表意

🚀 Usage

Quick Start with Hugging Face datasets

python
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 image

Manual Loading

If you prefer to work with the raw JSONL directly:

python
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

python
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 between JieZi-Dataset.jsonl and images/ unchanged. Images are organized hierarchically as images/U+{codepoint}/{script_letter}/{index}.{ext}, where codepoint is the Unicode of the character, script_letter is one uppercase letter (J/B/G/S/L/K/C), and index is 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:

bibtex
@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.

🔗 Links

LinkDescription
💻 ProjectSource code & documentation
📦 DatasetHuggingFace dataset repository
🌐 DemoInteractive online demo
Ran0/JieZi · CoolFace