Datasets:

Languages:
Chinese
Tags:
Not-For-All-Audiences
License:
Limour commited on
Commit
6e9b5f4
1 Parent(s): d79ac2a

Upload 10 files

Browse files
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario01.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99284bdf59d6f7bc08566e0ce579349bd533e2b2b10e503f03586f8941bba55f
3
+ size 77844
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario02.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0a7f97387f029892943ba63aed8b87d81b26a6eb0746df5b73427dbc1132240
3
+ size 85206
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario03.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76b17a717ede5644ce63ecb92facf480c24a3d71ea25b277ca01a3e99acf38f8
3
+ size 46643
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario04.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a15a0864e11a207dfbd91ac704d8796a9b4257d95d42233305b16a163756fdb
3
+ size 50668
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario05.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f91a95a0cc7153a6500812b97112a06408d2eb3e907662508346eff9f64c807
3
+ size 106070
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario06.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67c14dc1ad60e811c6ee8f02159b21aa9270fcc853a70dd2c6a81facc530c2a5
3
+ size 116096
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario07.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b8904179a8d29949600f4d20da6536fb9b58eff48fbb7335e778c1179e9aa7f
3
+ size 83786
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario08.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:391870c02b84560c3bfe9229e08bb79d91b9e400d656da010fff5a0dd95902f2
3
+ size 83058
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/scenario09.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73bdd4d0a4103f9a318e221493e7c6c261a7620a93175b45f9c777069f705f17
3
+ size 41710
v-corpus-zh/UGUISUKAGURA/冥契的牧神节/tmp_MeikeiNoLupercalia.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from opencc import OpenCC
2
+
3
+ cc = OpenCC('t2s') # 't2s'表示繁体转简体
4
+ from h_corpus import Fileset
5
+ import unicodedata
6
+ import json, re
7
+
8
+
9
+ def fullwidth_to_halfwidth(input_str):
10
+ return ''.join([unicodedata.normalize('NFKC', char) for char in input_str])
11
+
12
+
13
+ def clearT(s):
14
+ s = cc.convert(fullwidth_to_halfwidth(s))
15
+ return s.lstrip('n').strip().strip(r'\n').replace('\n', '\\n')
16
+
17
+
18
+ def custom_sort_key(s):
19
+ # 将字符串中的数字部分转换为整数,然后进行排序
20
+ return [int(x) if x.isdigit() else x for x in re.split('([0-9]+)', s)]
21
+
22
+
23
+ def s_in(s, ss, es):
24
+ return [x.split(es)[0] for x in s.split(ss) if es in x]
25
+
26
+
27
+ _n = {
28
+ "冰狐": "冰狐", # 折原冰狐
29
+ "环": "环", # 濑和环 主角
30
+ "双叶": "双叶", # 仓科双叶
31
+ "胧": "胧", # 白坂花
32
+ "花": "花", # 椎名胧
33
+ "来来": "来来", # 天乐来来
34
+ "巡游": "巡游", # 匂宫巡游
35
+ "悠苑": "悠苑", # 龙木悠苑
36
+ "兵士们": "兵士们",
37
+ "丹麦王": "丹麦王",
38
+ "哈姆雷特": "哈姆雷特",
39
+ "男学生A": "男学生A",
40
+ "男学生B": "男学生B",
41
+ "女学生A": "女学生A",
42
+ "女学生B": "女学生B",
43
+ "霍雷肖": "霍雷肖",
44
+ "老板": "老板",
45
+ "琥珀": "琥珀", # 架桥琥珀
46
+ "未来": "未来", # 濑和未来
47
+ "T先生": "T先生",
48
+ "剧团成员A": "剧团成员A",
49
+ "京子": "京子",
50
+ "理世": "理世", # 箱鸟理世
51
+ "美嘉": "美嘉",
52
+ "零时": "零时",
53
+ "??": "?",
54
+ "男记者A": "男记者A",
55
+ "女记者A": "女记者A",
56
+ "奈奈菜": "奈奈菜", # 天使奈奈菜
57
+ "老师A": "老师A",
58
+ "中年男性": "中年男性",
59
+ "王海": "王海",
60
+ "监督": "监督",
61
+ "路人A": "路人A",
62
+ "路人B": "路人B",
63
+ "男子学生A": "男子学生A",
64
+ "店员A": "店员A",
65
+ "教师A": "教师A",
66
+ "导演A": "导演A",
67
+ "芙蕾雅": "芙蕾雅",
68
+ "索尔": "索尔",
69
+ "海姆达尔": "海姆达尔",
70
+ "洛基": "洛基",
71
+ "奥丁": "奥丁",
72
+ "巴德尔": "巴德尔",
73
+ "观众A": "观众A",
74
+ "海拉": "海拉",
75
+ "芬里尔": "芬里尔",
76
+ "全员": "全员",
77
+ "女子学生A": "女子学生A",
78
+ "女子学生B": "女子学生B",
79
+ "母亲": "母亲",
80
+ "教師A": "教师A",
81
+ "男学生C": "男学生C",
82
+ "演出家A": "演出家A",
83
+ "舞台监督B": "舞台监督B",
84
+ "座長A": "座长A",
85
+ "小王子": "小王子",
86
+ "男子学生B": "男子学生B",
87
+ "观众B": "观众B",
88
+ "少女": "少女",
89
+ "小学生女子A": "小学生女子A",
90
+ }
91
+
92
+ a = Fileset(r'E:\tmp\MeikeiNoLupercalia\ks', ext='.ks')
93
+ sorted_indices = sorted(range(len(a)), key=lambda i: custom_sort_key(a[i]))
94
+ a = [a[i] for i in sorted_indices]
95
+ b = r'D:\datasets\tmp'
96
+ sc = {}
97
+ reg_n = re.compile(r'\[name fn="([^"]+?)"]')
98
+ reg_c = re.compile(r'(\[[^]]+?]| )')
99
+ for i in range(len(a)):
100
+ path = a[i]
101
+ tmp = path[path.rindex('\\') + 1:path.rindex('.')]
102
+ print(tmp)
103
+ name = tmp[:10]
104
+ print(name)
105
+ if name not in sc:
106
+ sc[name] = []
107
+ with open(path, encoding='utf-16le') as f:
108
+ tmp = s_in(f.read(), '[cs]', '[ps]')
109
+ for line in tmp:
110
+ n = reg_n.findall(line)
111
+ if len(n) == 1:
112
+ n = n[0]
113
+ # _n[n] = clearT(n)
114
+ n = _n[n]
115
+ else:
116
+ n = '旁白'
117
+ # if '「' in line:
118
+ # print(line)
119
+ line = clearT(reg_c.sub('', line))
120
+ if line:
121
+ sc[name].append(n + ':' + line)
122
+
123
+ for k, v in sc.items():
124
+ with open(b + f'\\{k}.txt', 'w', encoding='utf-8') as f:
125
+ f.write('\n'.join(v))
126
+
127
+ tmp = json.dumps(_n, ensure_ascii=False, indent=2)