Datasets:

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

Upload 29 files

Browse files
Files changed (29) hide show
  1. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/010.txt.gz +3 -0
  2. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/01a.txt.gz +3 -0
  3. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/02a.txt.gz +3 -0
  4. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/03a.txt.gz +3 -0
  5. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/04a.txt.gz +3 -0
  6. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/05a.txt.gz +3 -0
  7. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/06a.txt.gz +3 -0
  8. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/07a.txt.gz +3 -0
  9. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/08a.txt.gz +3 -0
  10. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09a.txt.gz +3 -0
  11. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09b.txt.gz +3 -0
  12. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09c.txt.gz +3 -0
  13. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09z.txt.gz +3 -0
  14. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/10a.txt.gz +3 -0
  15. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/11a.txt.gz +3 -0
  16. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/12a.txt.gz +3 -0
  17. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/13a.txt.gz +3 -0
  18. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/14a.txt.gz +3 -0
  19. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/14b.txt.gz +3 -0
  20. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/15a.txt.gz +3 -0
  21. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16a.txt.gz +3 -0
  22. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16b.txt.gz +3 -0
  23. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16c.txt.gz +3 -0
  24. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/17a.txt.gz +3 -0
  25. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/18a.txt.gz +3 -0
  26. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/18z.txt.gz +3 -0
  27. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/19a.txt.gz +3 -0
  28. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/99a.txt.gz +3 -0
  29. v-corpus-zh/InnocentGrey/壳之少女/壳之少女/壳之少女_ks.py +151 -0
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/010.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9dca6f78177fc6a36e82b4d4625373a45dcab6bb31bd479b9fc0a5f87ecbc767
3
+ size 1494
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/01a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8a4d273520fc28058c7d39fd897be1284b6176c59367959dcc2bc38455437a2
3
+ size 24854
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/02a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3de6f1f6db2a608578c9769d58b58f4b12caf3c38e9a55dc11fad57d7e0b89ec
3
+ size 29129
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/03a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2aa7a3d0dc4414fb203a8f0886f5559a3984dac95ca4360a0163cc0d263dcfb
3
+ size 56885
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/04a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:974d4d552e7723214ef056ca28b72ae37de86267fe64877072d77b275ccbd0fc
3
+ size 21387
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/05a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f309e51954f11a15bb9d48ee83591fdf7b11cca3c6488c37ef3fac63041a9bb0
3
+ size 26163
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/06a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1d361ef4ec53ca25bd1f8d7d72621e50807e11e9737e860d6af4776b3dc217d
3
+ size 20285
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/07a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a144b09ff09bedf50428d1b67d3673a38e40adfe7e9a967969c639d38da51f25
3
+ size 16627
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/08a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5cebdd8bbf73ecfebe50fc9baf358d0f8fcf1c49702b834da91f78e5b2d591c
3
+ size 3656
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6ace97cb6fa5121719bdb41467879a7ccbf4467e02e7964f60e4512a8704306
3
+ size 8742
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09b.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f431d0ef9580d8dd8d98f635155cb7449ed506db8482c968660a1db0cff7464
3
+ size 10499
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09c.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f04282034a63883e073af03ec846ff3bc342aee190bf3d0b0a035470478331af
3
+ size 8846
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/09z.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3f4b887862f91e8f7a7c464c58fac48fb354181b984b8d287c8633f81f73746
3
+ size 15261
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/10a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a19969c830011653e2784867edd7f71b59bdcaca333c037b43510b05bf4b165
3
+ size 51189
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/11a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51d4de1dfb828fe744271fea8eba19b9de1a1994c121adca34ff63653a54ce0c
3
+ size 43887
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/12a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b56ed0e1bac66e88c30bfd7992b3e5e9e5f43ce68dee10da36b679671115c8b
3
+ size 34627
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/13a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22d3c187cf8724424a8b9770f3fd7ceceeb46d98df932329c0d5286f1834b1de
3
+ size 28423
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/14a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb54eee1ffc4aaffda2a132d78412af8ad661b0b32acbdb6b2cd2e8ae7e64fb6
3
+ size 4655
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/14b.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:accc17153e594fb53bace7c80d0089b50f6512fabf7a260a7e7d9629fd5e53ba
3
+ size 5843
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/15a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e690ddff1152aac9fa6840e4cad0d39188a235208476cfa79a2e5242c9f2d8fa
3
+ size 16274
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84e36a8abacd078bb5f1096c55c3a7668e8161bb6163d239d19cb12c718bb523
3
+ size 9467
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16b.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6880407084d161bb980a9bc77461d8f7ffeac7e1250f9fd698c8abed82ec2e0
3
+ size 4150
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/16c.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7991b3c920dead60905bc7610f065e9e919136a18082bda8320b138cfb8570e6
3
+ size 11781
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/17a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb65f3bf53ab23268ee82cf12068367a782bf9d6a7d49c8c0233180881570c4b
3
+ size 13604
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/18a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40a5afe393aab8512f9de70a1e0b96aa07f5898822205757cd0fc5bd5e29a17b
3
+ size 12976
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/18z.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd3ef4e03efcdeba7d99267dde57a39056a2973ae4d84893142876ffd7666896
3
+ size 6106
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/19a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:127ba066d91729690f417e67061b1708e60939d542d81fe8ef3282814fb67114
3
+ size 28587
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/99a.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15b66240bf315b8a3669e4a55f23124656cc1ac9d9de01b46dc20b4db49467e2
3
+ size 1485
v-corpus-zh/InnocentGrey/壳之少女/壳之少女/壳之少女_ks.py ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def get_all_files_in_directory(directory, ext=''):
2
+ import os
3
+ import re
4
+ custom_sort_key_re = re.compile('([0-9]+)')
5
+
6
+ def custom_sort_key(s):
7
+ # 将字符串中的数字部分转换为整数,然后进行排序
8
+ return [int(x) if x.isdigit() else x for x in custom_sort_key_re.split(s)]
9
+
10
+ all_files = []
11
+ for root, dirs, files in os.walk(directory):
12
+ for file in files:
13
+ if file.endswith(ext):
14
+ file_path = os.path.join(root, file)
15
+ all_files.append(file_path)
16
+ return sorted(all_files, key=custom_sort_key)
17
+
18
+
19
+ def clearT():
20
+ import unicodedata
21
+ from opencc import OpenCC
22
+
23
+ def full2half(input_str):
24
+ return ''.join([unicodedata.normalize('NFKC', char) for char in input_str])
25
+
26
+ cc = OpenCC('t2s') # 't2s'表示繁体转简体
27
+
28
+ def _clearT(s):
29
+ s = cc.convert(full2half(s))
30
+ return s.strip().strip(r'\n').replace('\n', '\\n')
31
+
32
+ return _clearT
33
+
34
+
35
+ clearT = clearT()
36
+
37
+ # =================
38
+
39
+ a = get_all_files_in_directory(r'E:\tmp\壳之少女\ks\scenario', ext='.ks')
40
+ b = r'D:\datasets\tmp'
41
+
42
+ # =================
43
+
44
+ sc = {}
45
+
46
+ _n = {
47
+ "【玲人】": "玲人",
48
+ "【???】": "?",
49
+ "【杏子】": "杏子",
50
+ "【紫】": "紫",
51
+ "【冬子】": "冬子",
52
+ "【初音】": "初音",
53
+ "【鱼住】": "鱼住",
54
+ "【警官】": "警官",
55
+ "【佐伯】": "佐伯",
56
+ "【夏目】": "夏目",
57
+ "【男】": "男",
58
+ "【秋五】": "秋五",
59
+ "【和菜】": "和菜",
60
+ "【教师】": "教师",
61
+ "【织姬】": "织姬",
62
+ "【女学生】": "女学生",
63
+ "【宁宁】": "宁宁",
64
+ "【透子】": "透子",
65
+ "【缀子】": "缀子",
66
+ "【日下】": "日下",
67
+ "【步】": "步",
68
+ "【千鹤】": "千鹤",
69
+ "【文弥】": "文弥",
70
+ "【鉴定员】": "鉴定员",
71
+ "【靖匡】": "靖匡",
72
+ "【村濑】": "村濑",
73
+ "【小春】": "小春",
74
+ "【史黛拉】": "史黛拉",
75
+ "【夜月】": "夜月",
76
+ "【孩子】": "孩子",
77
+ "【葛城】": "葛城",
78
+ "【西藤】": "西藤",
79
+ "【由记子】": "由记子",
80
+ "【邮递员】": "邮递员",
81
+ "【老人】": "老人",
82
+ "【男人】": "男人",
83
+ "【未央】": "未央",
84
+ "【店员】": "店员",
85
+ "【八木沼】": "八木沼",
86
+ "【刑事】": "刑事",
87
+ "【露天商贩】": "露天商贩",
88
+ "【驿员】": "驿员",
89
+ "【律师】": "律师",
90
+ "【心像】": "心像",
91
+ "【少女】": "少女",
92
+ "【素子】": "素子",
93
+ "【心尔】": "心尔"
94
+ }
95
+
96
+ # =================
97
+ for path in a:
98
+ name = path[path.rindex('\\'):]
99
+ name = name[:4]
100
+ if name not in sc:
101
+ sc[name] = []
102
+ print(name)
103
+ # =================
104
+
105
+ with open(path, 'r', encoding='utf-16-le') as f:
106
+ next(f) # BOM
107
+ data = list(filter(lambda x: not (x.startswith(';')
108
+ or (x.startswith('[') and x.endswith(']'))),
109
+ (x.strip() for x in f.readlines())))
110
+ w_i = -1
111
+ while w_i < len(data) - 1:
112
+ w_i += 1
113
+ if data[w_i].startswith('*'):
114
+ data[w_i] = ''
115
+ line:str = data[w_i]
116
+ if not line:
117
+ continue
118
+ if line.startswith('【'):
119
+ assert line.endswith('】')
120
+ n = line
121
+ if n in _n:
122
+ n = _n[n]
123
+ else:
124
+ _n[n] = clearT(n).strip('【】').replace('・', '&')
125
+ print(line)
126
+ tmp = []
127
+ while w_i < len(data) - 1:
128
+ w_i += 1
129
+ line: str = data[w_i]
130
+ if not line:
131
+ break
132
+ tmp.append(line)
133
+ if line.endswith('」'):
134
+ break
135
+ line = clearT('\\n'.join(tmp))
136
+ if not line:
137
+ continue
138
+ sc[name].append(n + ':' + line)
139
+ else:
140
+ sc[name].append('旁白' + ':' + line)
141
+
142
+ # =================
143
+
144
+ for k, v in sc.items():
145
+ if v:
146
+ with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
147
+ f.write('\n'.join(v))
148
+
149
+ # =================
150
+ import json
151
+ tmp = json.dumps(_n, ensure_ascii=False, indent=4)