Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
10
65
source
stringclasses
4 values
title
stringlengths
1
127
era
stringclasses
61 values
era_basis
stringclasses
11 values
group
stringlengths
11
65
split
stringclasses
1 value
tokens
int64
3
299k
normalized_chars
int64
1
450k
date_status
stringclasses
6 values
script_profile
stringclasses
3 values
license_status
stringclasses
3 values
source_document_id
stringlengths
10
57
work_candidate_id
stringlengths
10
57
unit_type
stringclasses
4 values
unit_label
stringlengths
7
17
license
stringclasses
3 values
text_sha256
stringlengths
64
64
text
stringlengths
1
450k
metadata
stringlengths
866
2.4k
kanripo/KR1a0002/KR1a0002_000.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
455
574
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_000.txt
cc-by-sa-4.0
bce5b8bcbd5ce190c786447d3abe74a1596906ce8e94470121fa61dd2d0c3bda
欽定四庫全書 經部一 子夏易𫝊 易𩔖 提要 (臣/)等謹案子夏易𫝊十一卷舊本題卜子夏撰 案説易之家最古者莫若是書其偽中生偽 至一至再而未已者亦莫若是書唐㑹要載開 元七年詔子夏易𫝊近無習者令儒官詳定 劉知㡬議曰漢志易有十三家而無子夏作𫝊 者至梁阮氏七錄始有子夏易六卷或云韓嬰 作或云丁寛作然據漢書韓易十二篇丁易八 篇求其符合事殊隳刺必欲行用深以為疑司 馬貞議亦曰按劉向七畧有子夏易𫝊但此書 不行已乆今所存多失真本荀朂中經簿云子 夏𫝊四卷或云丁寛是先逹疑非子夏矣又隋 書經籍志云子夏𫝊殘缺梁六卷今二卷知 其書錯謬多矣又王儉七志引劉向七畧云 易𫝊子夏韓氏嬰也今題不稱韓氏而載薛 虞記其質麤畧㫖趣非逺無益後學云云是 唐已前所謂子夏...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_000.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 720, "nonspace_chars": 534, "kana_chars": 0, "han_chars": 516, "original...
kanripo/KR1a0002/KR1a0002_001.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
7,760
9,742
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_001.txt
cc-by-sa-4.0
7466abd635029a7cdbcfd431245891d438e3443dc73534986fd35334f5c44a27
欽定四庫全書 子夏易傳卷一 周易 上經乾傳苐一 ䷀(乾下/乾上) 乾元亨利貞彖曰大哉乾元萬物資始乃綂天雲行雨 施品物流形大明終始六位時成時乘六龍以御天乾 道變化各正性命保合太和乃利貞首出庶物萬國咸 寧 乾始降氣者也始而通終而濟保其正也故綂萬物 而無外夫天者位也質也乾者人也精神也有其人 然後定其位精神通明然後綂其質故能雲行雨施 生𩔖繼續大明終始而分其六位乘其隱見而得其 變化故得生成而性命正矣是以聖人之當位也保 合於乾元太和之道乃利而終正也故能首出庶物 萬國保其安也 𧰼曰天行健君子以自强不息 健而不息天之運也自强而成德者君子之事也 初九潛龍勿用𧰼曰陽在下也 陽氣始生潛而未形雖德龍德與衆無以異也 九二見龍在田利見大人𧰼曰德施普也 ...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_001.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 10178, "nonspace_chars": 9190, "kana_chars": 0, "han_chars": 9150, "orig...
kanripo/KR1a0002/KR1a0002_002.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
5,608
7,090
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_002.txt
cc-by-sa-4.0
c073c308f5a451293b4038c152bd371fdf6a3e8680e49e7bd158824e6ecb9d99
欽定四庫全書 子夏易傳卷二 周易 上經泰傳第二 ䷊(乾下/坤上) 泰小往大來吉亨彖曰泰小往大來吉亨則是天地交 而萬物通也上下交而其志同也内陽而外隂内健而 外順内君子而外小人君子道長小人道消也 易者𧰼也神之用也故泰𧰼於天地交而萬物生上 下交而人治成陽内得時而隂外也健發於内其道 順行於外親内君子踈外小人君子之長也是以損 削之道往而豐大之道來吉而通者也 𧰼曰天地交泰后以財成天地之道輔相天地之宜以 左右民 天地合其時以養物也聖人興其財以豐人也結網 罟作耒耜能輔相天地之宜成天地之道因時而通 利而左右其民也 初九拔茅茹以其彚征吉𧰼曰拔茅征吉志在外也 拔茅而連出也君子道長上下交志以其𩔖征吉離 内以之外志求其成也 九二包荒用馮河不遐遺朋亡...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_002.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 7434, "nonspace_chars": 6685, "kana_chars": 0, "han_chars": 6645, "origi...
kanripo/KR1a0002/KR1a0002_003.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
5,437
6,866
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_003.txt
cc-by-sa-4.0
00c1b113ed998a53c7b7f5ea137fc878ef53464f49895fe7e3fdce62ca4d9f7d
欽定四庫全書 子夏易傳卷三 周易 上經噬嗑傳第三 ䷔(震下/離上) 噬嗑亨利用獄彖曰頤中有物曰噬嗑噬嗑而亨剛柔 分動而明雷電合而章柔得中而上行雖不當位利用 獄也 剛物在頤中曰噬嗑故噬而嗑之其道乃通刑以齊 之者也分剛於柔分柔於剛象交得其情也動而明 之義皆得於理也雷震電照威以明之隱無不彰果 辨之也柔上治之主也雖不若剛徳而運於無所用 獄而正之者也 象曰雷電噬嗑先王以明罰敕法 雷震電照震而後明得於情實也先王明其罪告其 法然後誅之而民莫怨其上也 初九屨校滅趾无咎象曰屨校滅趾不行也 屨校以木禁足如履屨也罪其初過之小也懲而戒 之校足没趾而已其咎不行小人福不至於大罪戒 為治者不可以不禁其微 六二噬膚滅鼻无咎象曰噬膚滅鼻乘剛也 噬而得位物不敢抗噬膚之...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_003.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 7190, "nonspace_chars": 6469, "kana_chars": 0, "han_chars": 6429, "origi...
kanripo/KR1a0002/KR1a0002_004.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
6,537
8,277
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_004.txt
cc-by-sa-4.0
0dd81e8baed2fc790d3fa1a547a6a354d79d2aad40919b1228ac9e9fe96dd6c6
欽定四庫全書 子夏易傳卷四 周易 下經咸傳第四 ䷞(艮下/兑上) 咸亨利貞取女吉彖曰咸感也柔上而剛下二氣感應 以相與止而説男下女是以亨利貞取女吉也天地感 而萬物化生聖人感人心而天下和平觀其所感而天 地萬物之情可見矣 二氣之相感應也中無間也故得萬物變化乎其内 天氣下降而地氣上濟陽下陰而陰從陽也止於所 説其利之正也故取女以之吉也而感應之道取焉 聖人無為與天地準寂然虚中通天下之情因其情 而通天下之故而咸得其治則天下和平矣夫相下 而不私則感之而通也觀天地萬物之情而感一也 彖語其感大者如此也至於爻則形相趨也利相逐 也豈及於感之至哉天下忘於情而有累於質者則 於物不盡矣故見利則躁後時則絶皆凶悔之道也 象曰山上有澤咸君子以虚受人 澤説來也山止受也君...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_004.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 8681, "nonspace_chars": 7798, "kana_chars": 0, "han_chars": 7747, "origi...
kanripo/KR1a0002/KR1a0002_005.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
7,037
8,766
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_005.txt
cc-by-sa-4.0
2c7949c5fe1a4173b90eea80a94fc4ca261b4fd51bff948a0b00390fe9fa3b33
欽定四庫全書 子夏易傳卷五 周易 下經夬傳第五 ䷪(乾下/兑上) 夬揚于王庭孚號有厲告自邑不利即戎利有攸往彖 曰夬決也剛決柔也健而説決而和揚于王庭柔乘五 剛也孚號有厲其危乃光也告自邑不利即戎所尚乃 窮也利有攸往剛長乃終也 陽長終位而陰微也君子在位小人在野健制而能 悦之不隱情也剛決而能和之不任力而剛不過中 也故顯于王庭而民得治也夫用九即吉於无首也 剛長即凶於用壯也道之窮則不富矣其危矣哉信 有危而思患呻號終无刑乃保其光也告自邑揚而 令之從也不利即戎肆剛騁力道途斯變利有攸往 柔道外而剛治遂終也 象曰澤上於天夬君子以施禄及下居徳則忌 澤上於天上澤以及下也上以明法決治致其平也 君子以施禄及下惠其澤也選徳以居其位取則以 上為禁盡已而不敢上越也 ...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_005.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 9177, "nonspace_chars": 8261, "kana_chars": 0, "han_chars": 8205, "origi...
kanripo/KR1a0002/KR1a0002_006.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
5,589
6,937
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_006.txt
cc-by-sa-4.0
7ea5f11610c7731c09d8aae0b0c72befa48de8cb2476c81a0467f0031854454f
欽定四庫全書 子夏易𫝊卷六 周易 下經豐傳第六 ䷶(離下/震上) 豐亨王假之勿憂宜日中彖曰豐大也明以動故豐王 假之尚大也勿憂宜日中宜照天下也日中則昃月盈 則食天地盈虚與時消息而况於人乎况於鬼神乎 夫明者内含其照也動而施之乃豐也明以時動物 伸其直得盡其大生長之而遂成也期盛之矣豐之 道者也唯尚大而當之故王能極之也不失天下之 情則勿憂而旣治矣日之明盛於中也王宜照於天 下也則無微而不大也過於中則憂大斯盈盈斯缺 矣大之道也蓋聖人戒乎其大也 象曰雷電皆至豐君子以折獄致刑 雷電皆發天下文明盛大之時明刑以肅民也君子 無所隱避明以折獄而至用刑可以勿憂當日中之 宜也 初九遇其配主雖旬无咎往有尚象曰雖旬无咎過旬 災也 豐尚大也唯其大者至之以陽遇四務同而...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_006.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 7255, "nonspace_chars": 6539, "kana_chars": 0, "han_chars": 6496, "origi...
kanripo/KR1a0002/KR1a0002_007.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
5,556
7,537
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_007.txt
cc-by-sa-4.0
c0f94fc03a1de94d0497a9a9825f62d391b426b4f18b35195000d54190297b34
欽定四庫全書 子夏易傳卷七 周易 繫辭上第七 天尊地卑乾坤定矣卑髙以陳貴賤位矣動靜有常剛 柔斷矣方以類聚物以羣分吉凶生矣在天成象在地 成形變化見矣是故剛柔相摩八卦相盪鼓之以雷霆 潤之以風雨日月運行一寒一暑乾道成男坤道成女 乾知大始坤作成物乾以易知坤以簡能易則易知簡 則易從易知則有親易從則有功有親則可久有功則 可大可久則賢人之德可大則賢人之業易簡而天下 之理得矣天下之理得而成位乎其中矣 天尊也故健以首之地卑也故順以承之尊卑列而 貴賤明矣盈乎中者莫大象類焉夫婦也父子也君 臣也尊動而變卑靜而化剛柔以斷其用而得其常 也正其分位觀其動靜然後理可得也夫物同其事 則聚之有上下之應也異其羣則分之有剛柔之合 也趨其同求其羣居其位或不當則吉凶生也故天 ...
{"source_record_id": "kanripo/KR1a0002/KR1a0002_007.txt", "work_id": null, "edition_id": null, "order": null, "date_evidence": {"dynasty": "周", "dynasty_raw": "周", "classification_source": "catalog_dynasty"}, "language": null, "quality": {"chars": 7866, "nonspace_chars": 7167, "kana_chars": 0, "han_chars": 7167, "origi...
kanripo/KR1a0002/KR1a0002_008.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
5,596
7,326
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_008.txt
cc-by-sa-4.0
80528a149222f5f2d2c35c5982011cad002fd0990032ce9a13a2504ef217df6b
"欽定四庫全書\n子夏易傳卷八\n周易\n繫辭下第八\n八卦成列象在其中矣因而(...TRUNCATED)
"{\"source_record_id\": \"kanripo/KR1a0002/KR1a0002_008.txt\", \"work_id\": null, \"edition_id\": nu(...TRUNCATED)
kanripo/KR1a0002/KR1a0002_009.txt
kanripo
子夏易傳
cn:周
catalog_dynasty
kanripo/KR1a0002/KR1a0002_000.txt
train
3,294
4,023
catalog_dynasty_only
han_without_kana
not_verified
kanripo/KR1a0002
kanripo/KR1a0002
volume_file
KR1a0002_009.txt
cc-by-sa-4.0
e6efd72f327aeeb6c8505aaa30f9eb8026636e1f534e75f80ff7eeaefd5e15f8
"欽定四庫全書\n子夏易𫝊卷九\n周易\n說卦傳第九\n昔者聖人之作易也幽賛於(...TRUNCATED)
"{\"source_record_id\": \"kanripo/KR1a0002/KR1a0002_009.txt\", \"work_id\": null, \"edition_id\": nu(...TRUNCATED)
End of preview. Expand in Data Studio

Classical Japanese & Literary Chinese Pretraining Corpus (pre-1868)

About 1 billion tokens of text written before 1868, the start of Japan's Meiji era. The corpus covers classical Japanese (古文), early-modern Japanese and Literary Chinese (漢文) as it was read in premodern Japan. It is cleaned, deduplicated and split for language-model pretraining.

The goal is to study a language model that has never seen modern text: what it knows, how it writes, and how it differs from models trained on today's web. This corpus was used to train classical-smollm2-trunk, a small model trained from scratch.

Quick start

from datasets import load_dataset

ds = load_dataset("kuramot6f/classical-ja-pretrain")             # splits: train / validation / test
row = ds["validation"][0]
print(row["title"], row["era"], row["license"])
print(row["text"][:200])

# Stream without downloading everything (~1.6 GB):
for row in load_dataset("kuramot6f/classical-ja-pretrain", split="train", streaming=True).take(3):
    print(row["source"], row["title"])

# Commercial use: drop the non-commercial (CBETA) rows
ds = ds.filter(lambda r: r["license"] != "cc-by-nc-sa-3.0-tw")

What's inside

source what it is docs tokens license
NDL OCR of digitized books published ≤1867, from Japan's National Diet Library 30,213 452M Public Domain Mark
Kanripo (漢籍リポジトリ) Premodern Chinese classics: Siku Quanshu, Daoist canon, ... 59,856 406M CC BY-SA 4.0
Kanripo, CBETA-derived Buddhist canon texts based on the CBETA edition 12,975 133M CC BY-NC-SA 3.0 TW
Wikisource (ja) Volunteer transcriptions of classical Japanese works (e.g. 源氏物語, 土佐日記) 987 10.3M CC BY-SA 4.0
Minna de Honkoku (みんなで翻刻) Crowd-sourced transcriptions of handwritten Edo-period documents 10,657 2.4M CC BY-SA 4.0
total 114,688 1.00B mixed, per row

Token counts use the project's 32k SentencePiece tokenizer, classical-ja-tokenizer.

By era, the corpus is mostly Chinese texts (about 56%) and Edo-period Japan (1603–1868, about 31%). It also includes Muromachi, Azuchi–Momoyama, Kamakura, Nanbokuchō and Heian texts, plus about 8% of NDL books whose exact era is unknown but which were published no later than 1867.

Splits

split docs tokens
train 110,593 977.1M
validation 1,684 15.1M
test 2,411 11.6M

Splits are made by work, not by document. Every volume of a multi-volume work lands in the same split, so a model can't see volume 3 in training and be tested on volume 4. The split is stratified by source and era.

Columns

column description
text the document text (cleaned and Unicode-normalized)
id unique id, <source>/<original path or id>
source ndl, kanripo, wikisource or minhon
license pdm-1.0, cc-by-sa-4.0 or cc-by-nc-sa-3.0-tw; see LICENSES
title title from the source catalog
era e.g. edo, muromachi, heian, cn:唐 (Chinese dynasty), unknown
era_basis what the era is based on: publication year, catalog dynasty, ...
group the work this document belongs to (the unit used for splitting)
split train, validation or test
tokens token count with classical-ja-tokenizer, without BOS/EOS
normalized_chars character count
date_status, script_profile how the date was determined; script mix (e.g. han_without_kana = pure kanbun)
source_document_id, work_candidate_id, unit_type, unit_label structure ids (book, volume, page)
text_sha256 hash of text
metadata JSON string with the rest of the provenance: date evidence, OCR-quality statistics, original file hashes

How it was built

  1. Collect texts dated before 1868 from the four sources. NDL items were selected from NDL's open bibliographic dataset by an explicit publication year ≤1867.
  2. Clean each source: strip markup, remove OCR noise and duplicates, normalize characters. NDL OCR also went through a quality audit.
  3. Unify and filter: apply common normalization; drop Kanripo texts whose dynasty couldn't be determined and documents without reliable pre-1868 evidence.
  4. Group volumes into works and split.

The per-source cleaned text, before unification, is in classical-ja-sources. The scripts are in code/.

Repository layout

data/       parquet shards (train-0000x-of-00010, validation, test)
LICENSES/   per-source license terms and attribution
meta/       build reports, the list of excluded documents, work groups, fixed evaluation windows
code/       the scripts that built this corpus (Apache-2.0); worklog/ has the research notes (mostly Japanese)

License

Every document keeps its source's license, shown in the license column. Details and required attribution are in LICENSES/README.md.

  • pdm-1.0: NDL OCR text of public-domain books. Free to use; NDL asks you to note that the data was processed.
  • cc-by-sa-4.0: Kanripo, Wikisource, Minna de Honkoku. Attribution and share-alike required.
  • cc-by-nc-sa-3.0-tw: CBETA-derived Buddhist texts. Non-commercial only; keep the CBETA notice.

Limitations

  • NDL text is uncorrected OCR of woodblock prints and manuscripts and contains recognition errors.
  • Era labels come from publication dates or catalog dynasties, which can differ from when a work was written.
  • The corpus is dominated by Chinese texts and Edo-period printed books. Heian and Kamakura literature is a small fraction.
  • Texts reflect the views of their time, including religious, political and social views that may be offensive today.

Citation

If you use this corpus, please cite this repository and the original sources listed in LICENSES.

Downloads last month
50

Models trained or fine-tuned on kuramot6f/classical-ja-pretrain