danmakucurve 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. danmakucurve-1.1.0/LICENSE +21 -0
  2. danmakucurve-1.1.0/PKG-INFO +333 -0
  3. danmakucurve-1.1.0/README.md +271 -0
  4. danmakucurve-1.1.0/adapters.py +262 -0
  5. danmakucurve-1.1.0/app.py +425 -0
  6. danmakucurve-1.1.0/batch.py +524 -0
  7. danmakucurve-1.1.0/cache.py +204 -0
  8. danmakucurve-1.1.0/calibrate.py +444 -0
  9. danmakucurve-1.1.0/curve.py +462 -0
  10. danmakucurve-1.1.0/danmaku.py +164 -0
  11. danmakucurve-1.1.0/danmakucurve.egg-info/PKG-INFO +333 -0
  12. danmakucurve-1.1.0/danmakucurve.egg-info/SOURCES.txt +47 -0
  13. danmakucurve-1.1.0/danmakucurve.egg-info/dependency_links.txt +1 -0
  14. danmakucurve-1.1.0/danmakucurve.egg-info/entry_points.txt +5 -0
  15. danmakucurve-1.1.0/danmakucurve.egg-info/requires.txt +20 -0
  16. danmakucurve-1.1.0/danmakucurve.egg-info/top_level.txt +17 -0
  17. danmakucurve-1.1.0/distill.py +501 -0
  18. danmakucurve-1.1.0/importers.py +364 -0
  19. danmakucurve-1.1.0/label.py +225 -0
  20. danmakucurve-1.1.0/llm_label.py +511 -0
  21. danmakucurve-1.1.0/manifest.py +275 -0
  22. danmakucurve-1.1.0/pyproject.toml +99 -0
  23. danmakucurve-1.1.0/run.py +461 -0
  24. danmakucurve-1.1.0/setup.cfg +4 -0
  25. danmakucurve-1.1.0/taxonomies/__init__.py +1 -0
  26. danmakucurve-1.1.0/taxonomies/classroom_feedback.yaml +48 -0
  27. danmakucurve-1.1.0/taxonomies/en_stream_emotions.yaml +52 -0
  28. danmakucurve-1.1.0/taxonomies/zh_danmaku_5.yaml +212 -0
  29. danmakucurve-1.1.0/taxonomy.py +401 -0
  30. danmakucurve-1.1.0/tests/test_adapters.py +172 -0
  31. danmakucurve-1.1.0/tests/test_adaptive_curve.py +135 -0
  32. danmakucurve-1.1.0/tests/test_batch.py +196 -0
  33. danmakucurve-1.1.0/tests/test_cache.py +181 -0
  34. danmakucurve-1.1.0/tests/test_calibrate.py +161 -0
  35. danmakucurve-1.1.0/tests/test_context_prompt.py +154 -0
  36. danmakucurve-1.1.0/tests/test_css_improvements.py +666 -0
  37. danmakucurve-1.1.0/tests/test_decode.py +39 -0
  38. danmakucurve-1.1.0/tests/test_distill.py +116 -0
  39. danmakucurve-1.1.0/tests/test_importers.py +209 -0
  40. danmakucurve-1.1.0/tests/test_laugh_rule.py +23 -0
  41. danmakucurve-1.1.0/tests/test_manifest.py +125 -0
  42. danmakucurve-1.1.0/tests/test_packaging.py +55 -0
  43. danmakucurve-1.1.0/tests/test_pipeline.py +81 -0
  44. danmakucurve-1.1.0/tests/test_taxonomy.py +136 -0
  45. danmakucurve-1.1.0/tests/test_validate.py +107 -0
  46. danmakucurve-1.1.0/tests/test_vllm_label.py +170 -0
  47. danmakucurve-1.1.0/tests/test_web_app.py +169 -0
  48. danmakucurve-1.1.0/validate.py +710 -0
  49. danmakucurve-1.1.0/vllm_label.py +216 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DanmakuCurve contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,333 @@
1
+ Metadata-Version: 2.4
2
+ Name: danmakucurve
3
+ Version: 1.1.0
4
+ Summary: Time-aligned emotion curves, soft-probability labeling, cross-platform adapters, proportion calibration, and CSS validation tooling.
5
+ Author-email: Alex Chen <alexchen2027@u.northwestern.edu>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 DanmakuCurve contributors
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/alexxhchen-nu/danmakucurve
29
+ Project-URL: Repository, https://github.com/alexxhchen-nu/danmakucurve
30
+ Project-URL: Issues, https://github.com/alexxhchen-nu/danmakucurve/issues
31
+ Keywords: computational-social-science,danmaku,emotion-analysis,bilibili,youtube-live-chat,twitch-chat,niconico,time-series,llm-annotation
32
+ Classifier: Development Status :: 4 - Beta
33
+ Classifier: Intended Audience :: Science/Research
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
42
+ Requires-Python: >=3.9
43
+ Description-Content-Type: text/markdown
44
+ License-File: LICENSE
45
+ Requires-Dist: matplotlib
46
+ Requires-Dist: requests
47
+ Requires-Dist: jieba
48
+ Requires-Dist: cnsenti
49
+ Requires-Dist: PyYAML>=6.0
50
+ Requires-Dist: numpy
51
+ Provides-Extra: web
52
+ Requires-Dist: gradio>=4.0; extra == "web"
53
+ Provides-Extra: llm
54
+ Requires-Dist: torch; extra == "llm"
55
+ Requires-Dist: transformers; extra == "llm"
56
+ Requires-Dist: accelerate; extra == "llm"
57
+ Provides-Extra: vllm
58
+ Requires-Dist: vllm>=0.6; extra == "vllm"
59
+ Provides-Extra: dev
60
+ Requires-Dist: pytest; extra == "dev"
61
+ Dynamic: license-file
62
+
63
+ <div align="center">
64
+
65
+ <picture>
66
+ <source media="(prefers-color-scheme: dark)" srcset="docs/banner-dark.svg">
67
+ <img src="docs/banner-light.svg" alt="DanmakuCurve · 弹幕 → 情绪曲线 · danmaku → emotion curve" width="640">
68
+ </picture>
69
+
70
+ **💬 → 📈 Turn one Bilibili video's danmaku into a time-aligned emotion curve.**<br>
71
+ **💬 → 📈 把一个 B 站视频的弹幕标成 5 种情绪,按视频时间画成情绪曲线。**
72
+
73
+ ![license](https://img.shields.io/badge/license-MIT-7c3aed?style=flat-square)
74
+ ![python](https://img.shields.io/badge/python-3-7c3aed?style=flat-square&logo=python&logoColor=white)
75
+ ![colab](https://img.shields.io/badge/Colab-T4%20GPU-7c3aed?style=flat-square&logo=googlecolab&logoColor=white)
76
+ ![model](https://img.shields.io/badge/model-Qwen2.5--1.5B-7c3aed?style=flat-square)
77
+
78
+ 🌍 [English](#-english) · 🌏 [简体中文](#-简体中文)
79
+
80
+ </div>
81
+
82
+ ![Example curve / 示例曲线](docs/example_curve.png)
83
+
84
+ <sub>Example: a 46-second meme remix (BV1JjZsYHEHE, 360 comments), 5-second bins, laugh rules + Qwen2.5-1.5B. Purple bars are total comments per bin.<br>示例:鬼畜《哈基米:我无怨无悔》(BV1JjZsYHEHE,46 秒,360 条弹幕),每 5 秒一段,笑类规则 + Qwen2.5-1.5B 标注。浅紫色柱是每段弹幕总数。</sub>
85
+
86
+ ```mermaid
87
+ flowchart LR
88
+ A["🎬 BV id<br/>BV 号"] --> B["💬 Danmaku XML<br/>弹幕 XML"]
89
+ B --> C{"Spam or laugh slang?<br/>刷屏 / 笑类说法?"}
90
+ C -->|"spam 刷屏"| N["无感 Neutral"]
91
+ C -->|"laugh 笑"| J["开心 Joy"]
92
+ C -->|"other 其他"| Q["🤖 Qwen2.5-1.5B<br/>(GPU)"]
93
+ C -.->|"no GPU 无 GPU"| W["📖 Word list<br/>词表"]
94
+ Q --> L["5 labels<br/>5 种情绪"]
95
+ W --> L
96
+ N --> L
97
+ J --> L
98
+ L --> P["📈 Emotion curve PNG<br/>情绪曲线"]
99
+
100
+ classDef main fill:#7c3aed,stroke:#5b21b6,color:#ffffff
101
+ classDef soft fill:#ede9fe,stroke:#7c3aed,color:#2e1065
102
+ class A,P main
103
+ class B,C,N,J,Q,W,L soft
104
+ ```
105
+
106
+ **🏷️ Labels / 标签**
107
+ ![开心 Joy](https://img.shields.io/badge/%E5%BC%80%E5%BF%83-Joy-7c3aed?style=flat-square)
108
+ ![惊讶 Surprise](https://img.shields.io/badge/%E6%83%8A%E8%AE%B6-Surprise-0891b2?style=flat-square)
109
+ ![感动 Moved](https://img.shields.io/badge/%E6%84%9F%E5%8A%A8-Moved-db2777?style=flat-square)
110
+ ![愤怒 Anger](https://img.shields.io/badge/%E6%84%A4%E6%80%92-Anger-d97706?style=flat-square)
111
+ ![无感 Neutral](https://img.shields.io/badge/%E6%97%A0%E6%84%9F-Neutral-a1a1aa?style=flat-square)
112
+
113
+ ---
114
+
115
+ ## 🌍 English
116
+
117
+ ### 🚀 Quick start
118
+
119
+ **☁️ Colab (recommended, nothing to install)**
120
+
121
+ 1. Download `DanmakuCurve.ipynb` and open it in [Google Colab](https://colab.research.google.com/) via **File → Upload notebook**.
122
+ 2. **Runtime → Change runtime type → T4 GPU**.
123
+ 3. Paste a video link in cell ①, then **Run all**. The curve shows at the bottom; the PNG and CSV download automatically.
124
+
125
+ Without a GPU it falls back to the word list. If fetching fails, you can upload a danmaku XML file.
126
+
127
+ **💻 Local**
128
+
129
+ ```bash
130
+ python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
131
+ .venv/bin/python run.py --xml data/sample_BV1614y197xJ.xml --bin auto
132
+ .venv/bin/python run.py --input data/sample_BV1JjZsYHEHE.xml --bin auto --relative-progress
133
+ .venv/bin/python run.py --url https://www.bilibili.com/video/BV1JjZsYHEHE --bin 5
134
+ .venv/bin/python run.py --batch data/sample_BV1JjZsYHEHE.xml data/sample_BV1614y197xJ.xml --proportion --show-neutral --resume
135
+ ```
136
+
137
+ This writes `output/curve.png`, `output/labels.csv` (UTF-8 with BOM for Excel), and `output/run_manifest.json` (reproducible run metadata). Key options: `--input` platform-agnostic XML/CSV/JSONL (with optional `--time-col` / `--text-col`), `--taxonomy` built-in template (`zh_danmaku_5`, `en_stream_emotions`, `classroom_feedback`) or custom YAML path, `--bin` seconds per bin or `auto` (duration-adaptive), `--relative-progress` 0%–100% progress axis, `--llm` local Qwen soft-probability scoring, `--proportion` per-bin proportions, `--show-neutral` default/neutral baseline, `--include-meta` bucketed timestamps and double-salted anonymized sender IDs, `--cache-db` / `--no-cache` SQLite cache, and `--resume` batch checkpoint resume.
138
+
139
+ `run.py` uses the word list by default (no GPU needed). To label with Qwen locally (or pass `--llm` to `run.py`):
140
+
141
+ ```bash
142
+ .venv/bin/pip install torch transformers
143
+ ```
144
+
145
+ ```python
146
+ from danmaku import parse_xml
147
+ from llm_label import LLMLabeler, label_all_llm
148
+ from curve import plot
149
+
150
+ rows = parse_xml(open("data/sample_BV1JjZsYHEHE.xml", encoding="utf-8").read())
151
+ labeled = label_all_llm(rows, LLMLabeler()) # Qwen/Qwen2.5-1.5B-Instruct (pass return_probs=True for 5-class probabilities)
152
+ plot(labeled, "curve.png", bin_sec=5, proportion=True, show_neutral=True)
153
+ ```
154
+
155
+ 🧪 Tests (offline): `.venv/bin/pip install pytest && .venv/bin/python -m pytest tests`
156
+
157
+ **🌐 Web UI (Gradio, local or Hugging Face Spaces)**
158
+
159
+ ```bash
160
+ .venv/bin/pip install -e ".[web]"
161
+ .venv/bin/python app.py
162
+ ```
163
+
164
+ Open `http://127.0.0.1:7860` to try bundled sample XMLs offline, paste a Bilibili URL, or upload an XML file, toggle proportion / neutral baseline / anonymized metadata, and download the PNG and CSV directly.
165
+
166
+ **📐 Cross-genre validation (`validate.py`)**
167
+
168
+ ```bash
169
+ .venv/bin/python validate.py sample --inputs data/sample_BV1614y197xJ.xml data/sample_BV1JjZsYHEHE.xml --genres house meme --n-per-video 50 --out output/annotation_template.csv
170
+ .venv/bin/python validate.py evaluate --csv output/annotation_completed.csv
171
+ ```
172
+
173
+ 📚 Methodology & limitations: [Computational Social Science Implications](docs/css-implications-en.md) · [Scaling & General Research Toolkit Roadmap](docs/scaling-roadmap.md)
174
+
175
+ ### 🏷️ Five labels
176
+
177
+ | Label | Examples |
178
+ |---|---|
179
+ | 🟣 **Joy** 开心 | 哈哈哈, 笑死, 没绷住, 可爱, memes |
180
+ | 🔵 **Surprise** 惊讶 | 卧槽, 居然, 离谱; also praise (牛, 厉害) |
181
+ | 🩷 **Moved** 感动 | 泪目, 破防, 暖心, 谢谢 |
182
+ | 🟠 **Anger** 愤怒 | 恶心, 退钱, scolding |
183
+ | ⚪ **Neutral** 无感 | statements, questions, template spam (正在看), ads |
184
+
185
+ ### ⚙️ How it works
186
+
187
+ 1. **Fetch**: the public Bilibili endpoint by BV id, no login (`danmaku.py`).
188
+ 2. **Rules first**: spam and ads → Neutral; laugh slang (没绷住, 难绷, 笑死, 2333, hhh…) → Joy, before any model (`SPAM`, `LAUGH` in `label.py`).
189
+ 3. **Qwen2.5-1.5B-Instruct** (Apache 2.0) labels the rest. It only compares the probability of each label's first token, so the output is always one of the five (`llm_label.py`).
190
+ 4. **Word-list fallback** without a GPU: danmaku slang rules plus the [cnsenti](https://github.com/thunderhit/cnsenti) emotion lexicon (乐 / 怒 / 惧 only).
191
+ 5. **Plot**: count per time bin, one line per emotion (`curve.py`).
192
+
193
+ Optional: the notebook can call any OpenAI-compatible API. The key lives in Colab Secrets, never in code.
194
+
195
+ ### ⚠️ Known limitations
196
+
197
+ - Sarcasm and context-dependent lines get mislabeled. "就没偷摸骂我两句吧" (a joke: "didn't you secretly curse me?") → Anger; "听了十遍还在听" ("listened ten times and still going") → Neutral.
198
+ - There is no "admiration" class, so praise counts as Surprise.
199
+ - The rules were tuned on three sample videos; other genres will be less accurate.
200
+ - The public endpoint returns only about 1,000–1,200 comments per video (not all of them), first part only.
201
+ - Some networks can't reach Bilibili. Save the XML and use `--xml`.
202
+ - Not yet: emotion-contagion stats.
203
+
204
+ ### 🎯 Scope
205
+
206
+ Please use it only on non-political videos (entertainment, daily life, animals, memes). This project does not analyze political content.
207
+
208
+ ### 🗂️ Sample data
209
+
210
+ `data/` holds danmaku from three public videos, time and text only, no user IDs. A few real spam ads are kept to test filtering. Uploaders can ask for removal via an issue.
211
+
212
+ ---
213
+
214
+ ## 🌏 简体中文
215
+
216
+ ### 🚀 快速开始
217
+
218
+ **☁️ Colab(推荐,不用装东西)**
219
+
220
+ 1. 下载 `DanmakuCurve.ipynb`,在 [Google Colab](https://colab.research.google.com/) 里 **文件 → 上传笔记本**。
221
+ 2. **代码执行程序 → 更改运行时类型 → T4 GPU**。
222
+ 3. 在 ① 里填视频链接,然后 **全部运行**。图显示在最下面,PNG 和 CSV 会自动下载。
223
+
224
+ 没有 GPU 时自动改用词表;抓不到弹幕时可以上传弹幕 XML。
225
+
226
+ **💻 本地**
227
+
228
+ ```bash
229
+ python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
230
+ .venv/bin/python run.py --xml data/sample_BV1614y197xJ.xml --bin auto
231
+ .venv/bin/python run.py --input data/sample_BV1JjZsYHEHE.xml --bin auto --relative-progress
232
+ .venv/bin/python run.py --url https://www.bilibili.com/video/BV1JjZsYHEHE --bin 5
233
+ .venv/bin/python run.py --batch data/sample_BV1JjZsYHEHE.xml data/sample_BV1614y197xJ.xml --proportion --show-neutral --resume
234
+ ```
235
+
236
+ 输出 `output/curve.png`(曲线)、`output/labels.csv`(带 UTF-8 BOM,Excel 双击不乱码)和 `output/run_manifest.json`(期刊级可复现清单),并在终端打印白话峰值摘要。常用参数:`--input` 导入平台无关 XML/CSV/JSONL(可配 `--time-col`/`--text-col`),`--taxonomy` 切换内置模板(`zh_danmaku_5` / `en_stream_emotions` / `classroom_feedback`)或自定义 YAML,`--bin auto` 按视频时长自适应分段,`--relative-progress` 切换 0%–100% 相对进度横轴,`--llm` 本地 Qwen 软概率标注,`--proportion` 情绪占比视图,`--show-neutral` 显示兜底基线,`--include-meta` 导出脱敏元数据,`--cache-db` / `--no-cache` 控制本地 SQLite 缓存,`--resume` 批量断点续跑。
237
+
238
+ `run.py` 默认只用词表,不需要 GPU。本地想用 Qwen 标注:先 `pip install torch transformers`,再加 `--llm` 参数或使用上面英文部分的 Python 代码。
239
+
240
+ 🧪 测试(不联网):`.venv/bin/pip install pytest && .venv/bin/python -m pytest tests`
241
+
242
+ **🌐 轻量网页界面(Gradio,本地或 Hugging Face Spaces)**
243
+
244
+ ```bash
245
+ .venv/bin/pip install -e ".[web]"
246
+ .venv/bin/python app.py
247
+ ```
248
+
249
+ 浏览器打开 `http://127.0.0.1:7860`,可直接选内置样例离线体验、贴 B 站链接或上传 XML,一键切换情绪占比、无感基线与脱敏元数据并下载 PNG 与 CSV。
250
+
251
+ **📐 跨垂类抽样与人工标注一致性评估(`validate.py`)**
252
+
253
+ ```bash
254
+ .venv/bin/python validate.py sample --inputs data/sample_BV1614y197xJ.xml data/sample_BV1JjZsYHEHE.xml --genres house meme --n-per-video 50 --out output/annotation_template.csv
255
+ .venv/bin/python validate.py evaluate --csv output/annotation_completed.csv
256
+ ```
257
+
258
+ 📚 方法论与研究局限:[计算社会科学启示](docs/css-implications.md) · [通用研究工具与规模化路线](docs/scaling-roadmap.md)
259
+
260
+ ### 🏷️ 5 种标签
261
+
262
+ | 标签 | 例子 |
263
+ |---|---|
264
+ | 🟣 **开心** | 哈哈哈、笑死、没绷住、可爱、玩梗 |
265
+ | 🔵 **惊讶** | 卧槽、居然、离谱;也包括夸人(牛、厉害) |
266
+ | 🩷 **感动** | 泪目、破防、暖心、谢谢 |
267
+ | 🟠 **愤怒** | 恶心、退钱、数落、骂人 |
268
+ | ⚪ **无感** | 陈述、提问、刷屏(正在看、弹幕飞过)、广告 |
269
+
270
+ ### ⚙️ 方法
271
+
272
+ 1. **抓弹幕**:用 B 站公开接口按 BV 号取弹幕 XML,不登录(`danmaku.py`)。
273
+ 2. **规则优先**:刷屏和广告直接判无感;笑类说法(没绷住、难绷、笑死、2333、hhh…)直接判开心,不交给模型(`label.py` 的 `SPAM`、`LAUGH`)。
274
+ 3. **Qwen2.5-1.5B-Instruct**(Apache 2.0)标其余弹幕。只比较 5 个标签第一个字的概率,所以输出一定是 5 类之一(`llm_label.py`)。
275
+ 4. **词表兜底**:没有 GPU 时用弹幕黑话词表 + 开源中文情绪词典 [cnsenti](https://github.com/thunderhit/cnsenti)(只用 乐 / 怒 / 惧)。
276
+ 5. **画图**:按视频时间分段计数,每种情绪一条线(`curve.py`)。
277
+
278
+ 可选:笔记本里也能用 OpenAI 兼容接口标注,key 放在 Colab Secrets,不写进代码。
279
+
280
+ ### ⚠️ 已知局限
281
+
282
+ - 反讽和要看上下文的句子会错。例如“就没偷摸骂我两句吧”被标成**愤怒**(其实是玩笑),“听了十遍还在听”被标成**无感**(其实是喜欢)。
283
+ - 5 类里没有“佩服”,夸人算惊讶。
284
+ - 词表是对着 3 个样例视频调的,换类型的视频准确率会低一些。
285
+ - 公开接口每个视频只返回一千多条弹幕(不是全部),只取第 1 P。
286
+ - 有些网络连不上 B 站,`--url` 会失败,可以先存 XML 再用 `--xml`。
287
+ - 还没做:情绪传染统计。
288
+
289
+ ### 🎯 使用范围
290
+
291
+ 请只用于**不涉及政治**的视频(娱乐、生活、动物、鬼畜等)。本项目不分析政治内容。
292
+
293
+ ### 🗂️ 样例数据
294
+
295
+ `data/` 里是 3 个公开视频的弹幕,只保留时间和文本,没有用户 ID。其中有少量真实的刷屏广告,用来测试过滤。如果你是视频作者、希望删除,请开 issue。
296
+
297
+ - 🐱 `sample_BV1614y197xJ.xml`:《我花了半年时间给猫做了个房子》,1,200 条
298
+ - 🎵 `sample_BV1JjZsYHEHE.xml`:《哈基米:我无怨无悔》,360 条
299
+ - 🦌 `sample_BV1YNZvYzELw.xml`:《Day97 | 在山上放一盆水,让动物们喝上水。》,332 条
300
+
301
+ ---
302
+
303
+ ## 📁 Files / 文件
304
+
305
+ | File 文件 | Purpose 用途 |
306
+ |---|---|
307
+ | `danmaku.py` | fetch, parse, and anonymize metadata · 抓弹幕 + 解析 XML + 匿名元数据 |
308
+ | `importers.py` | platform-agnostic XML/CSV/JSONL corpus loader · 平台无关语料导入层 |
309
+ | `adapters.py` | YouTube Live Chat, Twitch VOD Chat & Niconico adapters · 跨平台语料适配器 |
310
+ | `taxonomy.py` & `taxonomies/` | external YAML taxonomy loader & built-in templates · 外部 YAML 标签体系与内置模板 |
311
+ | `label.py` | rules, word list, and CSV writer · 规则、词表与 CSV 导出 |
312
+ | `llm_label.py` | Qwen HF soft-prob labeling & lightweight context prompting · Qwen 软概率与轻量语境提示 |
313
+ | `vllm_label.py` | optional vLLM prefix-cached batch inference · 可选 vLLM 前缀缓存高吞吐推理 |
314
+ | `distill.py` | zero-labor pure-NumPy student distillation sample & teacher comparison · 轻量学生蒸馏样例与零人工对比体检 |
315
+ | `curve.py` | adaptive binning, relative progress, sparsity, peak summary & CI band plotting · 自适应分箱、相对进度、峰值摘要与置信带画图 |
316
+ | `calibrate.py` | simplex-constrained proportion calibration, temperature scaling & Bootstrap/Wilson CIs · 单形比例校准、温度缩放与置信区间 |
317
+ | `cache.py` | SQLite WAL fetch & label cache · 本地 SQLite 抓取与文本软概率缓存 |
318
+ | `manifest.py` | reproducible `run_manifest.json` writer · 可复现实验清单写出 |
319
+ | `validate.py` | cross-genre sampling, IAA (kappa/alpha), and metrics · 抽样、信度与精确率/召回率 |
320
+ | `run.py` | CLI · 命令行入口 |
321
+ | `batch.py` | multi-video concurrent fetch, cache, `--resume` & summary · 多视频并发批量处理、断点续跑与汇总 |
322
+ | `app.py` | Gradio web UI · 轻量网页界面 |
323
+ | `pyproject.toml` | package metadata & entry points · 打包配置与命令行入口 |
324
+ | `DanmakuCurve.ipynb` | Colab notebook · Colab 笔记本 |
325
+ | `make_notebook.py` | rebuild the notebook after code changes · 改完代码后重新生成笔记本 |
326
+ | `docs/css-implications-en.md` | CSS implications (English) · 计算社会科学启示(英文) |
327
+ | `docs/css-implications.md` | CSS implications (Chinese) · 计算社会科学启示(中文) |
328
+ | `docs/scaling-roadmap.md` | scaling, RQs & non-technical UX roadmap · 规模化、研究问题与零门槛路线 |
329
+ | `CITATION.cff` | academic citation metadata · 学术引用元数据 |
330
+
331
+ ## 📜 License
332
+
333
+ [MIT](LICENSE)
@@ -0,0 +1,271 @@
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="docs/banner-dark.svg">
5
+ <img src="docs/banner-light.svg" alt="DanmakuCurve · 弹幕 → 情绪曲线 · danmaku → emotion curve" width="640">
6
+ </picture>
7
+
8
+ **💬 → 📈 Turn one Bilibili video's danmaku into a time-aligned emotion curve.**<br>
9
+ **💬 → 📈 把一个 B 站视频的弹幕标成 5 种情绪,按视频时间画成情绪曲线。**
10
+
11
+ ![license](https://img.shields.io/badge/license-MIT-7c3aed?style=flat-square)
12
+ ![python](https://img.shields.io/badge/python-3-7c3aed?style=flat-square&logo=python&logoColor=white)
13
+ ![colab](https://img.shields.io/badge/Colab-T4%20GPU-7c3aed?style=flat-square&logo=googlecolab&logoColor=white)
14
+ ![model](https://img.shields.io/badge/model-Qwen2.5--1.5B-7c3aed?style=flat-square)
15
+
16
+ 🌍 [English](#-english) · 🌏 [简体中文](#-简体中文)
17
+
18
+ </div>
19
+
20
+ ![Example curve / 示例曲线](docs/example_curve.png)
21
+
22
+ <sub>Example: a 46-second meme remix (BV1JjZsYHEHE, 360 comments), 5-second bins, laugh rules + Qwen2.5-1.5B. Purple bars are total comments per bin.<br>示例:鬼畜《哈基米:我无怨无悔》(BV1JjZsYHEHE,46 秒,360 条弹幕),每 5 秒一段,笑类规则 + Qwen2.5-1.5B 标注。浅紫色柱是每段弹幕总数。</sub>
23
+
24
+ ```mermaid
25
+ flowchart LR
26
+ A["🎬 BV id<br/>BV 号"] --> B["💬 Danmaku XML<br/>弹幕 XML"]
27
+ B --> C{"Spam or laugh slang?<br/>刷屏 / 笑类说法?"}
28
+ C -->|"spam 刷屏"| N["无感 Neutral"]
29
+ C -->|"laugh 笑"| J["开心 Joy"]
30
+ C -->|"other 其他"| Q["🤖 Qwen2.5-1.5B<br/>(GPU)"]
31
+ C -.->|"no GPU 无 GPU"| W["📖 Word list<br/>词表"]
32
+ Q --> L["5 labels<br/>5 种情绪"]
33
+ W --> L
34
+ N --> L
35
+ J --> L
36
+ L --> P["📈 Emotion curve PNG<br/>情绪曲线"]
37
+
38
+ classDef main fill:#7c3aed,stroke:#5b21b6,color:#ffffff
39
+ classDef soft fill:#ede9fe,stroke:#7c3aed,color:#2e1065
40
+ class A,P main
41
+ class B,C,N,J,Q,W,L soft
42
+ ```
43
+
44
+ **🏷️ Labels / 标签**
45
+ ![开心 Joy](https://img.shields.io/badge/%E5%BC%80%E5%BF%83-Joy-7c3aed?style=flat-square)
46
+ ![惊讶 Surprise](https://img.shields.io/badge/%E6%83%8A%E8%AE%B6-Surprise-0891b2?style=flat-square)
47
+ ![感动 Moved](https://img.shields.io/badge/%E6%84%9F%E5%8A%A8-Moved-db2777?style=flat-square)
48
+ ![愤怒 Anger](https://img.shields.io/badge/%E6%84%A4%E6%80%92-Anger-d97706?style=flat-square)
49
+ ![无感 Neutral](https://img.shields.io/badge/%E6%97%A0%E6%84%9F-Neutral-a1a1aa?style=flat-square)
50
+
51
+ ---
52
+
53
+ ## 🌍 English
54
+
55
+ ### 🚀 Quick start
56
+
57
+ **☁️ Colab (recommended, nothing to install)**
58
+
59
+ 1. Download `DanmakuCurve.ipynb` and open it in [Google Colab](https://colab.research.google.com/) via **File → Upload notebook**.
60
+ 2. **Runtime → Change runtime type → T4 GPU**.
61
+ 3. Paste a video link in cell ①, then **Run all**. The curve shows at the bottom; the PNG and CSV download automatically.
62
+
63
+ Without a GPU it falls back to the word list. If fetching fails, you can upload a danmaku XML file.
64
+
65
+ **💻 Local**
66
+
67
+ ```bash
68
+ python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
69
+ .venv/bin/python run.py --xml data/sample_BV1614y197xJ.xml --bin auto
70
+ .venv/bin/python run.py --input data/sample_BV1JjZsYHEHE.xml --bin auto --relative-progress
71
+ .venv/bin/python run.py --url https://www.bilibili.com/video/BV1JjZsYHEHE --bin 5
72
+ .venv/bin/python run.py --batch data/sample_BV1JjZsYHEHE.xml data/sample_BV1614y197xJ.xml --proportion --show-neutral --resume
73
+ ```
74
+
75
+ This writes `output/curve.png`, `output/labels.csv` (UTF-8 with BOM for Excel), and `output/run_manifest.json` (reproducible run metadata). Key options: `--input` platform-agnostic XML/CSV/JSONL (with optional `--time-col` / `--text-col`), `--taxonomy` built-in template (`zh_danmaku_5`, `en_stream_emotions`, `classroom_feedback`) or custom YAML path, `--bin` seconds per bin or `auto` (duration-adaptive), `--relative-progress` 0%–100% progress axis, `--llm` local Qwen soft-probability scoring, `--proportion` per-bin proportions, `--show-neutral` default/neutral baseline, `--include-meta` bucketed timestamps and double-salted anonymized sender IDs, `--cache-db` / `--no-cache` SQLite cache, and `--resume` batch checkpoint resume.
76
+
77
+ `run.py` uses the word list by default (no GPU needed). To label with Qwen locally (or pass `--llm` to `run.py`):
78
+
79
+ ```bash
80
+ .venv/bin/pip install torch transformers
81
+ ```
82
+
83
+ ```python
84
+ from danmaku import parse_xml
85
+ from llm_label import LLMLabeler, label_all_llm
86
+ from curve import plot
87
+
88
+ rows = parse_xml(open("data/sample_BV1JjZsYHEHE.xml", encoding="utf-8").read())
89
+ labeled = label_all_llm(rows, LLMLabeler()) # Qwen/Qwen2.5-1.5B-Instruct (pass return_probs=True for 5-class probabilities)
90
+ plot(labeled, "curve.png", bin_sec=5, proportion=True, show_neutral=True)
91
+ ```
92
+
93
+ 🧪 Tests (offline): `.venv/bin/pip install pytest && .venv/bin/python -m pytest tests`
94
+
95
+ **🌐 Web UI (Gradio, local or Hugging Face Spaces)**
96
+
97
+ ```bash
98
+ .venv/bin/pip install -e ".[web]"
99
+ .venv/bin/python app.py
100
+ ```
101
+
102
+ Open `http://127.0.0.1:7860` to try bundled sample XMLs offline, paste a Bilibili URL, or upload an XML file, toggle proportion / neutral baseline / anonymized metadata, and download the PNG and CSV directly.
103
+
104
+ **📐 Cross-genre validation (`validate.py`)**
105
+
106
+ ```bash
107
+ .venv/bin/python validate.py sample --inputs data/sample_BV1614y197xJ.xml data/sample_BV1JjZsYHEHE.xml --genres house meme --n-per-video 50 --out output/annotation_template.csv
108
+ .venv/bin/python validate.py evaluate --csv output/annotation_completed.csv
109
+ ```
110
+
111
+ 📚 Methodology & limitations: [Computational Social Science Implications](docs/css-implications-en.md) · [Scaling & General Research Toolkit Roadmap](docs/scaling-roadmap.md)
112
+
113
+ ### 🏷️ Five labels
114
+
115
+ | Label | Examples |
116
+ |---|---|
117
+ | 🟣 **Joy** 开心 | 哈哈哈, 笑死, 没绷住, 可爱, memes |
118
+ | 🔵 **Surprise** 惊讶 | 卧槽, 居然, 离谱; also praise (牛, 厉害) |
119
+ | 🩷 **Moved** 感动 | 泪目, 破防, 暖心, 谢谢 |
120
+ | 🟠 **Anger** 愤怒 | 恶心, 退钱, scolding |
121
+ | ⚪ **Neutral** 无感 | statements, questions, template spam (正在看), ads |
122
+
123
+ ### ⚙️ How it works
124
+
125
+ 1. **Fetch**: the public Bilibili endpoint by BV id, no login (`danmaku.py`).
126
+ 2. **Rules first**: spam and ads → Neutral; laugh slang (没绷住, 难绷, 笑死, 2333, hhh…) → Joy, before any model (`SPAM`, `LAUGH` in `label.py`).
127
+ 3. **Qwen2.5-1.5B-Instruct** (Apache 2.0) labels the rest. It only compares the probability of each label's first token, so the output is always one of the five (`llm_label.py`).
128
+ 4. **Word-list fallback** without a GPU: danmaku slang rules plus the [cnsenti](https://github.com/thunderhit/cnsenti) emotion lexicon (乐 / 怒 / 惧 only).
129
+ 5. **Plot**: count per time bin, one line per emotion (`curve.py`).
130
+
131
+ Optional: the notebook can call any OpenAI-compatible API. The key lives in Colab Secrets, never in code.
132
+
133
+ ### ⚠️ Known limitations
134
+
135
+ - Sarcasm and context-dependent lines get mislabeled. "就没偷摸骂我两句吧" (a joke: "didn't you secretly curse me?") → Anger; "听了十遍还在听" ("listened ten times and still going") → Neutral.
136
+ - There is no "admiration" class, so praise counts as Surprise.
137
+ - The rules were tuned on three sample videos; other genres will be less accurate.
138
+ - The public endpoint returns only about 1,000–1,200 comments per video (not all of them), first part only.
139
+ - Some networks can't reach Bilibili. Save the XML and use `--xml`.
140
+ - Not yet: emotion-contagion stats.
141
+
142
+ ### 🎯 Scope
143
+
144
+ Please use it only on non-political videos (entertainment, daily life, animals, memes). This project does not analyze political content.
145
+
146
+ ### 🗂️ Sample data
147
+
148
+ `data/` holds danmaku from three public videos, time and text only, no user IDs. A few real spam ads are kept to test filtering. Uploaders can ask for removal via an issue.
149
+
150
+ ---
151
+
152
+ ## 🌏 简体中文
153
+
154
+ ### 🚀 快速开始
155
+
156
+ **☁️ Colab(推荐,不用装东西)**
157
+
158
+ 1. 下载 `DanmakuCurve.ipynb`,在 [Google Colab](https://colab.research.google.com/) 里 **文件 → 上传笔记本**。
159
+ 2. **代码执行程序 → 更改运行时类型 → T4 GPU**。
160
+ 3. 在 ① 里填视频链接,然后 **全部运行**。图显示在最下面,PNG 和 CSV 会自动下载。
161
+
162
+ 没有 GPU 时自动改用词表;抓不到弹幕时可以上传弹幕 XML。
163
+
164
+ **💻 本地**
165
+
166
+ ```bash
167
+ python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
168
+ .venv/bin/python run.py --xml data/sample_BV1614y197xJ.xml --bin auto
169
+ .venv/bin/python run.py --input data/sample_BV1JjZsYHEHE.xml --bin auto --relative-progress
170
+ .venv/bin/python run.py --url https://www.bilibili.com/video/BV1JjZsYHEHE --bin 5
171
+ .venv/bin/python run.py --batch data/sample_BV1JjZsYHEHE.xml data/sample_BV1614y197xJ.xml --proportion --show-neutral --resume
172
+ ```
173
+
174
+ 输出 `output/curve.png`(曲线)、`output/labels.csv`(带 UTF-8 BOM,Excel 双击不乱码)和 `output/run_manifest.json`(期刊级可复现清单),并在终端打印白话峰值摘要。常用参数:`--input` 导入平台无关 XML/CSV/JSONL(可配 `--time-col`/`--text-col`),`--taxonomy` 切换内置模板(`zh_danmaku_5` / `en_stream_emotions` / `classroom_feedback`)或自定义 YAML,`--bin auto` 按视频时长自适应分段,`--relative-progress` 切换 0%–100% 相对进度横轴,`--llm` 本地 Qwen 软概率标注,`--proportion` 情绪占比视图,`--show-neutral` 显示兜底基线,`--include-meta` 导出脱敏元数据,`--cache-db` / `--no-cache` 控制本地 SQLite 缓存,`--resume` 批量断点续跑。
175
+
176
+ `run.py` 默认只用词表,不需要 GPU。本地想用 Qwen 标注:先 `pip install torch transformers`,再加 `--llm` 参数或使用上面英文部分的 Python 代码。
177
+
178
+ 🧪 测试(不联网):`.venv/bin/pip install pytest && .venv/bin/python -m pytest tests`
179
+
180
+ **🌐 轻量网页界面(Gradio,本地或 Hugging Face Spaces)**
181
+
182
+ ```bash
183
+ .venv/bin/pip install -e ".[web]"
184
+ .venv/bin/python app.py
185
+ ```
186
+
187
+ 浏览器打开 `http://127.0.0.1:7860`,可直接选内置样例离线体验、贴 B 站链接或上传 XML,一键切换情绪占比、无感基线与脱敏元数据并下载 PNG 与 CSV。
188
+
189
+ **📐 跨垂类抽样与人工标注一致性评估(`validate.py`)**
190
+
191
+ ```bash
192
+ .venv/bin/python validate.py sample --inputs data/sample_BV1614y197xJ.xml data/sample_BV1JjZsYHEHE.xml --genres house meme --n-per-video 50 --out output/annotation_template.csv
193
+ .venv/bin/python validate.py evaluate --csv output/annotation_completed.csv
194
+ ```
195
+
196
+ 📚 方法论与研究局限:[计算社会科学启示](docs/css-implications.md) · [通用研究工具与规模化路线](docs/scaling-roadmap.md)
197
+
198
+ ### 🏷️ 5 种标签
199
+
200
+ | 标签 | 例子 |
201
+ |---|---|
202
+ | 🟣 **开心** | 哈哈哈、笑死、没绷住、可爱、玩梗 |
203
+ | 🔵 **惊讶** | 卧槽、居然、离谱;也包括夸人(牛、厉害) |
204
+ | 🩷 **感动** | 泪目、破防、暖心、谢谢 |
205
+ | 🟠 **愤怒** | 恶心、退钱、数落、骂人 |
206
+ | ⚪ **无感** | 陈述、提问、刷屏(正在看、弹幕飞过)、广告 |
207
+
208
+ ### ⚙️ 方法
209
+
210
+ 1. **抓弹幕**:用 B 站公开接口按 BV 号取弹幕 XML,不登录(`danmaku.py`)。
211
+ 2. **规则优先**:刷屏和广告直接判无感;笑类说法(没绷住、难绷、笑死、2333、hhh…)直接判开心,不交给模型(`label.py` 的 `SPAM`、`LAUGH`)。
212
+ 3. **Qwen2.5-1.5B-Instruct**(Apache 2.0)标其余弹幕。只比较 5 个标签第一个字的概率,所以输出一定是 5 类之一(`llm_label.py`)。
213
+ 4. **词表兜底**:没有 GPU 时用弹幕黑话词表 + 开源中文情绪词典 [cnsenti](https://github.com/thunderhit/cnsenti)(只用 乐 / 怒 / 惧)。
214
+ 5. **画图**:按视频时间分段计数,每种情绪一条线(`curve.py`)。
215
+
216
+ 可选:笔记本里也能用 OpenAI 兼容接口标注,key 放在 Colab Secrets,不写进代码。
217
+
218
+ ### ⚠️ 已知局限
219
+
220
+ - 反讽和要看上下文的句子会错。例如“就没偷摸骂我两句吧”被标成**愤怒**(其实是玩笑),“听了十遍还在听”被标成**无感**(其实是喜欢)。
221
+ - 5 类里没有“佩服”,夸人算惊讶。
222
+ - 词表是对着 3 个样例视频调的,换类型的视频准确率会低一些。
223
+ - 公开接口每个视频只返回一千多条弹幕(不是全部),只取第 1 P。
224
+ - 有些网络连不上 B 站,`--url` 会失败,可以先存 XML 再用 `--xml`。
225
+ - 还没做:情绪传染统计。
226
+
227
+ ### 🎯 使用范围
228
+
229
+ 请只用于**不涉及政治**的视频(娱乐、生活、动物、鬼畜等)。本项目不分析政治内容。
230
+
231
+ ### 🗂️ 样例数据
232
+
233
+ `data/` 里是 3 个公开视频的弹幕,只保留时间和文本,没有用户 ID。其中有少量真实的刷屏广告,用来测试过滤。如果你是视频作者、希望删除,请开 issue。
234
+
235
+ - 🐱 `sample_BV1614y197xJ.xml`:《我花了半年时间给猫做了个房子》,1,200 条
236
+ - 🎵 `sample_BV1JjZsYHEHE.xml`:《哈基米:我无怨无悔》,360 条
237
+ - 🦌 `sample_BV1YNZvYzELw.xml`:《Day97 | 在山上放一盆水,让动物们喝上水。》,332 条
238
+
239
+ ---
240
+
241
+ ## 📁 Files / 文件
242
+
243
+ | File 文件 | Purpose 用途 |
244
+ |---|---|
245
+ | `danmaku.py` | fetch, parse, and anonymize metadata · 抓弹幕 + 解析 XML + 匿名元数据 |
246
+ | `importers.py` | platform-agnostic XML/CSV/JSONL corpus loader · 平台无关语料导入层 |
247
+ | `adapters.py` | YouTube Live Chat, Twitch VOD Chat & Niconico adapters · 跨平台语料适配器 |
248
+ | `taxonomy.py` & `taxonomies/` | external YAML taxonomy loader & built-in templates · 外部 YAML 标签体系与内置模板 |
249
+ | `label.py` | rules, word list, and CSV writer · 规则、词表与 CSV 导出 |
250
+ | `llm_label.py` | Qwen HF soft-prob labeling & lightweight context prompting · Qwen 软概率与轻量语境提示 |
251
+ | `vllm_label.py` | optional vLLM prefix-cached batch inference · 可选 vLLM 前缀缓存高吞吐推理 |
252
+ | `distill.py` | zero-labor pure-NumPy student distillation sample & teacher comparison · 轻量学生蒸馏样例与零人工对比体检 |
253
+ | `curve.py` | adaptive binning, relative progress, sparsity, peak summary & CI band plotting · 自适应分箱、相对进度、峰值摘要与置信带画图 |
254
+ | `calibrate.py` | simplex-constrained proportion calibration, temperature scaling & Bootstrap/Wilson CIs · 单形比例校准、温度缩放与置信区间 |
255
+ | `cache.py` | SQLite WAL fetch & label cache · 本地 SQLite 抓取与文本软概率缓存 |
256
+ | `manifest.py` | reproducible `run_manifest.json` writer · 可复现实验清单写出 |
257
+ | `validate.py` | cross-genre sampling, IAA (kappa/alpha), and metrics · 抽样、信度与精确率/召回率 |
258
+ | `run.py` | CLI · 命令行入口 |
259
+ | `batch.py` | multi-video concurrent fetch, cache, `--resume` & summary · 多视频并发批量处理、断点续跑与汇总 |
260
+ | `app.py` | Gradio web UI · 轻量网页界面 |
261
+ | `pyproject.toml` | package metadata & entry points · 打包配置与命令行入口 |
262
+ | `DanmakuCurve.ipynb` | Colab notebook · Colab 笔记本 |
263
+ | `make_notebook.py` | rebuild the notebook after code changes · 改完代码后重新生成笔记本 |
264
+ | `docs/css-implications-en.md` | CSS implications (English) · 计算社会科学启示(英文) |
265
+ | `docs/css-implications.md` | CSS implications (Chinese) · 计算社会科学启示(中文) |
266
+ | `docs/scaling-roadmap.md` | scaling, RQs & non-technical UX roadmap · 规模化、研究问题与零门槛路线 |
267
+ | `CITATION.cff` | academic citation metadata · 学术引用元数据 |
268
+
269
+ ## 📜 License
270
+
271
+ [MIT](LICENSE)