CoolFace
Datasetpublic

asd567557275/zhtw-roleplay-space-grimoire

Space Grimoire RP Corpus (Traditional Chinese) Speaker-attributed dialogue from the original novel 空間魔導書與少年魔法師 (The Space Grimoire and the Young Mage; 283 chapters, ~1.7M characters), cut into scenes and assembled into ShareGPT-style role-play training data. The novel and this dataset are the work of 睡半夜怎麼三更, who holds the copyright and has no exclusive platform agreement. Data: CC BY 4.0. Code: Apache 2.0. 中文說明在下方 Dataset Summary Source text 283… See the full description on the dataset page: https://huggingface.co/datasets/asd567557275/zhtw-roleplay-space-grimoire.

sourceHugging Facecc-by-4.0updated 15d agoView on Hugging Face
1likes137downloads
Dataset Card

Space Grimoire RP Corpus (Traditional Chinese)

Speaker-attributed dialogue from the original novel 空間魔導書與少年魔法師 (The Space Grimoire and the Young Mage; 283 chapters, ~1.7M characters), cut into scenes and assembled into ShareGPT-style role-play training data. The novel and this dataset are the work of 睡半夜怎麼三更, who holds the copyright and has no exclusive platform agreement. Data: CC BY 4.0. Code: Apache 2.0.

中文說明在下方

Dataset Summary

Source text283 chapters, 31,056 paragraphs, 1.74M characters (Traditional Chinese, Taiwan)
Quoted segments16,340 (16,090 dialogue lines; the rest are quoted terms such as spell names)
Lines with a named speaker14,085
Scenes917
ShareGPT rows1,671 (7,076 character turns; train 1,502 / validation 169)
Flat rows10,252 (train 9,211 / validation 1,041)
Unresolved speaker73 lines (0.45%); 45 of these are newspapers, documents, inscriptions or bare ellipses

Supported Tasks

Character role-play fine-tuning (multi-turn, one target character per sample), speaker attribution, dialogue tone analysis.

Languages

Traditional Chinese (zh-Hant, Taiwan usage).

Dataset Structure

Data Instances

ShareGPT row (sft/*_sharegpt.jsonl):

json
{"conversations": [
   {"from": "system", "value": "你是《空間魔導書與少年魔法師》裡的芙雷德莉卡。現在的時間點是序卷・序章 蒸氣列車,只知道到這裡為止發生的事。……"},
   {"from": "human",  "value": "(場景:深夜,蒸氣列車商務車廂)\n維吉尼亞:「哎呀……!」\n……"},
   {"from": "gpt",    "value": "*芙雷德理所當然的回答。* 「我拒絕,空間是非常危險的力量……」"}],
 "character": "芙雷德莉卡", "chapter": 1, "part": "序卷", "scene_id": "sc00000", "n_gpt_turns": 4, "split": "train"}

Data Fields

data/utterances.jsonl, one row per quoted segment:

FieldDescription
uidu{pid:06d}_{quote_idx}; pid is the paragraph id in data/paragraphs.jsonl, quote_idx the index of the quote within that paragraph
chapter, pid, quote_idx, text, n_charsLocation and content
speakerCanonical character name, or __anon__ (unnamed bystander), __group__ (several people at once), __unknown__ (not determinable from the text)
speaker_typenamed / anon / group / unknown
speaker_descDescription when anon or group (e.g. "the guard at the gate")
addresseeList of canonical names the line is spoken to
modalityspoken, thought, written, broadcast, recalled, term
toneOne or two labels from a closed list of 24; subjective, use as a style hint only
evidence, evidence_kindThe 8–15 character span the annotator relied on, and its type: cue (same paragraph), neighbor, turn (turn-taking), content, none
alias_usedHow the text refers to the speaker at that moment (alias, nickname, description); useful for cross-chapter identity linking
new_scene, settingAnnotator's scene-break judgement and setting description
agreement0.5 = single annotator vote; 1.0 = ruled by the author
flagse.g. verifier_override, author_ruling, auto_fill, nonperson_text, silence
verifySampled review result {verdict, note}; superseded_by is set when an author ruling replaced it
speaker_before_verify, speaker_before_adjudicationPrevious values, for traceability
narration_before, narration_afterNarration adjacent to the quote in the same paragraph

data/scenes.jsonl: scene_id, chapter, part, pid_start, pid_end, break_reason, setting_hint, participants, uids.

data/paragraphs.jsonl: the full novel text, one paragraph per row: pid, part, chapter, chapter_in_part, chapter_title, role (body, chapter_title, part_title, front), text.

sft/flat_utterances.jsonl: one target-character line per row with the previous five turns as context, intervening narration, setting_hint, tone, addressee.

Data Splits

Scenes are split 9:1; train and validation never share a scene.

Configtrainvalidation
sharegpt1,502169
flat9,2111,041

Characters in the SFT files

CharacterTrainable linesShareGPT rowsNote
威爾斯4,064616male lead
芙雷德莉卡2,386501female lead; appears under the alias 德麗絲 in some chapters
質麗公主1,042143appears under the alias 拉洛莉亞 in most chapters
禮西奈79583
珊德菈516102
奧蘿菈42753
霄26035
米哈伊爾17230auto-included (≥150 lines)
海因里希17023
拉娃15722auto-included
夏綠蒂14549
蓮華11814

SFT filter: speaker_type == named, modality in {spoken, broadcast}, and not marked uncertain by review. Edit targets in src/p5_config.json and rerun python src/p5_sft.py to change the character set.

Dataset Creation

Source Data

The author's final manuscript (.docx, 2026-09-12 revision), converted to one paragraph per line; the front-matter contact line was removed. Paragraph ids (pid) are stable across all files in this repository.

Annotations

  1. 1.Labelling: Claude Opus 5 labelled every chapter with the schema above, citing an 8–15 character evidence span per line.
  2. 2.Review: Claude Fable 5.1 reviewed a sample of 1,721 lines (all unresolved and flagged lines plus 10% of the rest): 1,574 ok, 101 wrong, 46 uncertain. Most "wrong" verdicts were __unknown__/__anon__ labels that the reviewer resolved to a name. Only 15 lines (0.9%) carried a wrong name; all were characters labelled as bystanders before their name is revealed, and all are corrected.
  3. 3.Author rulings: the author personally ruled 52 lines; 15 more were filled from unambiguous context. Rulings are listed in data/adjudications.json and applied by src/p6_adjudicate.py.

Pipeline code and prompts are in src/.

Personal and Sensitive Information

None. The text is fiction.

Considerations for Using the Data

  • —Characters who appear before their name is revealed may occasionally still be labelled __anon__ (estimated < 1%). alias_used supports cross-chapter identity linking.
  • —Chapter 247 did not go through the sampled review.
  • —tone is a model judgement, not ground truth.
  • —The SFT system prompt frames each sample at its point in the story ("you only know what has happened so far"); characters' knowledge and stance change across the nine parts.

Additional Information

  • —Author: 睡半夜怎麼三更
  • —License: data CC BY 4.0, code Apache 2.0
  • —Training example: train/train_unsloth.py (Qwen3-8B 4-bit QLoRA, loss on gpt turns only), see train/README.md.

Citation

bibtex
@misc{space_grimoire_rp_2026,
  title  = {Space Grimoire RP Corpus (Traditional Chinese)},
  author = {睡半夜怎麼三更},
  year   = {2026},
  note   = {Speaker-attributed dialogue and ShareGPT role-play data from the novel 空間魔導書與少年魔法師},
  license = {CC-BY-4.0}
}

《空間魔導書與少年魔法師》繁體中文角色扮演語料

原創長篇小說《空間魔導書與少年魔法師》(283 章、約 174 萬字)全書對白的說話者標註,切成場景後組成 ShareGPT 格式的角色扮演訓練資料。小說與本資料集皆為 睡半夜怎麼三更 的作品,版權作者自有,未與任何平台簽訂獨家授權。資料採 CC BY 4.0,程式採 Apache 2.0。

概要

原文283 章、31,056 段、174 萬字(台灣繁體)
引號片段16,340(對白 16,090 句,其餘為法術名等名詞引號)
有正名說話者的對白14,085
場景917
ShareGPT 列1,671(7,076 個角色回合;train 1,502 / validation 169)
flat 列10,252(train 9,211 / validation 1,041)
說話者未定73 句(0.45%),其中 45 句是報紙、文件、石碑或純省略號

用途

角色扮演微調(多輪、一列一個目標角色)、說話者歸屬、對白語氣分析。

資料結構

範例

ShareGPT 列(sft/*_sharegpt.jsonl):system 帶角色名、篇章時間點(「只知道到這裡為止發生的事」)與假名提示;human 是場景描述、敘述與其他人的台詞;gpt 是目標角色的台詞,前面用 *…* 帶原文的動作描寫。超過 40 句的場景切成 30 句一窗、重疊 5 句。範例見上方英文段。

欄位

data/utterances.jsonl,一列一個引號片段:

欄位說明
uidu{pid:06d}_{quote_idx};pid 是 data/paragraphs.jsonl 的段落編號,quote_idx 是同段第幾個引號
chapter、pid、quote_idx、text、n_chars位置與內容
speaker名冊正名,或 __anon__(無名路人)、__group__(多人同聲)、__unknown__(原文無法判定)
speaker_typenamed / anon / group / unknown
speaker_descanon、group 時的描述
addressee對誰說(正名列表)
modalityspoken 口語 / thought 心聲 / written 書面 / broadcast 廣播錄音 / recalled 引述 / term 名詞引號
tone1–2 個語氣詞,24 詞封閉詞表;主觀欄,只當風格提示
evidence、evidence_kind標註員引用的 8–15 字原文依據及其類型:cue 同段明寫 / neighbor 鄰段 / turn 輪替 / content 內容 / none
alias_used此刻原文對該角色的稱呼(假名、綽號、外貌代稱),可做跨章身分連結
new_scene、setting標註員判定的場景切點與場景描述
agreement0.5=單票標註;1.0=作者裁定
flagsverifier_override、author_ruling、auto_fill、nonperson_text、silence 等
verify抽審結果 {verdict, note};被作者裁定取代時有 superseded_by
speaker_before_verify、speaker_before_adjudication改前的值
narration_before、narration_after同段緊鄰的敘述

data/scenes.jsonl:scene_id、chapter、part、pid_start、pid_end、break_reason、setting_hint、participants、uids。

data/paragraphs.jsonl:小說全文,一段一列:pid、part、chapter、chapter_in_part、chapter_title、role(body / chaptertitle / parttitle / front)、text。

sft/flat_utterances.jsonl:一句一列,帶前五句 context、中間敘述、setting_hint、tone、addressee。

切分

依場景 9:1,train 與 validation 不共用場景。

SFT 收錄角色

威爾斯 4,064 句、芙雷德莉卡 2,386、質麗公主 1,042(多數章節用假名拉洛莉亞)、禮西奈 795、珊德菈 516、奧蘿菈 427、霄 260、米哈伊爾 172、海因里希 170、拉娃 157、夏綠蒂 145、蓮華 118。過濾規則:speaker_type=named、modality 為 spoken 或 broadcast、審核未判不確定。改 src/p5_config.json 的 targets 後重跑 python src/p5_sft.py 即可換角色。

製作流程

原文

作者定稿 .docx(2026-09-12 修訂版)轉成一段一行,前言的聯絡資訊已移除。段落編號 pid 在本資料集所有檔案間一致。

標註

  1. 1.標註:Claude Opus 5 逐章標註,每句引用 8–15 字原文依據。
  2. 2.審核:Claude Fable 5.1 抽審 1,721 句(未定句、旗標句必審,另抽一成):ok 1,574、wrong 101、uncertain 46。wrong 多數是 __unknown__/__anon__ 被審核補回正名;「標了名字但錯」15 句(0.9%),全部是角色報名字前被標成路人,已修正。
  3. 3.作者裁定:作者親自裁定 52 句,另 15 句依明確前後文回填。清單在 data/adjudications.json,由 src/p6_adjudicate.py 套用。

管線程式與 prompt 在 src/。

個人資訊

無,內容為虛構小說。

使用注意

  • —報名字前出場的角色可能仍有少數被標成 __anon__(估計 <1%),可用 alias_used 做跨章連結。
  • —第 247 章未經抽樣審核。
  • —tone 是模型判斷,不是真值。
  • —system prompt 把每個樣本定在故事的當下時間點,角色的認知與立場在九篇之間會變。

其他

  • —作者:睡半夜怎麼三更
  • —授權:資料 CC BY 4.0,程式 Apache 2.0
  • —訓練範例:train/train_unsloth.py(Qwen3-8B 4bit QLoRA,只對 gpt 輪算 loss),說明見 train/README.md
  • —引用格式見上方英文段。