航迹云的彼方 部分汉化
Browse files
v-corpus-zh/FLAT/航迹云的彼方/1.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9532f592759676e6b5090d52881c47c08be84814fb30910922520d07b2dad211
|
3 |
+
size 171996
|
v-corpus-zh/FLAT/航迹云的彼方/3.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2a57b192696c1397ff69534c843def55e4d34482fa2df0bbadb3997e13a5ad40
|
3 |
+
size 208094
|
v-corpus-zh/FLAT/航迹云的彼方/5.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14289159bbcd9c597bd0d36eeadb7b9c1571ef6c94bbc7d89666992d38aad80f
|
3 |
+
size 27673
|
v-corpus-zh/FLAT/航迹云的彼方/航迹云的彼方_scn.py
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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\航迹云的彼方\航迹云的彼方\scn\json', ext='.ks.json')
|
10 |
+
b = r'E:\galgame\航迹云的彼方\航迹云的彼方\text'
|
11 |
+
|
12 |
+
# =================
|
13 |
+
|
14 |
+
sc = {}
|
15 |
+
_n = {
|
16 |
+
"里沙" : "里沙",
|
17 |
+
"康司" : "康司",
|
18 |
+
"美奈" : "美奈",
|
19 |
+
"和美" : "和美",
|
20 |
+
"雄平" : "雄平",
|
21 |
+
"哲弥" : "哲弥",
|
22 |
+
"巻子" : "卷子",
|
23 |
+
"路人男生A" : "路人男生A",
|
24 |
+
"路人女生B" : "路人女生B",
|
25 |
+
"瑛莉" : "瑛莉",
|
26 |
+
"班里的女生A" : "同班女生A",
|
27 |
+
"班里的男生A" : "同班男生A",
|
28 |
+
"班里的女生B" : "同班女生B",
|
29 |
+
"英语老师" : "英语老师",
|
30 |
+
"润" : "润",
|
31 |
+
"班里的男生B" : "同班男生B",
|
32 |
+
"班里的男生C" : "同班男生C",
|
33 |
+
"伊吕波" : "伊吕波",
|
34 |
+
"绫" : "绫",
|
35 |
+
"影片中的孩子" : "影片中的孩子",
|
36 |
+
"波奇" : "波奇",
|
37 |
+
"綾" : "绫",
|
38 |
+
"班主任" : "班主任",
|
39 |
+
"潤" : "润",
|
40 |
+
"班里的女生A" : "同班女生A",
|
41 |
+
"杏" : "杏",
|
42 |
+
"高江" : "高江",
|
43 |
+
"散" : "散",
|
44 |
+
"古典老师" : "古典老师",
|
45 |
+
"路人女学生A" : "路人女生A",
|
46 |
+
"化学の先生" : "化学老师",
|
47 |
+
"後輩の子" : "学妹", # 到时候再看语境
|
48 |
+
"英語の先生" : "英语老师",
|
49 |
+
"泰子" : "泰子",
|
50 |
+
"同班女生A" : "同班女生A",
|
51 |
+
"同班女生B" : "同班女生B",
|
52 |
+
"现代国语老师" : "现代国语老师",
|
53 |
+
"国光" : "国光",
|
54 |
+
"西川" : "西川",
|
55 |
+
"原" : "原",
|
56 |
+
"医者" : "医生",
|
57 |
+
"日本史老师" : "日本史老师",
|
58 |
+
"陶艺老师" : "陶艺老师",
|
59 |
+
"班上的女生A" : "同班女生A",
|
60 |
+
"班上的女生B" : "同班女生B",
|
61 |
+
"クラスの女子A" : "同班女生A",
|
62 |
+
"瑛美" : "瑛美",
|
63 |
+
"満" : "满",
|
64 |
+
"莉沙" : "里沙",
|
65 |
+
"司" : "司",
|
66 |
+
"ポチ" : "波奇",
|
67 |
+
"映画の子" : "影片中的孩子"
|
68 |
+
}
|
69 |
+
|
70 |
+
# =================
|
71 |
+
import json
|
72 |
+
|
73 |
+
for path in a:
|
74 |
+
name = path[path.rindex('\\') + 1:]
|
75 |
+
name = name[0]
|
76 |
+
if name not in sc:
|
77 |
+
sc[name] = []
|
78 |
+
print(name)
|
79 |
+
# =================
|
80 |
+
|
81 |
+
with open(path, 'r', encoding='utf-8') as json_file:
|
82 |
+
data = json.load(json_file)
|
83 |
+
|
84 |
+
# =================
|
85 |
+
for texts in data['scenes']:
|
86 |
+
try:
|
87 |
+
for texts in texts['texts']:
|
88 |
+
# print(texts)
|
89 |
+
# ['綾', None, '「直接叫名字?初次见面就『康司』这么直接叫名字?」', ... ]
|
90 |
+
n = texts[0]
|
91 |
+
if not n:
|
92 |
+
n = '旁白'
|
93 |
+
else:
|
94 |
+
if n in _n:
|
95 |
+
n = _n[n]
|
96 |
+
else:
|
97 |
+
_n[n] = clearT(n).replace('・', '&')
|
98 |
+
print(texts, n)
|
99 |
+
|
100 |
+
# =================
|
101 |
+
d = clearT(texts[2])
|
102 |
+
if d:
|
103 |
+
sc[name].append(n + ':' + d)
|
104 |
+
|
105 |
+
except KeyError:
|
106 |
+
if type(texts) is not dict:
|
107 |
+
print(texts)
|
108 |
+
|
109 |
+
# =================
|
110 |
+
|
111 |
+
for k, v in sc.items():
|
112 |
+
if v:
|
113 |
+
with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
|
114 |
+
f.write('\n'.join(v))
|
115 |
+
|
116 |
+
# =================
|
117 |
+
import json
|
118 |
+
tmp = json.dumps(_n, ensure_ascii=False, indent=4)
|