feat: 標註工具與試跑 (#5)
標籤白名單、標註指示、批次切分、合併與檢查、抽查清單,以及 100 句試跑結果。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
9cf8196a3e
commit
c85e00a56e
@@ -46,3 +46,25 @@ python3 -I tools/corpus/extract_dialogues.py ~/anime-companion-data/sao/wiki ~/a
|
||||
```bash
|
||||
cd tools/corpus && python3 -m unittest -q test_extract_dialogues
|
||||
```
|
||||
|
||||
## 3. 標註(W4)
|
||||
|
||||
規則只判定約一成,其餘由 Claude sub-agent 標註說話者、功能標籤與情緒。標籤白名單在 `tags.json`,標註指示在 `label_prompt.md`。
|
||||
|
||||
```bash
|
||||
# 試跑:分層抽樣 100 句(未判定 50、規則中信心 25、規則高信心 25)
|
||||
python3 tools/corpus/make_batches.py ~/anime-companion-data/sao/dialogues.jsonl ~/anime-companion-data/sao/labeling/pilot/in --pilot 100
|
||||
# 每個批次檔交給一個 sub-agent,輸出同名 jsonl 到 .../pilot/out/
|
||||
python3 tools/corpus/merge_labels.py ~/anime-companion-data/sao/dialogues.jsonl ~/anime-companion-data/sao/labeling/pilot/out ~/anime-companion-data/sao/labeling/pilot/merged.jsonl --review-dir ~/anime-companion-data/sao/labeling/pilot/review
|
||||
```
|
||||
|
||||
- 批次檔不含規則判定的說話者,讓標註獨立,才能和規則比對。
|
||||
- 只採用 `confidence=high` 的說話者;`unknown`、`none`(非說出口的「」)與其他信心都視為未判定。
|
||||
- 標籤不在白名單內的整筆丟棄。
|
||||
- `--review-dir` 為亞絲娜與直葉各輸出最多 20 句抽查清單。
|
||||
|
||||
### 試跑結果(100 句)
|
||||
|
||||
- 標註全部通過白名單檢查,採用 70 句(high 且非 unknown)。
|
||||
- 規則高信心與標註一致 20/25,中信心 15/25。不一致的例子顯示規則會把「對她說道」的聽者當成說話者,也會把「我眼前」的「我」當成說話者,所以最終以標註為準,規則只當參考。
|
||||
- sub-agent 回報的模糊處(非說出口的「」、無名角色、信心門檻)已補進 `label_prompt.md`。
|
||||
|
||||
Reference in New Issue
Block a user