Upload 3 files
Browse files
v-corpus-zh/Liqiud/无限炼奸~不死舞姬的凌辱轮舞曲~/EP.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e2bf0f5acbb9daff9b9d990e951b36580c6923f54a0dc5d3e5e716b358164ab5
|
3 |
+
size 25770
|
v-corpus-zh/Liqiud/无限炼奸~不死舞姬的凌辱轮舞曲~/TE.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:07304a517078f340c145b708621f6b290ccc711014c106607b3422b02f987b1e
|
3 |
+
size 524683
|
v-corpus-zh/Liqiud/无限炼奸~不死舞姬的凌辱轮舞曲~/无限炼奸.py
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
def startsWithAny(s: str, keys):
|
39 |
+
for x in keys:
|
40 |
+
if s.startswith(x):
|
41 |
+
return x
|
42 |
+
else:
|
43 |
+
return False
|
44 |
+
|
45 |
+
|
46 |
+
def endsWithAny(s: str, keys):
|
47 |
+
for x in keys:
|
48 |
+
if s.endswith(x):
|
49 |
+
return x
|
50 |
+
else:
|
51 |
+
return False
|
52 |
+
|
53 |
+
|
54 |
+
def startsWithAlnum(s: str, _chrs):
|
55 |
+
retn = ''
|
56 |
+
for char in s:
|
57 |
+
if (char.isalnum()) or (char in _chrs):
|
58 |
+
retn += char
|
59 |
+
else:
|
60 |
+
break
|
61 |
+
return retn
|
62 |
+
|
63 |
+
|
64 |
+
def startsWithCmd(s: str, _chrs=None):
|
65 |
+
if _chrs is None:
|
66 |
+
_chrs = {'_', '@'}
|
67 |
+
cmd = startsWithAlnum(s, _chrs)
|
68 |
+
if cmd:
|
69 |
+
return s.startswith(cmd + ' ')
|
70 |
+
else:
|
71 |
+
return False
|
72 |
+
|
73 |
+
|
74 |
+
import re
|
75 |
+
|
76 |
+
reg_removeWait = re.compile(r'\[.+?]')
|
77 |
+
|
78 |
+
|
79 |
+
def removeWait(_line):
|
80 |
+
_tmp = reg_removeWait.sub('', _line)
|
81 |
+
if _tmp:
|
82 |
+
return _tmp
|
83 |
+
else:
|
84 |
+
return _line
|
85 |
+
|
86 |
+
|
87 |
+
def getCmdArgs(_cmd):
|
88 |
+
_args = ['']
|
89 |
+
_i = -1
|
90 |
+
_inQuota = ''
|
91 |
+
while _i < len(_cmd) - 1:
|
92 |
+
_i += 1
|
93 |
+
char = _cmd[_i]
|
94 |
+
if _inQuota:
|
95 |
+
_args[-1] += char
|
96 |
+
if char == _inQuota:
|
97 |
+
_inQuota = ''
|
98 |
+
elif char == '\\':
|
99 |
+
_i += 1
|
100 |
+
char = _cmd[_i]
|
101 |
+
_args[-1] += char
|
102 |
+
else:
|
103 |
+
pass
|
104 |
+
else:
|
105 |
+
if char == ' ':
|
106 |
+
_args.append('')
|
107 |
+
while _i < len(_cmd) - 1:
|
108 |
+
_i += 1
|
109 |
+
char = _cmd[_i]
|
110 |
+
if char != ' ':
|
111 |
+
_i -= 1
|
112 |
+
break
|
113 |
+
continue
|
114 |
+
elif char in {'"', "'"}:
|
115 |
+
_inQuota = char
|
116 |
+
else:
|
117 |
+
pass
|
118 |
+
_args[-1] += char
|
119 |
+
continue
|
120 |
+
return _args
|
121 |
+
|
122 |
+
|
123 |
+
def args2map(_args):
|
124 |
+
retn = {}
|
125 |
+
for _i in range(1, len(_args)):
|
126 |
+
_arg = _args[_i]
|
127 |
+
if '=' not in _arg:
|
128 |
+
if '=' in _arg:
|
129 |
+
_arg = _arg.replace('=', '=')
|
130 |
+
else:
|
131 |
+
continue
|
132 |
+
_idx = _arg.index('=')
|
133 |
+
_k = _arg[:_idx]
|
134 |
+
if '"' in _k or "'" in _k:
|
135 |
+
continue
|
136 |
+
_v = _arg[_idx + 1:]
|
137 |
+
if _v.startswith('"') or _v.startswith("'"):
|
138 |
+
_v = _v[1:len(_v) - 1]
|
139 |
+
retn[_k] = _v
|
140 |
+
return retn
|
141 |
+
|
142 |
+
|
143 |
+
# =================
|
144 |
+
|
145 |
+
a = get_all_files_in_directory(r'E:\tmp\无限ERE\script', ext='.txt')
|
146 |
+
b = r'D:\datasets\tmp'
|
147 |
+
|
148 |
+
# =================
|
149 |
+
|
150 |
+
sc = {}
|
151 |
+
|
152 |
+
_n = {
|
153 |
+
"泽瓦布": "泽瓦布",
|
154 |
+
"格古": "格古",
|
155 |
+
"美幸": "美幸",
|
156 |
+
"奴隶": "奴隶",
|
157 |
+
"王": "王",
|
158 |
+
"奈婕": "奈婕",
|
159 |
+
"列巴修": "列巴修",
|
160 |
+
"斯诺": "斯诺",
|
161 |
+
"玛丽": "玛丽",
|
162 |
+
"雪": "雪",
|
163 |
+
"舞美": "舞美",
|
164 |
+
"莉特儿": "莉特儿",
|
165 |
+
"白人士兵": "白人士兵",
|
166 |
+
"迪·普": "迪·普",
|
167 |
+
"???": "?",
|
168 |
+
"吃惊的声音": "吃惊的声音",
|
169 |
+
"店主": "店主",
|
170 |
+
"米露蒂奥姆": "米露蒂奥姆",
|
171 |
+
"居民A": "居民A",
|
172 |
+
"居民B": "居民B",
|
173 |
+
"居民C": "居民C",
|
174 |
+
"居民D": "居民D",
|
175 |
+
"居民E": "居民E",
|
176 |
+
"居民F": "居民F",
|
177 |
+
"居民": "居民",
|
178 |
+
"居民G": "居民G",
|
179 |
+
"居民H": "居民H",
|
180 |
+
"居民I": "居民I",
|
181 |
+
"居民J": "居民J",
|
182 |
+
"居民K": "居民K",
|
183 |
+
"居民L": "居民L",
|
184 |
+
"居民X": "居民X",
|
185 |
+
"居民Y": "居民Y",
|
186 |
+
"居民Z": "居民Z",
|
187 |
+
"耳熟的声音": "耳熟的声音",
|
188 |
+
"乱窜的居民A": "乱窜的居民A",
|
189 |
+
"乱窜的居民B": "乱窜的居民B",
|
190 |
+
"乱窜的居民C": "乱窜的居民C",
|
191 |
+
"乱窜的居民D": "乱窜的居民D",
|
192 |
+
"平静的声音": "平静的声音",
|
193 |
+
"女居民A": "女居民A",
|
194 |
+
"女居民B": "女居民B",
|
195 |
+
"女居民C": "女居民C",
|
196 |
+
"城堡兵士": "城堡兵士",
|
197 |
+
"男性居��A": "男性居民A",
|
198 |
+
"男性居民B": "男性居民B",
|
199 |
+
"男性居民C": "男性居民C",
|
200 |
+
"女性居民D": "女性居民D",
|
201 |
+
"女性居民E": "女性居民E",
|
202 |
+
"女性居民F": "女性居民F",
|
203 |
+
"男性居民D": "男性居民D",
|
204 |
+
"男性居民E": "男性居民E",
|
205 |
+
"男性居民F": "男性居民F",
|
206 |
+
"男性居民G": "男性居民G",
|
207 |
+
"男性居民H": "男性居民H",
|
208 |
+
"穿着礼服的女性": "穿着礼服的女性",
|
209 |
+
"黑衣的男人": "黑衣的男人",
|
210 |
+
"不认识的女性": "不认识的女性",
|
211 |
+
"古斯塔夫": "古斯塔夫",
|
212 |
+
"坐在旁边的女性": "坐在旁边的女性",
|
213 |
+
"公主A": "公主A",
|
214 |
+
"公主B": "公主B",
|
215 |
+
"公主C": "公主C",
|
216 |
+
"小个子的少女": "小个子的少女",
|
217 |
+
"罗安娜": "罗安娜",
|
218 |
+
"老太太": "老太太",
|
219 |
+
"村民A": "村民A",
|
220 |
+
"村民B": "村民B",
|
221 |
+
"村民C": "村民C",
|
222 |
+
"村民D": "村民D",
|
223 |
+
"村民E": "村民E",
|
224 |
+
"公主D": "公主D",
|
225 |
+
"公主E": "公主E",
|
226 |
+
"少年的声音": "少年的声音",
|
227 |
+
"艾尔库": "艾尔库",
|
228 |
+
"追杀者": "追杀者",
|
229 |
+
"少女的声音": "少女的声音",
|
230 |
+
"普汀": "普汀",
|
231 |
+
"印第安男人A": "印第安男人A",
|
232 |
+
"印第安男人B": "印第安男人B",
|
233 |
+
"印第安男人C": "印第安男人C",
|
234 |
+
"酋长": "酋长",
|
235 |
+
"白发少女": "白发少女",
|
236 |
+
"女性的声音": "女性的声音",
|
237 |
+
"白人兵士A": "白人兵士A",
|
238 |
+
"白人兵士B": "白人兵士B",
|
239 |
+
"白人士兵C": "白人士兵C",
|
240 |
+
"白人士兵D": "白人士兵D",
|
241 |
+
"白人士兵E": "白人士兵E",
|
242 |
+
"白人士兵F": "白人士兵F",
|
243 |
+
"白人士兵G": "白人士兵G",
|
244 |
+
"白人士兵H": "白人士兵H",
|
245 |
+
"低沉而又冷静的声音": "低沉而又冷静的声音",
|
246 |
+
"印第安女性": "印第安女性",
|
247 |
+
"逃迟了的女性": "逃迟了的女性",
|
248 |
+
"市民A": "市民A",
|
249 |
+
"市民B": "市民B",
|
250 |
+
"市民C": "市民C",
|
251 |
+
"孩子A": "孩子A",
|
252 |
+
"孩子B": "孩子B",
|
253 |
+
"孩子C": "孩子C",
|
254 |
+
"妖怪": "妖怪",
|
255 |
+
"委托人": "委托人",
|
256 |
+
"巫女": "巫女",
|
257 |
+
"静香": "静香",
|
258 |
+
"青年": "青年",
|
259 |
+
"带刀的少女": "带刀的少女",
|
260 |
+
"时枝": "时枝",
|
261 |
+
"冰冷的男声": "冰冷的男声",
|
262 |
+
"青年的声音": "青年的声音",
|
263 |
+
"长发女性": "长发女性",
|
264 |
+
"女人的母亲": "女人的母亲",
|
265 |
+
"旁边的声音": "旁边的声音",
|
266 |
+
"和舞美相似的女性": "和舞美相似的女性",
|
267 |
+
"美和子": "美和子",
|
268 |
+
"": "旁白",
|
269 |
+
"雪斗": "雪斗"
|
270 |
+
}
|
271 |
+
|
272 |
+
# =================
|
273 |
+
for path in a:
|
274 |
+
name = path[path.rindex('\\'):]
|
275 |
+
name = name[:3]
|
276 |
+
if name not in sc:
|
277 |
+
sc[name] = []
|
278 |
+
print(name)
|
279 |
+
# =================
|
280 |
+
|
281 |
+
with open(path, 'r', encoding='utf-8') as f:
|
282 |
+
data = list(filter(lambda x: x,
|
283 |
+
(x.rstrip() for x in f.readlines())))
|
284 |
+
|
285 |
+
# =================
|
286 |
+
w_i = -1
|
287 |
+
while w_i < len(data) - 1:
|
288 |
+
w_i += 1
|
289 |
+
line: str = data[w_i]
|
290 |
+
# =================
|
291 |
+
if line.startswith(' '):
|
292 |
+
n = '旁白'
|
293 |
+
else:
|
294 |
+
_e = endsWithAny(line, {'」', ')', '』'})
|
295 |
+
if _e:
|
296 |
+
_s = {'」': '「', ')': '(', '』': '『'}[_e]
|
297 |
+
if _s not in line:
|
298 |
+
print(line, data[w_i + 1])
|
299 |
+
else:
|
300 |
+
n = line[:line.index(_s)]
|
301 |
+
if n in _n:
|
302 |
+
n = _n[n]
|
303 |
+
else:
|
304 |
+
_n[n] = clearT(n)
|
305 |
+
print(line)
|
306 |
+
line = line[len(n):]
|
307 |
+
else:
|
308 |
+
if startsWithAny(line, {'…………', '啊啊啊啊', '呃呃呃呃', '哦哦哦哦', '————'}):
|
309 |
+
w_i += 1
|
310 |
+
continue
|
311 |
+
print(line)
|
312 |
+
|
313 |
+
d = clearT(line)
|
314 |
+
if d:
|
315 |
+
sc[name].append(n + ':' + d)
|
316 |
+
|
317 |
+
# =================
|
318 |
+
|
319 |
+
for k, v in sc.items():
|
320 |
+
if v:
|
321 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
322 |
+
f.write('\n'.join(v))
|
323 |
+
|
324 |
+
# =================
|
325 |
+
import json
|
326 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=4)
|