Datasets:

Languages:
Chinese
Tags:
Not-For-All-Audiences
License:
Limour commited on
Commit
9115aa3
·
verified ·
1 Parent(s): 7bb9b48

Upload 14 files

Browse files
v-corpus-jp/format/Trinoline/sA.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b79a9da198670bff7885421738cad8abec54d6bfdfb2ac5e22ad8412e3bb97d
3
+ size 166056
v-corpus-jp/format/Trinoline/sB.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c16d0e760db1956b80b2985f07bb27197d91196b0d234514190cb8e67c00790e
3
+ size 137340
v-corpus-jp/format/Trinoline/sC.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:985c40e0082ebdc4bf1fdc4e1fe63b39ebe71731f4b0a7e1f1941c41f3d19098
3
+ size 145483
v-corpus-jp/format/Trinoline/sK.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:076b806f747076bae65d47945063d56e1b8ad42286b0adb413f624537ad2dfb6
3
+ size 134257
v-corpus-jp/format/Trinoline/tmp-Trinoline.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from opencc import OpenCC
2
+ cc = OpenCC('t2s') # 't2s'表示繁体转简体
3
+ from h_corpus import Fileset
4
+ import unicodedata
5
+
6
+ def fullwidth_to_halfwidth(input_str):
7
+ return ''.join([unicodedata.normalize('NFKC', char) for char in input_str])
8
+
9
+ def clearT(s):
10
+ s = cc.convert(fullwidth_to_halfwidth(s))
11
+ return s.lstrip('n').strip().strip(r'\n')
12
+
13
+ def safe_index(s, _s, _i):
14
+ try:
15
+ retn = s.index(_s, _i)
16
+ except:
17
+ return 0, ''
18
+ return retn+1, s[_i:retn]
19
+
20
+ def get_p(s, sep=' ', _max=4):
21
+ retn = []
22
+ idx = 0
23
+ for i in range(_max):
24
+ idx, tmp = safe_index(s, sep, idx)
25
+ if idx == 0:
26
+ break
27
+ retn.append(tmp)
28
+ retn.append(s[idx:])
29
+ return retn
30
+
31
+ a = Fileset(r'D:\datasets\tmp', ext='.sc')
32
+ b = r'D:\datasets\b-corpus\v-corpus-jp\format\Trinoline'
33
+ n_tmp = ''
34
+ sc = []
35
+ s_f = None
36
+ for i in range(len(a)):
37
+ if n_tmp != a[i][16:17]:
38
+ n_tmp = a[i][16:17]
39
+ if s_f:
40
+ if sc:
41
+ s_f.write('\n'.join(sc))
42
+ sc = []
43
+ s_f.close()
44
+ s_f = open(b + f'\\s{n_tmp}.txt', 'w', encoding='utf-8')
45
+ with open(a[i], encoding='Shift_JIS') as f:
46
+ for line in f:
47
+ if not line.startswith('.message'):
48
+ continue
49
+ p = get_p(line)
50
+ n = p[3].replace(' ', '')
51
+ p[4] = clearT(p[4]).strip(r'\v\a')
52
+ if n.startswith('#') and p[4].startswith('「'):
53
+ n = n.strip('#')
54
+ else:
55
+ if not n or n.startswith('#'): n = '旁白'
56
+ if p[4]:
57
+ sc.append(n.strip('@') + ':' + p[4])
58
+ if sc:
59
+ s_f.write('\n'.join(sc))
60
+ s_f.close()
v-corpus-jp/no_format/Harmonia/24.届けたいメロディー_00章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f12c1c950478f839cc2e22f0fc13c5fb4a718c05139bfca6e840930b4c826beb
3
+ size 2038
v-corpus-jp/no_format/Harmonia/25.届けたいメロディー_01章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eaf2383b96f28d9365e94fcd1fd53b78e893c02a11980fa5e04a9d816b4bd48d
3
+ size 21619
v-corpus-jp/no_format/Harmonia/26.届けたいメロディー_02章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:337912883a680a82de4154391b2c11c82e1e063cf282c38376b6670f3fa2444a
3
+ size 15637
v-corpus-jp/no_format/Harmonia/27.届けたいメロディー_03章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fb72d8febbf99e467469968d865a90f5b529f8a8091512ce96dd4a4eac8586c
3
+ size 18800
v-corpus-jp/no_format/Harmonia/28.届けたいメロディー_04章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd4c9001cc0fcac6ddd7d31f91ee7774abee72818b9ca788f81dc525467fd6c0
3
+ size 18022
v-corpus-jp/no_format/Harmonia/29.届けたいメロディー_05章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2e14ab7ad07813ed9c9903f369c4f133e4237be0e1c8941316f34083592a404
3
+ size 11154
v-corpus-jp/no_format/Harmonia/30.届けたいメロディー_06章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bab4536bbfc9b7d2db39158bb279c543057c683deac2c587487c330916a96c1
3
+ size 12368
v-corpus-jp/no_format/Harmonia/31.届けたいメロディー_07章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d0b752e1877342329ed92ee7c2819c3f533e47d51f82d2354633e5796bdc8fe
3
+ size 19371
v-corpus-jp/no_format/Harmonia/32.届けたいメロディー_08章.ss.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b48b2b33c0aa700c2d324fd25ec041f3dd99c28e341ce32e5b7a5258efa4c8ae
3
+ size 9619