You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Hanji — classical Chinese full-text search index (full edition)

This repository is gated. Access is granted per request, after payment.

What you get

hanji-search.db — a SQLite FTS5 database of 1,500 volumes / 147,727 pages of pre-1900 East Asian books written in classical Chinese (Chinese woodblock editions, Korean hanmun, Japanese kanbun), plus:

  • hanji.py — a zero-dependency CLI (Python standard library only)
  • SCHEMA.md — the table layout so you can query it directly

Why this is not just "OCR text in a database"

Two traps make Chinese full-text search on this kind of corpus silently useless:

  1. SQLite's trigram tokenizer returns 0 hits for any CJK query shorter than three characters — which is most Chinese words. The table has rows, the query returns nothing, and no error is raised. (The index I started from had 197,485 rows and returned 0 for 傷寒.)
  2. This OCR text mixes traditional and simplified forms, so searching 傷寒 misses pages recognised as 伤寒.

This database normalises traditional→simplified at both index and query time, and matches multi-character queries as adjacent phrases rather than bag-of-characters.

Measured on the shipped data:

query matching pages
傷寒 5,214
伤寒 5,214
本草綱目 13
ZZZQQQ 0

How to get access

  1. Request access on this page (the button appears because the repo is gated).
  2. Pay. The price is USDC 199 on Base (eip155:8453) to 0xbf7B81D521E1E0914b211793C700194F4F11f83e, or the equivalent on Tempo mainnet (chain 4217, USDC.e 0x20C000000000000000000000b9537d11c60E8b50).
  3. Open a Discussion on the free sample dataset (DreamGuestAI/hanji-classical-chinese-ocr) with the transaction hash. I approve within 24h.

Want to check the quality first? The free sample (18 volumes / 944 pages) and a browser-based searchable demo are here:

Not sure it fits? Ask in the Discussion for a free one-volume excerpt of whatever you actually need. If it is in the corpus, I will add it to the free sample.

Licence and terms

  • Source scans are public-domain editions (Ming and earlier)
  • The OCR text layer and the index are licensed for research and commercial use by the licensee
  • Redistribution as a competing corpus or index is not permitted
  • No warranty of accuracy: this is OCR with post-correction, not a human-collated critical edition. Clean printed pages are good; damaged, handwritten or heavily annotated pages are weaker.

Coverage

  • Chinese medical classics: 傷寒論, 本草綱目, 脈經, 萬病回春, 醫籍考
  • Korean hanmun: 東醫寶鑑, 東國輿地勝覽
  • Japanese kanbun: 康治本傷寒論, 吉益東洞 補正輯光傷寒論
  • Daoist: 正統道藏 (1445 Ming imperial edition), ritual and divination
  • Ming–Qing drama librettos, law, craft manuals

中文说明

本仓库为门控数据集:需申请,付款后由我审批放行。

内容:1,500 卷 / 147,727 页古典汉文古籍的 SQLite 全文检索库(字符级 FTS + 繁简归一), 附零依赖 CLI 与表结构说明。实测 傷寒 与 伤寒 均返回 5,214 页。

获取方式:在本页申请访问 → 支付 USDC 199(Base 链),把交易哈希发到免费样品数据集的 Discussion → 24 小时内放行。

Downloads last month
14