相恋之心与魔法之语 @ 破琵琶生产公社
Browse files- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce0.txt.gz +3 -0
- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce1.txt.gz +3 -0
- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce2.txt.gz +3 -0
- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce3.txt.gz +3 -0
- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce4.txt.gz +3 -0
- v-corpus-zh/Hearts/相恋之心愿与魔法的言语/相恋之心与魔法之语_json.py +149 -0
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce0.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e415d658789e94f1dee0e5b6a0bd9449c3cc3b31bd71f4f54d076005d29cd109
|
3 |
+
size 107368
|
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce1.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a344d298a81167b3e89284a2053d8755061d457d0b94e35d68a9ba28d66fca3a
|
3 |
+
size 139260
|
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce2.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bfafc516229c40381415ba5f47d2bd7ca7f490b42b9d7c4bf18914b4687580af
|
3 |
+
size 127838
|
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce3.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bac0114a4cdcdaa226de01693784e0c42ab9fb2156772fb9ff28f31a6c907e40
|
3 |
+
size 105909
|
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/Sce4.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8d35c15bb467d46f2be222c61aad03a33f5d7449923c55fc7a75584585f81b04
|
3 |
+
size 145526
|
v-corpus-zh/Hearts/相恋之心愿与魔法的言语/相恋之心与魔法之语_json.py
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_cn', ext='.json')
|
10 |
+
b = r'E:\galgame\相恋之心与魔法之语\text'
|
11 |
+
|
12 |
+
# =================
|
13 |
+
|
14 |
+
sc = {}
|
15 |
+
_n = {
|
16 |
+
"育实" : "育实",
|
17 |
+
"服务员装束的女子" : "服务员装束的女子",
|
18 |
+
"奥诗莉" : "奥诗莉",
|
19 |
+
"班主任" : "班主任",
|
20 |
+
"校工" : "校工",
|
21 |
+
"???" : "?",
|
22 |
+
"女孩" : "女孩",
|
23 |
+
"晴" : "晴",
|
24 |
+
"女学生A" : "女学生A",
|
25 |
+
"女学生B" : "女学生B",
|
26 |
+
"女学生C" : "女学生C",
|
27 |
+
"银发女孩" : "银发女孩",
|
28 |
+
"金发女孩" : "金发女孩",
|
29 |
+
"茶色头发的女孩" : "茶色头发的女孩",
|
30 |
+
"风祢" : "风祢",
|
31 |
+
"真白" : "真白",
|
32 |
+
"好奏" : "好奏",
|
33 |
+
"芭丝特" : "芭丝特",
|
34 |
+
"春晴" : "春晴",
|
35 |
+
"优雅的老夫人" : "优雅的老夫人",
|
36 |
+
"校长" : "校长",
|
37 |
+
"电之精灵" : "电之精灵",
|
38 |
+
"火之精灵" : "火之精灵",
|
39 |
+
"水之精灵" : "水之精灵",
|
40 |
+
"花之精灵" : "花之精灵",
|
41 |
+
"陶笛魔女" : "陶笛魔女",
|
42 |
+
"塞西莉亚" : "塞西莉亚",
|
43 |
+
"女学生" : "女学生",
|
44 |
+
"老爷爷" : "老爷爷",
|
45 |
+
"信之助" : "信之助",
|
46 |
+
"饼干精灵" : "饼干精灵",
|
47 |
+
"蛋糕精灵" : "蛋糕精灵",
|
48 |
+
"面胚精灵" : "面胚精灵",
|
49 |
+
"风祢&好奏&真白" : "风祢&好奏&真白",
|
50 |
+
"小狸猫" : "小狸猫",
|
51 |
+
"土之精灵" : "土之精灵",
|
52 |
+
"草之精灵" : "草之精灵",
|
53 |
+
"女子" : "女子",
|
54 |
+
"空美" : "空美",
|
55 |
+
"不洁精灵" : "不洁精灵",
|
56 |
+
"球之精灵" : "球之精灵",
|
57 |
+
"精灵女孩" : "精灵女孩",
|
58 |
+
"玩偶精灵" : "玩偶精灵",
|
59 |
+
"宿管" : "宿管",
|
60 |
+
"小咲良" : "小咲良",
|
61 |
+
"小咲良的母亲" : "小咲良的母亲",
|
62 |
+
"古樱树精灵" : "古樱树精灵",
|
63 |
+
"木之精灵" : "木之精灵",
|
64 |
+
"女学生D" : "女学生D",
|
65 |
+
"风之精灵" : "风之精灵",
|
66 |
+
"砂糖之精灵" : "砂糖之精灵",
|
67 |
+
"无筋面粉精灵" : "无筋面粉精灵",
|
68 |
+
"女学生E" : "女学生E",
|
69 |
+
"大家" : "大家",
|
70 |
+
"广播" : "广播",
|
71 |
+
"男学生A" : "男学生A",
|
72 |
+
"客人A" : "客人A",
|
73 |
+
"客人B" : "客人B",
|
74 |
+
"客人C" : "客人C",
|
75 |
+
"图书委员" : "图书委员",
|
76 |
+
"蒲公英精灵" : "蒲公英精灵",
|
77 |
+
"油菜花精灵" : "油菜花精灵",
|
78 |
+
"女子A" : "女子A",
|
79 |
+
"女孩A" : "女孩A",
|
80 |
+
"老人" : "老人",
|
81 |
+
"店员" : "店员",
|
82 |
+
"照相馆" : "照相馆",
|
83 |
+
"全员" : "全员",
|
84 |
+
"水之精灵们" : "水之精灵们",
|
85 |
+
"阿姨" : "阿姨",
|
86 |
+
"学生们" : "学生们",
|
87 |
+
"山之大精灵" : "山之大精灵",
|
88 |
+
"育实&风祢" : "育实&风祢",
|
89 |
+
"风祢&育实" : "风祢&育实",
|
90 |
+
"试炼精灵" : "试炼精灵",
|
91 |
+
"猫人偶" : "猫人偶",
|
92 |
+
"男生A" : "男生A",
|
93 |
+
"女孩B" : "女孩B",
|
94 |
+
"彩音" : "彩音",
|
95 |
+
"雷之精灵" : "雷之精灵",
|
96 |
+
"母亲" : "母亲",
|
97 |
+
"男子" : "男子",
|
98 |
+
"纯一郎" : "纯一郎",
|
99 |
+
"郁金香精灵" : "郁金香精灵",
|
100 |
+
"丽子" : "丽子",
|
101 |
+
"妖怪" : "妖怪",
|
102 |
+
"工作人员" : "工作人员",
|
103 |
+
"水果店" : "水果店",
|
104 |
+
"莲之精灵" : "莲之精灵",
|
105 |
+
"辉代" : "辉代",
|
106 |
+
"救援队队员" : "救援队队员",
|
107 |
+
"紫云英精灵" : "紫云英精灵"
|
108 |
+
}
|
109 |
+
|
110 |
+
# =================
|
111 |
+
import json
|
112 |
+
|
113 |
+
for path in a:
|
114 |
+
name = path[path.rindex('\\') + 1:]
|
115 |
+
name = name.split('_', maxsplit=1)[0]
|
116 |
+
if name not in sc:
|
117 |
+
sc[name] = []
|
118 |
+
print(name)
|
119 |
+
# =================
|
120 |
+
|
121 |
+
with open(path, 'r', encoding='utf-8') as json_file:
|
122 |
+
data = json.load(json_file)
|
123 |
+
|
124 |
+
# =================
|
125 |
+
for line in data:
|
126 |
+
if 'name' in line:
|
127 |
+
n = line['name']
|
128 |
+
if n in _n:
|
129 |
+
n = _n[n]
|
130 |
+
else:
|
131 |
+
tmp = clearT(n).replace('・', '&')
|
132 |
+
_n[n] = tmp.split('//')[-1].replace(' ', '')
|
133 |
+
print(line, n)
|
134 |
+
else:
|
135 |
+
n = '旁白'
|
136 |
+
d = line['message']
|
137 |
+
if d:
|
138 |
+
sc[name].append(n + ':' + d)
|
139 |
+
|
140 |
+
# =================
|
141 |
+
|
142 |
+
for k, v in sc.items():
|
143 |
+
if v:
|
144 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
145 |
+
f.write('\n'.join(v))
|
146 |
+
|
147 |
+
# =================
|
148 |
+
import json
|
149 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=4)
|