匿名代码 @ 小鳥遊クリ | SakuraLLM数据集
Browse files
v-corpus-zh/5pb/匿名代码@KurikoMoe/0.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22823248486e1e6778aa889c9e26242d09e84d87cd68bcb6d6f2793af2f14c2b
|
3 |
+
size 428159
|
v-corpus-zh/5pb/匿名代码@KurikoMoe/匿名代码_json.py
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
sys.path.append('..')
|
3 |
+
|
4 |
+
from common import clearT, get_all_files_in_directory
|
5 |
+
# https://huggingface.co/datasets/Limour/archvie/blob/main/v-corpus-zh/common.py
|
6 |
+
|
7 |
+
# =================
|
8 |
+
|
9 |
+
a = get_all_files_in_directory(r'E:\galgame\匿名代码\json', ext='.json')
|
10 |
+
b = r'E:\galgame\匿名代码\text'
|
11 |
+
|
12 |
+
# =================
|
13 |
+
|
14 |
+
sc = {}
|
15 |
+
_n = {
|
16 |
+
"ポロン" : "步论", # 高冈步论
|
17 |
+
"モモ" : "桃", # 爱咲桃
|
18 |
+
"習志野オペA" : "特种兵A", # 习志野基地位于千叶县,是日本陆上自卫队的重要训练基地之一。
|
19 |
+
"副官" : "副官",
|
20 |
+
"ブラボー1" : "Bravo1",
|
21 |
+
"習志野オペB" : "特种兵B",
|
22 |
+
"アルファ2" : "Alfa2",
|
23 |
+
"習志野オペC" : "特种兵C",
|
24 |
+
"グレアム" : "格雷亚姆", # 格雷亚姆·金格里
|
25 |
+
"オズ" : "小津", # 小津谷天弦
|
26 |
+
"クロス" : "十字", # 弓川十字
|
27 |
+
"ARカフェ店員" : "AR咖啡店员",
|
28 |
+
"ARカフェの客A" : "AR咖啡店客A",
|
29 |
+
"ARカフェの客B" : "AR咖啡店客B",
|
30 |
+
"ARカフェの客C" : "AR咖啡店客C",
|
31 |
+
"富岡" : "富冈",
|
32 |
+
"木戸" : "木户",
|
33 |
+
"五井" : "五井",
|
34 |
+
"ウインド" : "风都", # 牧风都
|
35 |
+
"ヨミ" : "Yomi",
|
36 |
+
"あああ" : "啊啊啊", # ZOOTTOMO 名字被设置成了『啊啊啊』
|
37 |
+
"ダブ" : "田渊", # 田渊亮一
|
38 |
+
"アンドゥ" : "安藤", # 安藤大
|
39 |
+
"ユアン" : "尤安", # 奥田尤安
|
40 |
+
"アスマ" : "游马", # 苏我游马
|
41 |
+
"複数" : "众人",
|
42 |
+
"国防軍兵士A" : "士兵A",
|
43 |
+
"国防軍兵士B" : "士兵B",
|
44 |
+
"ノンノ" : "乃乃", # 宝生乃乃花
|
45 |
+
"ジュノ" : "JUNO", # JUNO
|
46 |
+
"防衛大臣" : "国防部长",
|
47 |
+
"経産省_外務事務次官" : "经济产业省外务事务次官",
|
48 |
+
"経産省_外務事務次官(シミュレータ内)" : "经济产业省外务事务次官(模拟)",
|
49 |
+
"防衛省_情報化審議官" : "防卫省信息化审议官",
|
50 |
+
"文科省_研究開発局長" : "文部科学省研究开发局长",
|
51 |
+
"外務省_アジア大洋州局長" : "外务省亚洲大洋洲局长",
|
52 |
+
"外務省_総合外交対策局長" : "外务省综合外交对策局长",
|
53 |
+
"外務省_総合外交対策局長(シミュレータ内)" : "外务省综合外交对策局长(模拟)",
|
54 |
+
"外務省_アジア大洋州局長(シミュレータ内)" : "外务省亚洲大洋洲局长(模拟)",
|
55 |
+
"運転手" : "司机",
|
56 |
+
"カオル" : "鲛洲", # 鲛洲馨
|
57 |
+
"バンビ" : "子鹿", # 仓科子鹿
|
58 |
+
"リコ" : "梨心", # 泽衣梨心
|
59 |
+
"イロハ" : "彩羽", # 京极彩羽
|
60 |
+
"ポロンの父" : "步论的父亲",
|
61 |
+
"外務大臣補佐官" : "外务大臣辅佐官",
|
62 |
+
"国交省_外務事務次官" : "国土交通省外务事务次官",
|
63 |
+
"官房副長官" : "内阁官房副长官",
|
64 |
+
"サイポーくん" : "警察酱",
|
65 |
+
"作業員A" : "作业员A",
|
66 |
+
"作業員B" : "作业员B",
|
67 |
+
"緊急アナウンス" : "紧急通知",
|
68 |
+
"コントロールセンター" : "控制中心",
|
69 |
+
"桃華の大将" : "桃华的大将",
|
70 |
+
"アルファ1" : "Alfa1",
|
71 |
+
"アルファ5" : "Alfa5",
|
72 |
+
"GAIAシステム音声" : "GAIA系统音声",
|
73 |
+
"管制官" : "管制官",
|
74 |
+
"機長" : "机长",
|
75 |
+
"ライム" : "青柠",
|
76 |
+
"窓口担当" : "窗口负责人",
|
77 |
+
"副機長" : "副机长",
|
78 |
+
"航空局の男" : "航空局男",
|
79 |
+
"Jellyfish" : "Jellyfish",
|
80 |
+
"ヤシンタ" : "哈辛塔",
|
81 |
+
"若手エンジニア" : "新手工程师",
|
82 |
+
"司教" : "神父",
|
83 |
+
"枢機卿" : "红衣主教",
|
84 |
+
"ダビデ" : "大卫", # 大卫·叶瑟
|
85 |
+
"ロザリオ" : "罗萨莉欧", # 罗萨莉欧·罗萨利尼
|
86 |
+
"リディ" : "莉迪", # 莉迪·库玛尔
|
87 |
+
"ルシア" : "露希亚",
|
88 |
+
"フランシスコ" : "弗朗希斯科",
|
89 |
+
"マニュエル" : "曼努埃尔",
|
90 |
+
"ロレンツォ" : "洛伦兹",
|
91 |
+
"フェリーノ" : "菲里诺", # 菲里诺·阿尔克纳
|
92 |
+
"シニアエンジニア" : "高级工程师",
|
93 |
+
"システム音声" : "系统语音",
|
94 |
+
"ログインできない男" : "无法登录的男性",
|
95 |
+
"帰宅する女" : "回家的女性",
|
96 |
+
"電子ロックのシステム音声" : "电子锁的系统声音",
|
97 |
+
"自動運転車のシステム音声" : "自动驾驶车的系统声音",
|
98 |
+
"車内の男" : "车内的男性",
|
99 |
+
"IT専門家" : "IT专家",
|
100 |
+
"警察官A" : "警察A",
|
101 |
+
"警察官B" : "警察B",
|
102 |
+
"通報者のハッカー" : "举报者黑客",
|
103 |
+
"髭の男" : "胡子男",
|
104 |
+
"ニュースキャスターの男05_05A" : "男主播A",
|
105 |
+
"大島リポーター" : "大岛记者",
|
106 |
+
"謎のマークが付いた少女A" : "神秘标记少女A",
|
107 |
+
"謎のマークが付いた少女B" : "神秘标记少女B",
|
108 |
+
"リポーターの男05_05" : "男记者",
|
109 |
+
"奥野" : "奥野",
|
110 |
+
"助手席の男" : "男助手",
|
111 |
+
"ドライバーの男" : "男司机",
|
112 |
+
"ニュースキャスターの男05_05B" : "男主播B",
|
113 |
+
"ニュースキャスターの女05_05" : "女主播",
|
114 |
+
"バスを避ける女" : "躲公交女",
|
115 |
+
"バスを避けた男" : "躲公交男",
|
116 |
+
"女子高生" : "女高中生",
|
117 |
+
"男子大学生" : "男大学生",
|
118 |
+
"スーツの男" : "西装男",
|
119 |
+
"スーツの女A" : "西装女A",
|
120 |
+
"スーツの女B" : "西装女B",
|
121 |
+
"バイクの男" : "摩托男",
|
122 |
+
"スポーツカーの男" : "跑车男",
|
123 |
+
"キックボードの少女" : "滑板少女",
|
124 |
+
"ドローンシューズの少年" : "无人机鞋少年",
|
125 |
+
"野球帽の男" : "棒球帽男",
|
126 |
+
"金髪の男" : "金发男",
|
127 |
+
"ガタイのいい女" : "魁梧女",
|
128 |
+
"教師の女" : "女老师",
|
129 |
+
"教師の男" : "男老师",
|
130 |
+
"白衣の男" : "白衣男",
|
131 |
+
"エプロン姿の女" : "围裙女",
|
132 |
+
"ジャージの男" : "运动服男",
|
133 |
+
"建設作業員A" : "建筑工人A",
|
134 |
+
"建設作業員B" : "建筑工人B",
|
135 |
+
"建設作業員C" : "建筑工人C",
|
136 |
+
"鏑木" : "铃木",
|
137 |
+
"女の子06_11A" : "女性A",
|
138 |
+
"男の子06_11A" : "男性A",
|
139 |
+
"女の子06_11B" : "女性B",
|
140 |
+
"警察官06_15A" : "警察A",
|
141 |
+
"神父" : "神父",
|
142 |
+
"SP07_01A" : "特警A",
|
143 |
+
"ローニン" : "罗宁", # 罗宁·德西耶罗
|
144 |
+
"二村幹事長" : "二村干事长",
|
145 |
+
"ニュースキャスターの女07_03A" : "女主播A",
|
146 |
+
"外事課の警察官07_08A" : "外事科的警察A",
|
147 |
+
"神父服の若者" : "穿神父服年轻人",
|
148 |
+
"警察官07_09A" : "警察A",
|
149 |
+
"警察官07_24A" : "警察A",
|
150 |
+
"警視総監" : "警视总监",
|
151 |
+
"警視副総監" : "警视副总监",
|
152 |
+
"実行犯" : "实施犯",
|
153 |
+
"ケント" : "宪斗", # 古里久宪斗
|
154 |
+
"解説員08_03" : "解说员",
|
155 |
+
"男性リポーター08_03" : "男记者",
|
156 |
+
"抗議する女性08_03" : "抗议女性",
|
157 |
+
"タレント08_03" : "明星",
|
158 |
+
"経済評論家08_03" : "经济评论家",
|
159 |
+
"ジャーナリストの女08_03" : "女记者",
|
160 |
+
"コメンテーター08_05" : "评论员",
|
161 |
+
"AIキャラクター08_05A" : "AI角色A",
|
162 |
+
"AIキャラクター08_05B" : "AI角色B",
|
163 |
+
"動画配信者08_05A" : "动画配音A",
|
164 |
+
"チャーリー1" : "Charlie1",
|
165 |
+
"群長" : "组长",
|
166 |
+
"兵士" : "士兵",
|
167 |
+
"兵士08_11A" : "士兵A",
|
168 |
+
"兵士08_12A" : "士兵A",
|
169 |
+
"ミオリ" : "游马的妈妈",
|
170 |
+
"医師08_14" : "医生",
|
171 |
+
"ユキヒラ" : "游马的爸爸",
|
172 |
+
"4chan投稿者08_14A" : "4chan投稿者A",
|
173 |
+
"4chan投稿者08_14B" : "4chan投稿者B",
|
174 |
+
"4chan投稿者08_14C" : "4chan投稿者C",
|
175 |
+
"4chan投稿者08_14D" : "4chan投稿者D",
|
176 |
+
"4chan投稿者08_14E" : "4chan投稿者E",
|
177 |
+
"4chan投稿者08_14F" : "4chan投稿者F",
|
178 |
+
"4chan投稿者08_14G" : "4chan投稿者G",
|
179 |
+
"聖務室エージェント08_15" : "宗教事务办公室代理人",
|
180 |
+
"不審な侵入者08_15A" : "侵入者A",
|
181 |
+
"不審な侵入者08_15B" : "侵入者B",
|
182 |
+
"不審な侵入者08_15C" : "侵入者C",
|
183 |
+
"蜂谷" : "蜂谷",
|
184 |
+
"兵士08_19" : "士兵",
|
185 |
+
"信徒の子供08_19" : "信徒的孩子08_19",
|
186 |
+
"地下聖堂の信徒08_19A" : "地下教会信徒A",
|
187 |
+
"地下聖堂の信徒08_19B" : "地下教会信徒B",
|
188 |
+
"地下聖堂の信徒08_19C" : "地下教会信徒C",
|
189 |
+
"地下聖堂の信徒08_19D" : "地下教会信徒D",
|
190 |
+
"連合軍副司令" : "联合军副司令",
|
191 |
+
"教皇" : "教皇",
|
192 |
+
"アルファ3" : "Alfa3",
|
193 |
+
"リポーターの女性09_02A" : "女记者A",
|
194 |
+
"操縦士の男性09_02A" : "男飞行员A",
|
195 |
+
"ニュースキャスターの男性09_02A" : "男主播A",
|
196 |
+
"ニュースキャスターの女性09_04A" : "女主播A",
|
197 |
+
"NASA長官" : "NASA长官",
|
198 |
+
"記者09_05A" : "记者A",
|
199 |
+
"記者09_05B" : "记者B",
|
200 |
+
"記者09_05C" : "记者C",
|
201 |
+
"記者09_05D" : "记者D",
|
202 |
+
"アメリカ大統領" : "美国总统",
|
203 |
+
"連合軍司令" : "联合军司令",
|
204 |
+
"横田オペレーター09_08A" : "横田基地员工A",
|
205 |
+
"横田オペレーター09_08D" : "横田基地员工D",
|
206 |
+
"横田オペレーター09_08B" : "横田基地员工B",
|
207 |
+
"横田オペレーター09_08C" : "横田基地员工C",
|
208 |
+
"兵士09_13" : "士兵",
|
209 |
+
"紅莉栖" : "红莉栖", # 牧濑红莉栖
|
210 |
+
"男性リポーター11_06" : "男记者"
|
211 |
+
}
|
212 |
+
|
213 |
+
# =================
|
214 |
+
import re
|
215 |
+
custom_sort_key_re = re.compile('([0-9]+)')
|
216 |
+
def custom_sort_key(s):
|
217 |
+
s: str = s[0]
|
218 |
+
return [int(x) if x.isdigit() else x for x in custom_sort_key_re.split(s)]
|
219 |
+
|
220 |
+
# =================
|
221 |
+
|
222 |
+
import json
|
223 |
+
reg_q = re.compile(r'[?\s]+')
|
224 |
+
re_html = re.compile(r'(\[.+?])|(%.+?;)') # (<.+?>)
|
225 |
+
re_ct = re.compile(r'<.*?,.*?,(.*?)>')
|
226 |
+
# <.*?,.*?,(.*?)> -> \1
|
227 |
+
|
228 |
+
for path in a:
|
229 |
+
name = path[path.rindex('\\') + 1:]
|
230 |
+
name = '0'
|
231 |
+
if name not in sc:
|
232 |
+
sc[name] = []
|
233 |
+
print(name)
|
234 |
+
# =================
|
235 |
+
|
236 |
+
with open(path, 'r', encoding='utf-8') as json_file:
|
237 |
+
data = json.load(json_file)
|
238 |
+
|
239 |
+
# =================
|
240 |
+
data = [(k, v) for k, v in data['content'].items()]
|
241 |
+
data = sorted(data, key=custom_sort_key)
|
242 |
+
for k, o_a in data:
|
243 |
+
o_a = [(k, v) for k, v in o_a.items()]
|
244 |
+
o_a = sorted(o_a, key=custom_sort_key)
|
245 |
+
for k, o_b in o_a:
|
246 |
+
for o_c in o_b:
|
247 |
+
n = o_c['speaker']
|
248 |
+
if n:
|
249 |
+
if n in _n:
|
250 |
+
n = _n[n]
|
251 |
+
else:
|
252 |
+
tmp = clearT(n).replace('・', '&')
|
253 |
+
tmp = reg_q.sub('?', tmp)
|
254 |
+
_n[n] = tmp.split('//')[-1].replace(' ', '')
|
255 |
+
print(o_c, n)
|
256 |
+
else:
|
257 |
+
n = '旁白'
|
258 |
+
|
259 |
+
d = o_c['chs']
|
260 |
+
if not d:
|
261 |
+
continue
|
262 |
+
d = re_html.sub('', clearT(d))
|
263 |
+
d = re_ct.sub(lambda x: x[1], d)
|
264 |
+
if d:
|
265 |
+
sc[name].append(n + ':' + d)
|
266 |
+
|
267 |
+
# =================
|
268 |
+
|
269 |
+
for k, v in sc.items():
|
270 |
+
if v:
|
271 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
272 |
+
f.write('\n'.join(v))
|
273 |
+
|
274 |
+
# =================
|
275 |
+
import json
|
276 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=4)
|