shjwudp commited on
Commit
c8b2dae
1 Parent(s): d530724

feat: do md5 deduplication for books, and shuffle

Browse files
README.md CHANGED
@@ -3,4 +3,6 @@ language: zh
3
  license: cc-by-4.0
4
  ---
5
 
6
- The dataset constructed from Chinese books. Is still collecting corpus, welcome to join the construction! This repo is only for publication, data errors and corpus contributions, please submit an issue on github https://github.com/shjwudp/shu.
 
 
 
3
  license: cc-by-4.0
4
  ---
5
 
6
+ 收集中文书籍总计15686本,用于学术研究和工业生产使用,书籍持续收录中,参与贡献请移步[代码仓库](https://github.com/shjwudp/shu)。
7
+
8
+ The dataset constructed from Chinese books. Books are being collected continuously. Please move to [code warehouse](https://github.com/shjwudp/shu) to contribute.
bad_lines.jsonl.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9ad12a043e47f615243291b666bf20c8425085902b42474160b9eb7512922e07
3
- size 1409160631
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16a0320c849abf6fad28867b71bdf592b7d812cecf2c54b20ed448c74c7acb80
3
+ size 1397033113
books.jsonl.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20ee447bde5d72ee8b40f7205ab100b6f2fd4ecf6ed6a5f40acc65f2901f30c4
3
- size 2300825625
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc4b739971c7efc53cf3b9414a094aa4ec075443a81966ca4356267f64f66aba
3
+ size 2302537322
clean_books.jsonl.gz DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d90fc8b8be2707620bae754bda193cb00ab3096738ddc4810e3e01dd025679b9
3
- size 883820675
 
 
 
 
books_in_simplified_chinese.jsonl.gz → clean_text.jsonl.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e1e2e418592f05341625494d5b9ac2c8c96d283f306d1a766b1a77869358110d
3
- size 883810382
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb2173bfa3c45577038525765c03cb647d303c41ae8f742212f69ecec016c63a
3
+ size 898214366
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"clean": {"description": "shu is a chinese book dataset.\n", "citation": "", "homepage": "https://github.com/shjwudp/shu", "license": "", "features": {"name": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "shu", "config_name": "clean", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2058524432, "num_examples": 11710, "dataset_name": "shu"}}, "download_checksums": {"clean_books.jsonl.gz": {"num_bytes": 883820675, "checksum": "d90fc8b8be2707620bae754bda193cb00ab3096738ddc4810e3e01dd025679b9"}}, "download_size": 883820675, "post_processing_size": null, "dataset_size": 2058524432, "size_in_bytes": 2942345107}, "simplified clean": {"description": "shu is a chinese book dataset.\n", "citation": "", "homepage": "https://github.com/shjwudp/shu", "license": "", "features": {"name": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "shu", "config_name": "simplified clean", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2058621856, "num_examples": 11710, "dataset_name": "shu"}}, "download_checksums": {"books_in_simplified_chinese.jsonl.gz": {"num_bytes": 883810382, "checksum": "e1e2e418592f05341625494d5b9ac2c8c96d283f306d1a766b1a77869358110d"}}, "download_size": 883810382, "post_processing_size": null, "dataset_size": 2058621856, "size_in_bytes": 2942432238}, "original text": {"description": "shu is a chinese book dataset.\n", "citation": "", "homepage": "https://github.com/shjwudp/shu", "license": "", "features": {"name": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "shu", "config_name": "original text", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5141361142, "num_examples": 15694, "dataset_name": "shu"}}, "download_checksums": {"books.jsonl.gz": {"num_bytes": 2300825625, "checksum": "20ee447bde5d72ee8b40f7205ab100b6f2fd4ecf6ed6a5f40acc65f2901f30c4"}}, "download_size": 2300825625, "post_processing_size": null, "dataset_size": 5141361142, "size_in_bytes": 7442186767}, "bad lines": {"description": "shu is a chinese book dataset.\n", "citation": "", "homepage": "https://github.com/shjwudp/shu", "license": "", "features": {"name": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "shu", "config_name": "bad lines", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2970314577, "num_examples": 15690, "dataset_name": "shu"}}, "download_checksums": {"bad_lines.jsonl.gz": {"num_bytes": 1409160631, "checksum": "9ad12a043e47f615243291b666bf20c8425085902b42474160b9eb7512922e07"}}, "download_size": 1409160631, "post_processing_size": null, "dataset_size": 2970314577, "size_in_bytes": 4379475208}}
 
 
shu.py CHANGED
@@ -14,10 +14,9 @@ shu is a chinese book dataset.
14
  _HOMEPAGE = "https://github.com/shjwudp/shu"
15
 
16
  _DATA_URLS = {
17
- "clean": "clean_books.jsonl.gz",
18
- "simplified clean": "books_in_simplified_chinese.jsonl.gz",
19
- "original text": "books.jsonl.gz",
20
- "bad lines": "bad_lines.jsonl.gz",
21
  }
22
 
23
 
@@ -38,13 +37,13 @@ class ShuConfig(datasets.BuilderConfig):
38
 
39
 
40
  class Shu(datasets.GeneratorBasedBuilder):
41
- """shu: Chinese book dataset."""
42
 
43
  VERSION = datasets.Version("0.1.0")
44
 
45
  BUILDER_CONFIG_CLASS = ShuConfig
46
  BUILDER_CONFIGS = [ShuConfig(subsets=[subset]) for subset in _DATA_URLS]
47
- DEFAULT_CONFIG_NAME = "simplified clean"
48
 
49
  def _info(self):
50
  return datasets.DatasetInfo(
 
14
  _HOMEPAGE = "https://github.com/shjwudp/shu"
15
 
16
  _DATA_URLS = {
17
+ "books": "books.jsonl.gz",
18
+ "bad-lines": "bad_lines.jsonl.gz",
19
+ "clean-text": "clean_text.jsonl.gz",
 
20
  }
21
 
22
 
 
37
 
38
 
39
  class Shu(datasets.GeneratorBasedBuilder):
40
+ """A chinese book dataset."""
41
 
42
  VERSION = datasets.Version("0.1.0")
43
 
44
  BUILDER_CONFIG_CLASS = ShuConfig
45
  BUILDER_CONFIGS = [ShuConfig(subsets=[subset]) for subset in _DATA_URLS]
46
+ DEFAULT_CONFIG_NAME = "books"
47
 
48
  def _info(self):
49
  return datasets.DatasetInfo(