Datasets:

Languages:
Chinese
Tags:
Not-For-All-Audiences
License:
Limour commited on
Commit
730a7c1
·
verified ·
1 Parent(s): ba69bc2

从亲吻开始的「紫梧」主义 @ 破琵琶生产公社

Browse files
v-corpus-zh/Satsuki/从Kiss开始的自我主义~EGOISM/kiss.txt.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eb2581a19e12dcc574eb0ab60d44b5f5aa6321e5248b11ecffbd6ef56ba29c7a
3
- size 115687
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7415dbc45ae2bf6837a33f8cda996ea2c1c4ca7bb258182b909decdb5533bad4
3
+ size 160731
v-corpus-zh/Satsuki/从Kiss开始的自我主义~EGOISM/从亲吻开始的「紫梧」主义_json.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "Sexa机器人" : "Sexa机器人",
22
+ "星探" : "星探",
23
+ "女客人A" : "女客人A",
24
+ "女客人B" : "女客人B",
25
+ "前辈牛郎" : "前辈牛郎",
26
+ "紫梧" : "紫梧",
27
+ "店主" : "店主",
28
+ "五郎" : "五郎",
29
+ "阿姨" : "阿姨",
30
+ "法国斗牛犬" : "法国斗牛犬",
31
+ "驾驶员" : "驾驶员",
32
+ "浅仓" : "浅仓",
33
+ "租车行店员" : "租车行店员",
34
+ "搭讪女A" : "搭讪女A",
35
+ "搭讪女B" : "搭讪女B",
36
+ "旅店店员" : "旅店店员",
37
+ "跟踪者" : "跟踪者",
38
+ "博士" : "博士",
39
+ "快递员" : "快递员"
40
+ }
41
+
42
+ # =================
43
+ import json
44
+
45
+ for path in a:
46
+ name = path[path.rindex('\\') + 1:]
47
+ name = '0'
48
+ if name not in sc:
49
+ sc[name] = []
50
+ print(name)
51
+ # =================
52
+
53
+ with open(path, 'r', encoding='utf-8') as json_file:
54
+ data = json.load(json_file)
55
+
56
+ # =================
57
+ for line in data:
58
+ if 'name' in line:
59
+ n = line['name']
60
+ if n in _n:
61
+ n = _n[n]
62
+ else:
63
+ tmp = clearT(n).replace('・', '&')
64
+ _n[n] = tmp.split('//')[-1].replace(' ', '')
65
+ print(line, n)
66
+ else:
67
+ n = '旁白'
68
+ d = line['message']
69
+ if d:
70
+ sc[name].append(n + ':' + d)
71
+
72
+ # =================
73
+
74
+ for k, v in sc.items():
75
+ if v:
76
+ with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
77
+ f.write('\n'.join(v))
78
+
79
+ # =================
80
+ import json
81
+ tmp = json.dumps(_n, ensure_ascii=False, indent=4)