Datasets:

Languages:
Chinese
Tags:
Not-For-All-Audiences
License:
Limour commited on
Commit
055dcb9
1 Parent(s): ecc433e

Upload 36 files

Browse files
Files changed (36) hide show
  1. ChatHaruhi/RolePlaying/Dumbledore.txt.gz +3 -0
  2. ChatHaruhi/RolePlaying/Harry.txt.gz +3 -0
  3. ChatHaruhi/RolePlaying/Hermione.txt.gz +3 -0
  4. ChatHaruhi/RolePlaying/Luna.txt.gz +3 -0
  5. ChatHaruhi/RolePlaying/Malfoy.txt.gz +3 -0
  6. ChatHaruhi/RolePlaying/McGonagall.txt.gz +3 -0
  7. ChatHaruhi/RolePlaying/Penny.txt.gz +3 -0
  8. ChatHaruhi/RolePlaying/Raj.txt.gz +3 -0
  9. ChatHaruhi/RolePlaying/Ron.txt.gz +3 -0
  10. ChatHaruhi/RolePlaying/Sheldon.txt.gz +3 -0
  11. ChatHaruhi/RolePlaying/Snape.txt.gz +3 -0
  12. ChatHaruhi/RolePlaying/ayaka.txt.gz +3 -0
  13. ChatHaruhi/RolePlaying/baizhantang.txt.gz +3 -0
  14. ChatHaruhi/RolePlaying/duanyu.txt.gz +3 -0
  15. ChatHaruhi/RolePlaying/guofurong.txt.gz +3 -0
  16. ChatHaruhi/RolePlaying/haruhi.txt.gz +3 -0
  17. ChatHaruhi/RolePlaying/hutao.txt.gz +3 -0
  18. ChatHaruhi/RolePlaying/jiumozhi.txt.gz +3 -0
  19. ChatHaruhi/RolePlaying/linghuchong.txt.gz +3 -0
  20. ChatHaruhi/RolePlaying/liyunlong.txt.gz +3 -0
  21. ChatHaruhi/RolePlaying/murongfu.txt.gz +3 -0
  22. ChatHaruhi/RolePlaying/qiaofeng.txt.gz +3 -0
  23. ChatHaruhi/RolePlaying/raidenShogun.txt.gz +3 -0
  24. ChatHaruhi/RolePlaying/tangshiye.txt.gz +3 -0
  25. ChatHaruhi/RolePlaying/tmp_ChatHaruhi.py +63 -0
  26. ChatHaruhi/RolePlaying/tongxiangyu.txt.gz +3 -0
  27. ChatHaruhi/RolePlaying/wanderer.txt.gz +3 -0
  28. ChatHaruhi/RolePlaying/wangduoyu.txt.gz +3 -0
  29. ChatHaruhi/RolePlaying/wangyuyan.txt.gz +3 -0
  30. ChatHaruhi/RolePlaying/weixiaobao.txt.gz +3 -0
  31. ChatHaruhi/RolePlaying/xiaofeng.txt.gz +3 -0
  32. ChatHaruhi/RolePlaying/xinghui.txt.gz +3 -0
  33. ChatHaruhi/RolePlaying/xuzhu.txt.gz +3 -0
  34. ChatHaruhi/RolePlaying/yuebuqun.txt.gz +3 -0
  35. ChatHaruhi/RolePlaying/yuqian.txt.gz +3 -0
  36. ChatHaruhi/RolePlaying/zhongli.txt.gz +3 -0
ChatHaruhi/RolePlaying/Dumbledore.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31c4a5f24b4377b6bcb3717d8f58a4da20caac47d7c5024c28a396c3a2eea627
3
+ size 56481
ChatHaruhi/RolePlaying/Harry.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2d4b3b572deca8a7fcace438a3284fa66ce929d9b0d9888fa3824c0a88c0611
3
+ size 342124
ChatHaruhi/RolePlaying/Hermione.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86e4c450f869c67df20504b951290ba62017159d1320ca5c039c904d38e2dfb5
3
+ size 169002
ChatHaruhi/RolePlaying/Luna.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:432b4ad9c95250d2bb0a72df11d0147402eae98c7074e799b11c22e1fa907e65
3
+ size 6121
ChatHaruhi/RolePlaying/Malfoy.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:967082253e10f45c8cebc9f37cd554741be3023ac60050d315de8717a36cfcd0
3
+ size 17848
ChatHaruhi/RolePlaying/McGonagall.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e8938122fdc5ac5c5bab886c933053ca743b65615b2daa9a5fcc204cef2932b
3
+ size 19447
ChatHaruhi/RolePlaying/Penny.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a6e3a2ea3174572df0e431b25e41722205347c761bb86e886bd18bf3f2fd37f
3
+ size 58601
ChatHaruhi/RolePlaying/Raj.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e0ff078bb9c7b4d2d095d3d5400309f7149d160c69edbbe94338afc77325abf
3
+ size 30872
ChatHaruhi/RolePlaying/Ron.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be450e575e7b604fb6289578ca73a22e8e73387754e323fa77361485c4a31af6
3
+ size 151429
ChatHaruhi/RolePlaying/Sheldon.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72e69b9a1bd21d53071f00577447baab97e7e57bec399b5368042c895db7a991
3
+ size 97395
ChatHaruhi/RolePlaying/Snape.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3a18326ff7e98c507e76f742f45c1f286c03d102c753faf3da38488ab52811d
3
+ size 24110
ChatHaruhi/RolePlaying/ayaka.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:422e7a940db9db9fd8d06a0c5009f91d801615b9aee2ec3f036e928312b892d0
3
+ size 24406
ChatHaruhi/RolePlaying/baizhantang.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44ccc5146aee376148c85206f708c580dbd08f7ba51d8bac973dd0c682bfc27e
3
+ size 47316
ChatHaruhi/RolePlaying/duanyu.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ccf06f4d8906ab031ef975eb0c1d0e579331f3e37c143c4437a51b76d1776b7
3
+ size 49311
ChatHaruhi/RolePlaying/guofurong.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d65dee7caf4acb08f4c78aab9865684656afd01b9f0d00115c94d78e5bca7fbd
3
+ size 38262
ChatHaruhi/RolePlaying/haruhi.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:081ee5b45d7d0942419f4be21de971fd898c180be3646a48506c2e398b829492
3
+ size 37355
ChatHaruhi/RolePlaying/hutao.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0fe8f6614b9252a79a38bc3221b353cdad8aa45be01716982eabbcaa5c421ec
3
+ size 18844
ChatHaruhi/RolePlaying/jiumozhi.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d50730ea49fe3d1200730dc4f2675f535032596c206a5a989304b382c912a434
3
+ size 11277
ChatHaruhi/RolePlaying/linghuchong.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f96828c7c13630b9cc614df97436a553137823d74be259d1a94a53a5f2148ccb
3
+ size 323727
ChatHaruhi/RolePlaying/liyunlong.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dddcfb3cafb70fc63d4feac103df21b27d409f3de42e7d895dd80db103db95f9
3
+ size 94129
ChatHaruhi/RolePlaying/murongfu.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4ff0e25facefffe8940a819156f5961dddc5ae377e4c23d1c525aca83f326ab
3
+ size 20184
ChatHaruhi/RolePlaying/qiaofeng.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bfddf271346475881bb93887cbfcd5d115ec2defb3c547b77dfab844007baa3
3
+ size 24518
ChatHaruhi/RolePlaying/raidenShogun.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b51a8dfa44f544cf0507ac998f257dd3764b48858da1790a81a140b366207433
3
+ size 29288
ChatHaruhi/RolePlaying/tangshiye.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bb3cc848ffef7db8c652575c6b2de7f7926183410e2f47318b36e0cc733feb1
3
+ size 10678
ChatHaruhi/RolePlaying/tmp_ChatHaruhi.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from opencc import OpenCC
2
+ cc = OpenCC('t2s') # 't2s'表示繁体转简体
3
+ from h_corpus import Fileset
4
+ import unicodedata
5
+ import json
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').replace('\n','\\n')
12
+
13
+ a = Fileset(r'D:\datasets\tmp', ext='.jsonl')
14
+ b = r'D:\datasets\b-corpus\ChatHaruhi\RolePlaying'
15
+ for i in range(len(a)):
16
+ path = a[i]
17
+ name = path[path.rindex('\\')+1:path.rindex('.')]
18
+ print(name)
19
+ sc = []
20
+ with open(path, encoding='utf-8') as f:
21
+ for line in f:
22
+ tmp = json.loads(line)
23
+ if tmp['luotuo_openai'] == 'system_prompt':
24
+ n = 'system'
25
+ d = clearT(tmp['text'])
26
+ sc.append(n + ':' + d)
27
+ continue
28
+ if tmp['luotuo_openai'] == 'config':
29
+ continue
30
+ tmp = tmp['text'].split('\n')
31
+ for one in tmp:
32
+ one = one.strip()
33
+ if not one:
34
+ continue
35
+ if ':「' in one:
36
+ one = one.replace(':「', ':「', 1)
37
+ elif ': 「' in one:
38
+ one = one.replace(': 「', ':「', 1)
39
+ elif one.startswith(':'):
40
+ one = '旁白:' + one[1:]
41
+ elif ':「' in one or one.startswith('旁白:'):
42
+ pass
43
+ elif one.startswith('旁白: '):
44
+ one = one.replace('旁白: ', '旁白:', 1)
45
+ elif one.startswith('旁白:'):
46
+ one = one.replace('旁白:', '旁白:', 1)
47
+ elif one.startswith('scene:'):
48
+ one = one.replace('scene:', '旁白:', 1)
49
+ elif one.startswith('Narrator:'):
50
+ one = one.replace('Narrator:', 'Narrator:', 1)
51
+ elif one.startswith('春日:'):
52
+ one = one.replace('春日:', '春日:', 1)
53
+ elif ':' in one:
54
+ pass
55
+ elif ':' in one:
56
+ one = one.replace(':', ':', 1)
57
+ else:
58
+ one = '旁白:' + one
59
+ print(one)
60
+ sc.append(one)
61
+ if sc:
62
+ with open(b + f'\\{name}.txt', 'w', encoding='utf-8') as f:
63
+ f.write('\n'.join(sc))
ChatHaruhi/RolePlaying/tongxiangyu.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3599f92c620671006e369457367c20a4e043497b694ea20b6909ba3f9837e0fd
3
+ size 56461
ChatHaruhi/RolePlaying/wanderer.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f538a3d471994aa41e72ee00b5e01d461e0e1f572dc03a105f16a9bda8c38b8f
3
+ size 23382
ChatHaruhi/RolePlaying/wangduoyu.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a46cf76a93bdafc52e44c6f9ca79bcfc4cf8e78dedce1324d1aced135eb8af
3
+ size 13178
ChatHaruhi/RolePlaying/wangyuyan.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9348d9cc0a4dd94c80f52735dc4a4489ee73ae02791d3a915fd1891f09dee664
3
+ size 20840
ChatHaruhi/RolePlaying/weixiaobao.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4c226991645a7bbb9506f8a642e5528ad91887093305b176abc7f748d5cdec9
3
+ size 248956
ChatHaruhi/RolePlaying/xiaofeng.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9573d53202794145acb970ec00675613bb302de473de29a309894ed0c026b85b
3
+ size 27246
ChatHaruhi/RolePlaying/xinghui.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27474536aea09b8330238847d61ae49beda6a99bb78874febbc433e8dd01703b
3
+ size 14825
ChatHaruhi/RolePlaying/xuzhu.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9587204a7aeb10c8fa892295b337831b42844f6de62f08901c32c93f68fd9979
3
+ size 21992
ChatHaruhi/RolePlaying/yuebuqun.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f4f3c989d7f327b353b5865d07b3ca2b30114385539709972f751cb6e6efcbc
3
+ size 57950
ChatHaruhi/RolePlaying/yuqian.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9bc9bfd2eb76b9cc09550993e9fcc7a5688de5a57cded0b690369f5cea64632
3
+ size 199454
ChatHaruhi/RolePlaying/zhongli.txt.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb79362b42689240084afb3edda77b0e6bee5134f9f60b8d902dc873c12937d6
3
+ size 47429