人鱼苹果晴菜花,还差苹果妹
Browse files
v-corpus-zh/ALcot/杀恋~悠久的恋爱之歌~/01_com.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a55505a7fd6638569863938802b04bdb71c329428831707334c4107d62839f3c
|
3 |
+
size 74093
|
v-corpus-zh/ALcot/杀恋~悠久的恋爱之歌~/02_rur.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bb620ba596064e68a0e358e3b3aff5150c9f39ef467c7e31148a257f0d0dce69
|
3 |
+
size 102831
|
v-corpus-zh/ALcot/杀恋~悠久的恋爱之歌~/03_nao.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:482392e3b165e785af5357ab777a34fdb6fa55edcb7bf47221b9653f883b8b75
|
3 |
+
size 92529
|
v-corpus-zh/ALcot/杀恋~悠久的恋爱之歌~/04_yuu.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:02e7cb4cb7b4a510eb6656f5ba453aa20468babcb103d78cfbfa6850f8585aa2
|
3 |
+
size 98948
|
v-corpus-zh/ALcot/杀恋~悠久的恋爱之歌~/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/ALcot/杀恋~悠久的恋爱之歌~/人鱼_scn.py
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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='.ks.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 |
+
"女学生A": "女学生A",
|
58 |
+
"女学生B": "女学生B",
|
59 |
+
"女学生C": "女学生C",
|
60 |
+
"女学生D": "女学生D",
|
61 |
+
"イズナ": "御堂",
|
62 |
+
"直的母亲": "直的母亲",
|
63 |
+
"日常酱": "日常酱",
|
64 |
+
"大叔": "大叔",
|
65 |
+
"幼女": "幼女",
|
66 |
+
"母亲": "母亲",
|
67 |
+
"男学生E": "男学生E",
|
68 |
+
"阿姨A": "阿姨A",
|
69 |
+
"男学生F": "男学生F",
|
70 |
+
"阿姨B": "阿姨B",
|
71 |
+
"女学生E": "女学生E",
|
72 |
+
"女学生F": "女学生F",
|
73 |
+
"裕": "裕",
|
74 |
+
"事务员": "事务员",
|
75 |
+
"音声": "音声",
|
76 |
+
"中年男性": "中年男性",
|
77 |
+
"中年女性": "中年女性",
|
78 |
+
"年轻女性": "年轻女性",
|
79 |
+
"聪子": "聪子",
|
80 |
+
"聡子": "聡子",
|
81 |
+
"伊岐那": "伊岐那",
|
82 |
+
"女性": "女性",
|
83 |
+
"男性": "男性",
|
84 |
+
"男子生徒A": "男学生A",
|
85 |
+
"女子生徒C": "女学生C",
|
86 |
+
"中年教师": "中年教师",
|
87 |
+
"男子生徒B": "男学生B",
|
88 |
+
"男子生徒D": "男学生D",
|
89 |
+
"男子生徒C": "男学生C",
|
90 |
+
"女子生徒E": "女学生E",
|
91 |
+
"女子生徒F": "女学生F",
|
92 |
+
"女子生徒B": "女学生B",
|
93 |
+
"女性教师": "女性教师",
|
94 |
+
"小摊老板": "小摊老板",
|
95 |
+
"女学生G": "女学生G",
|
96 |
+
"女子生徒A": "女学生A",
|
97 |
+
"女子生徒D": "女学生D",
|
98 |
+
"客服": "客服",
|
99 |
+
"美月": "美月",
|
100 |
+
"女学生A": "女学生A",
|
101 |
+
"女学生D": "女学生D",
|
102 |
+
"女学生G": "女学生G",
|
103 |
+
"幼猫": "小猫",
|
104 |
+
"少女": "少女",
|
105 |
+
"少年": "少年",
|
106 |
+
"店长": "店长",
|
107 |
+
"子猫": "小猫",
|
108 |
+
"加纳": "加纳",
|
109 |
+
"主唱": "主唱",
|
110 |
+
"吉他手": "吉他手",
|
111 |
+
"贝斯手": "贝斯手",
|
112 |
+
"乐队女生1": "乐队女生1",
|
113 |
+
"乐队女生2": "乐队女生2"
|
114 |
+
}
|
115 |
+
# =================
|
116 |
+
import json
|
117 |
+
|
118 |
+
for path in a:
|
119 |
+
name = path[path.rindex('\\'):]
|
120 |
+
name = name[:7]
|
121 |
+
if name not in sc:
|
122 |
+
sc[name] = []
|
123 |
+
print(name)
|
124 |
+
# =================
|
125 |
+
|
126 |
+
with open(path, 'r', encoding='utf-8') as json_file:
|
127 |
+
data = json.load(json_file)
|
128 |
+
|
129 |
+
# =================
|
130 |
+
for texts in data['scenes']:
|
131 |
+
try:
|
132 |
+
for texts in texts['texts']:
|
133 |
+
# print(texts)
|
134 |
+
n = texts[0]
|
135 |
+
if n is None:
|
136 |
+
n = '旁白'
|
137 |
+
else:
|
138 |
+
if n in _n:
|
139 |
+
n = _n[n]
|
140 |
+
else:
|
141 |
+
_n[n] = clearT(n)
|
142 |
+
print(texts, n)
|
143 |
+
|
144 |
+
# =================
|
145 |
+
d = clearT(texts[2])
|
146 |
+
if d:
|
147 |
+
sc[name].append(n + ':' + d)
|
148 |
+
|
149 |
+
except KeyError:
|
150 |
+
if type(texts) is not dict:
|
151 |
+
print(texts)
|
152 |
+
|
153 |
+
# =================
|
154 |
+
|
155 |
+
for k, v in sc.items():
|
156 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
157 |
+
f.write('\n'.join(v))
|
158 |
+
|
159 |
+
# =================
|
160 |
+
import json
|
161 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=2)
|
162 |
+
|