Upload 8 files
Browse files- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s1.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s2.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s3.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s4.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s5.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s6.txt.gz +3 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/scn2json.bat +18 -0
- v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/死馆_scn.py +112 -0
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s1.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:018c925865c8faa59e520aae1bab0ab75a943dc299dc57275e98a0d9d6871b94
|
3 |
+
size 35293
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s2.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c6a94ec31c377c46788fc7c09bc32c11fdda6f57272d76d89fb0f563f4784049
|
3 |
+
size 54964
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s3.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59b07c6725d0af07e5fedd6607dea751511539845566224ec0519bbb9aa4b72b
|
3 |
+
size 87878
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s4.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:72b2f77b162a06df87f1e7016415ed6c3a58a15498f81dc1f600b9f6b87517db
|
3 |
+
size 68658
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s5.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3002762e274f319f1b34eca30d331bd0a365bda429ba0eeab9e1389f49f9b4d4
|
3 |
+
size 72435
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/s6.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0ff908568ac1f652d3446e1ed159d1a398191ec1c373baf679091b3b805f2eba
|
3 |
+
size 67913
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/scn2json.bat
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
chcp 65001
|
2 |
+
|
3 |
+
@echo off
|
4 |
+
setlocal enabledelayedexpansion
|
5 |
+
|
6 |
+
set "source_dir=E:\tmp\死馆\scn"
|
7 |
+
set "tool_path=D:\scn\FreeMoteToolkit\PsbDecompile.exe"
|
8 |
+
echo %source_dir%
|
9 |
+
|
10 |
+
for %%f in ("%source_dir%\*.scn") do (
|
11 |
+
set "file_path=%%f"
|
12 |
+
echo Processing !file_path!
|
13 |
+
"%tool_path%" "!file_path!"
|
14 |
+
)
|
15 |
+
|
16 |
+
echo All files processed.
|
17 |
+
|
18 |
+
endlocal
|
v-corpus-zh/BugSystem/濒死轮回的卿于馆中萌生的憎恶/死馆_scn.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.lstrip('n').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\死馆\scn', ext='.txt.json')
|
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 |
+
import json
|
67 |
+
|
68 |
+
for path in a:
|
69 |
+
name = path[path.rindex('\\'):]
|
70 |
+
name = name[:3]
|
71 |
+
if name not in sc:
|
72 |
+
sc[name] = []
|
73 |
+
print(name)
|
74 |
+
# =================
|
75 |
+
|
76 |
+
with open(path, 'r', encoding='utf-8') as json_file:
|
77 |
+
data = json.load(json_file)
|
78 |
+
|
79 |
+
# =================
|
80 |
+
for texts in data['scenes']:
|
81 |
+
try:
|
82 |
+
for texts in texts['texts']:
|
83 |
+
# print(texts)
|
84 |
+
n = texts[0]
|
85 |
+
if n is None:
|
86 |
+
n = '旁白'
|
87 |
+
else:
|
88 |
+
if n in _n:
|
89 |
+
n = _n[n]
|
90 |
+
else:
|
91 |
+
_n[n] = clearT(n)
|
92 |
+
print(texts, n)
|
93 |
+
|
94 |
+
# =================
|
95 |
+
d = clearT(texts[2])
|
96 |
+
if d:
|
97 |
+
sc[name].append(n + ':' + d)
|
98 |
+
|
99 |
+
except KeyError:
|
100 |
+
if type(texts) is not dict:
|
101 |
+
print(texts)
|
102 |
+
|
103 |
+
# =================
|
104 |
+
|
105 |
+
for k, v in sc.items():
|
106 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
107 |
+
f.write('\n'.join(v))
|
108 |
+
|
109 |
+
# =================
|
110 |
+
import json
|
111 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=2)
|
112 |
+
|