acul commited on
Commit
b22ff63
1 Parent(s): d66d8ff

add 2021_17 snapshot

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. 2021_17/dedup/2201-17_dedup.py +107 -0
  2. 2021_17/dedup/oscar-000000000001.json.gz +3 -0
  3. 2021_17/dedup/oscar-000000000002.json.gz +3 -0
  4. 2021_17/dedup/oscar-000000000003.json.gz +3 -0
  5. 2021_17/dedup/oscar-000000000004.json.gz +3 -0
  6. 2021_17/dedup/oscar-000000000005.json.gz +3 -0
  7. 2021_17/dedup/oscar-000000000006.json.gz +3 -0
  8. 2021_17/dedup/oscar-000000000007.json.gz +3 -0
  9. 2021_17/dedup/oscar-000000000008.json.gz +3 -0
  10. 2021_17/dedup/oscar-000000000009.json.gz +3 -0
  11. 2021_17/dedup/oscar-000000000010.json.gz +3 -0
  12. 2021_17/dedup/oscar-000000000011.json.gz +3 -0
  13. 2021_17/dedup/oscar-000000000012.json.gz +3 -0
  14. 2021_17/dedup/oscar-000000000013.json.gz +3 -0
  15. 2021_17/dedup/oscar-000000000014.json.gz +3 -0
  16. 2021_17/dedup/oscar-000000000015.json.gz +3 -0
  17. 2021_17/dedup/oscar-000000000016.json.gz +3 -0
  18. 2021_17/dedup/oscar-000000000017.json.gz +3 -0
  19. 2021_17/dedup/oscar-000000000018.json.gz +3 -0
  20. 2021_17/dedup/oscar-000000000019.json.gz +3 -0
  21. 2021_17/dedup/oscar-000000000020.json.gz +3 -0
  22. 2021_17/dedup/oscar-000000000021.json.gz +3 -0
  23. 2021_17/dedup/oscar-000000000022.json.gz +3 -0
  24. 2021_17/dedup/oscar-000000000023.json.gz +3 -0
  25. 2021_17/dedup/oscar-000000000024.json.gz +3 -0
  26. 2021_17/dedup/oscar-000000000025.json.gz +3 -0
  27. 2021_17/dedup/oscar-000000000026.json.gz +3 -0
  28. 2021_17/dedup/oscar-000000000027.json.gz +3 -0
  29. 2021_17/dedup/oscar-000000000028.json.gz +3 -0
  30. 2021_17/dedup/oscar-000000000029.json.gz +3 -0
  31. 2021_17/dedup/oscar-000000000030.json.gz +3 -0
  32. 2021_17/dedup/oscar-000000000031.json.gz +3 -0
  33. 2021_17/dedup/oscar-000000000032.json.gz +3 -0
  34. 2021_17/dedup/oscar-000000000033.json.gz +3 -0
  35. 2021_17/dedup/oscar-000000000034.json.gz +3 -0
  36. 2021_17/dedup/oscar-000000000035.json.gz +3 -0
  37. 2021_17/dedup/oscar-000000000036.json.gz +3 -0
  38. 2021_17/dedup/oscar-000000000037.json.gz +3 -0
  39. 2021_17/dedup/oscar-000000000038.json.gz +3 -0
  40. 2021_17/dedup/oscar-000000000039.json.gz +3 -0
  41. 2021_17/dedup/oscar-000000000040.json.gz +3 -0
  42. 2021_17/dedup/oscar-000000000041.json.gz +3 -0
  43. 2021_17/dedup/oscar-000000000042.json.gz +3 -0
  44. 2021_17/dedup/oscar-000000000043.json.gz +3 -0
  45. 2021_17/dedup/oscar-000000000044.json.gz +3 -0
  46. 2021_17/dedup/oscar-000000000045.json.gz +3 -0
  47. 2021_17/dedup/oscar-000000000046.json.gz +3 -0
  48. 2021_17/dedup/oscar-000000000047.json.gz +3 -0
  49. 2021_17/neardup/neardup_2021_17.py +107 -0
  50. 2021_17/neardup/oscar-neardup-000000000001.json.gz +3 -0
2021_17/dedup/2201-17_dedup.py ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """Cleaned Indonesian split of the mC4 corpus."""
16
+ import json
17
+ import glob
18
+ import gzip
19
+ import textwrap
20
+ import datasets
21
+ logger = datasets.logging.get_logger(__name__)
22
+
23
+ file = sorted(glob.glob('/data/2201-17_dedup/data/*'))
24
+ _CITATION = """
25
+ @article{JMLR:v21:20-074,
26
+ author = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
27
+ title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
28
+ journal = {Journal of Machine Learning Research},
29
+ year = {2020},
30
+ volume = {21},
31
+ number = {140},
32
+ pages = {1-67},
33
+ url = {http://jmlr.org/papers/v21/20-074.html}
34
+ }
35
+ """
36
+ _DESCRIPTION = """\
37
+ A thoroughly cleaned version of the Italian portion of the multilingual
38
+ colossal, cleaned version of Common Crawl's web crawl corpus (mC4) by AllenAI.
39
+ Based on Common Crawl dataset: "https://commoncrawl.org".
40
+ This is the processed version of Google's mC4 dataset by AllenAI, with further cleaning
41
+ detailed in the repository README file.
42
+ """
43
+ _HOMEPAGE = "https://github.com/allenai/allennlp/discussions/5056"
44
+ _LICENSE = "Open Data Commons Attribution License (ODC-By) v1.0"
45
+ _BASE_URL = "https://huggingface.co/datasets/munggok/mc4-id/resolve/main/mc4-id-filter/c4-id{split_suffix}.tfrecord-{index:05d}-of-{n_shards:05d}.json.gz"
46
+ _CONFIGS = {
47
+ "tiny": {"train": 100, "validation": 1},
48
+ "small": {"train": 250, "validation": 2},
49
+ "medium": {"train": 500, "validation": 4},
50
+ "large": {"train": 750, "validation": 6},
51
+ "full": {"train": 1016, "validation": 8}
52
+ }
53
+ class OscarConfig(datasets.BuilderConfig):
54
+ """BuilderConfig for the Clean mC4 Italian."""
55
+ def __init__(self, **kwargs):
56
+ """BuilderConfig for Clean mC4 Italian.
57
+ Args:
58
+ **kwargs: keyword arguments forwarded to super.
59
+ """
60
+ super().__init__(**kwargs)
61
+ class Oscar(datasets.GeneratorBasedBuilder):
62
+ """mC4, a colossal, cleaned version of Common Crawl's web crawl corpus."""
63
+ BUILDER_CONFIGS = [
64
+ OscarConfig(
65
+ name="full",
66
+ version=datasets.Version("1.0.0"),
67
+ description=textwrap.dedent(
68
+ f"""\
69
+ The full cleaned version of the Italian portion of the multilingual C4 corpus.
70
+ Estimated size of compressed files: 103GB
71
+ """
72
+ )
73
+ )
74
+ ]
75
+ def _info(self):
76
+ return datasets.DatasetInfo(
77
+ description=_DESCRIPTION,
78
+ features=datasets.Features(
79
+ {
80
+ "text": datasets.Value("string"),
81
+ "url": datasets.Value("string"),
82
+ "timestamp": datasets.Value("string"),
83
+ "meta": datasets.Value("string"),
84
+ }
85
+ ),
86
+ supervised_keys=None,
87
+ homepage=_HOMEPAGE,
88
+ license=_LICENSE,
89
+ citation=_CITATION,
90
+ )
91
+ def _split_generators(self, dl_manager):
92
+ data_urls = {}
93
+ train_downloaded_files = file
94
+ return [
95
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": train_downloaded_files}),
96
+ ]
97
+ def _generate_examples(self, filepaths):
98
+ """This function returns the examples in the raw (text) form by iterating on all the files."""
99
+ id_ = 0
100
+ for filepath in filepaths:
101
+ logger.info(f"Generating examples from {filepath}")
102
+ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
103
+ for line in f:
104
+ if line:
105
+ example = json.loads(line)
106
+ yield id_, {'text':example['text'],'url':example['url'],'timestamp':example['timestamp'],'meta': example['meta']}
107
+ id_ += 1
2021_17/dedup/oscar-000000000001.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:476db9aa7a3f3566f3749f9db3b703f4f51976796ca38c0194642c11d2ffbce1
3
+ size 115195703
2021_17/dedup/oscar-000000000002.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82de753e8ee524915e5a32757fd7b939be2859041f72a1007cc34e398d672687
3
+ size 116784779
2021_17/dedup/oscar-000000000003.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5134551b16b939ce84e89b5a525a929db10934c34191c0b528ddcbee1cd9a847
3
+ size 118728885
2021_17/dedup/oscar-000000000004.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c5030ae4a7afee51d196b9329ed0dd05586bde2edd376c29012f99ba81700ba
3
+ size 113699820
2021_17/dedup/oscar-000000000005.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6569c571c08ee82f10496ff1543da5297ed92d0aefc98aa0e889a8f0fd4f2a3d
3
+ size 114364718
2021_17/dedup/oscar-000000000006.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:458ccffdd0eeea951807fcd689ed3849141c3d3e329f80f2d8e35c8218f74fb9
3
+ size 118384043
2021_17/dedup/oscar-000000000007.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af6a1f9980410e7feddd8f5d79622e71edb06e29b6489216cea3b90c16457775
3
+ size 127451420
2021_17/dedup/oscar-000000000008.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e7417d6a62c8cb16053749a5053431a59add314063e37fc1e20549a6122abcb
3
+ size 126596069
2021_17/dedup/oscar-000000000009.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb5d08798afb9c6dbe9f8a9815e6a9ccd7e8c3d8163d3072bd52f9c249fc18ce
3
+ size 119366400
2021_17/dedup/oscar-000000000010.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94aca5dbb5c963088078e7b7e35c1d1edb2492e003f179fdc60ae2e1db88daa8
3
+ size 113885196
2021_17/dedup/oscar-000000000011.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8901633102935790a03655c5eb1590cb5794ab022f8737133feeb60e8701fc4
3
+ size 122025669
2021_17/dedup/oscar-000000000012.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a87f1c5906019173072b66812bcbd342aff143aae36ac710f49905a1ca57d34
3
+ size 126974926
2021_17/dedup/oscar-000000000013.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:926ae1bb53dbcfa1be7501d1048710a6df1abaa9ca69bbe0abddc40e51d6e699
3
+ size 112103902
2021_17/dedup/oscar-000000000014.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64d4b45dc3a1b90c1036ff76610e247698bdcdadb641e8f4045b612583d3c28e
3
+ size 117645267
2021_17/dedup/oscar-000000000015.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e7739591aaf9d001528fa22d92e8e5028ab5fdb16949fe56c89009fd31ebc0c
3
+ size 120927179
2021_17/dedup/oscar-000000000016.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10071112608758085b325a33cf4647db46e9997d17736a1244a5ab6455bdaabf
3
+ size 121319906
2021_17/dedup/oscar-000000000017.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b69631ab72d0fb85edc686b474965f7d0a3fc7d0333e953e78579f729629b746
3
+ size 120887944
2021_17/dedup/oscar-000000000018.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab3d65f8670f1f75ba8335afcdae1c95c956428654ef740c6b9bddeb02181a88
3
+ size 119840563
2021_17/dedup/oscar-000000000019.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bde3570adc3791cfba3112db4e43a2de5d2e4ceacfd8e4f2fb23f6217164ba5f
3
+ size 117209924
2021_17/dedup/oscar-000000000020.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c274cc82225845dee35c421dac7bfb3fe28f46fa5323d3790d3f169e3f0331d8
3
+ size 116030938
2021_17/dedup/oscar-000000000021.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50e94a49f5022a73584d3466b6d69d83598febf8a411fc312d9cbfd697adfc4a
3
+ size 116690337
2021_17/dedup/oscar-000000000022.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7f616e2ea43977df6c34f54f404a6847272d44789c1a1c3f5753da4d39fc6a5
3
+ size 116553803
2021_17/dedup/oscar-000000000023.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd82d2b098cd34f138a0bab4012cac4a16f3a7ae9b232e3d35cbea500ca4e9ef
3
+ size 120116189
2021_17/dedup/oscar-000000000024.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e74632487f1723c3361438e1178dbf09e1dd207fd4244b7874fe8a1450e193fc
3
+ size 124595141
2021_17/dedup/oscar-000000000025.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdab9f80009289bc795fd72e88e919e5fefecdbf0b2789fb4752d8650cca69b1
3
+ size 124937836
2021_17/dedup/oscar-000000000026.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddad655aa0a3534829a904b9c835016a5645e88ee36a05f5817b94b6a443f24a
3
+ size 131273505
2021_17/dedup/oscar-000000000027.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e762acdc76ea22b826101a2fc3a46af4ab2902c99e54aef278966785b5f2a25
3
+ size 123537072
2021_17/dedup/oscar-000000000028.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38b8f408b6fdeba232a1d4a306871a2f4814249a29475ac7c643838925c8a1bf
3
+ size 118526527
2021_17/dedup/oscar-000000000029.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb3d2961f2691ae2a4956d645acdadabde564a4367a5e8c238f272924556c15f
3
+ size 118580659
2021_17/dedup/oscar-000000000030.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b5e8dab75204e3f6214908313312d2b1096bef5cc9c012bca2c48448ce227be
3
+ size 115475574
2021_17/dedup/oscar-000000000031.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c2b7b589f98e4c828394b24ecf106b5ea927018f0b68309a88d855861b075c9
3
+ size 112837824
2021_17/dedup/oscar-000000000032.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:445f9b336de0975be34067cfaa95ee81980a647d287b1b7cb19cab0d48c63986
3
+ size 115592227
2021_17/dedup/oscar-000000000033.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95e18623ad7e82669cb335f6756e84bfdbac3bf7e320076e4959d2ba19f5505b
3
+ size 112853921
2021_17/dedup/oscar-000000000034.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86fb53d6ff7b768cbd68c03eb71c2c5b73f236d2bf1cc465c853374e90dee98e
3
+ size 114942317
2021_17/dedup/oscar-000000000035.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:067d8d02e201c38acdde0f16345dfbb55323459dccb7ff98a9c2bd703cdf33a2
3
+ size 116121513
2021_17/dedup/oscar-000000000036.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa902cff2d6100d154341c5430b06824dfa505909a25cf7d3366d88b84384a88
3
+ size 117296415
2021_17/dedup/oscar-000000000037.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b104dcc60516c76aa3c8b3f6a6e5781a6d6df80770099befae44cfcc2cc3cdc1
3
+ size 119142289
2021_17/dedup/oscar-000000000038.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8a1d21a99dda542c8ee9b25bc644cbf4a8568efcc3f8c8edc2e5509507e95fa
3
+ size 119713240
2021_17/dedup/oscar-000000000039.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d55612660a55196d1515cff497765058f1e620078efaa8566f01e0342eb63ad
3
+ size 128809815
2021_17/dedup/oscar-000000000040.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92b9b06af1684ed33b48a5b021fdbdd0740ca285c2f5ff5ece06760349e1b592
3
+ size 119071644
2021_17/dedup/oscar-000000000041.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5337150b586c9e2d685eb48f5f7bdf21ca4260bc02419665c86b9e95aa30b5b
3
+ size 113451785
2021_17/dedup/oscar-000000000042.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b42e1a84b73e54549c0bbf73e359859a14b40b5182ec71e39693090f95d4fe8c
3
+ size 110128359
2021_17/dedup/oscar-000000000043.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04283db3c9f08ee7c7448016d2d55d57458f5ed5186d4ca4fdd29ba55ae710e5
3
+ size 117449836
2021_17/dedup/oscar-000000000044.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec664e56cc3eb66a05836f8188a4db56416e31246582a644a214f4a40b83b7e8
3
+ size 125061747
2021_17/dedup/oscar-000000000045.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:467f4bf5fb138baea1fc14364dff6ca1f544cb31bc6c35d9ecff5b44b43887a3
3
+ size 124987758
2021_17/dedup/oscar-000000000046.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c51386497b3c3930f4806ce294aab0d5587270bcc9476f5412447d41ad1f88cb
3
+ size 120544637
2021_17/dedup/oscar-000000000047.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd899dd469fabf14ebb02e2a289c02aee2d30bf6a14b68116738a2fafd6817fc
3
+ size 34473209
2021_17/neardup/neardup_2021_17.py ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """Cleaned Indonesian split of the mC4 corpus."""
16
+ import json
17
+ import glob
18
+ import gzip
19
+ import textwrap
20
+ import datasets
21
+ logger = datasets.logging.get_logger(__name__)
22
+
23
+ file = sorted(glob.glob('/data/oscar_id/2021_17/neardup/*.gz'))
24
+ _CITATION = """
25
+ @article{JMLR:v21:20-074,
26
+ author = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
27
+ title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
28
+ journal = {Journal of Machine Learning Research},
29
+ year = {2020},
30
+ volume = {21},
31
+ number = {140},
32
+ pages = {1-67},
33
+ url = {http://jmlr.org/papers/v21/20-074.html}
34
+ }
35
+ """
36
+ _DESCRIPTION = """\
37
+ A thoroughly cleaned version of the Italian portion of the multilingual
38
+ colossal, cleaned version of Common Crawl's web crawl corpus (mC4) by AllenAI.
39
+ Based on Common Crawl dataset: "https://commoncrawl.org".
40
+ This is the processed version of Google's mC4 dataset by AllenAI, with further cleaning
41
+ detailed in the repository README file.
42
+ """
43
+ _HOMEPAGE = "https://github.com/allenai/allennlp/discussions/5056"
44
+ _LICENSE = "Open Data Commons Attribution License (ODC-By) v1.0"
45
+ _BASE_URL = "https://huggingface.co/datasets/munggok/mc4-id/resolve/main/mc4-id-filter/c4-id{split_suffix}.tfrecord-{index:05d}-of-{n_shards:05d}.json.gz"
46
+ _CONFIGS = {
47
+ "tiny": {"train": 100, "validation": 1},
48
+ "small": {"train": 250, "validation": 2},
49
+ "medium": {"train": 500, "validation": 4},
50
+ "large": {"train": 750, "validation": 6},
51
+ "full": {"train": 1016, "validation": 8}
52
+ }
53
+ class OscarConfig(datasets.BuilderConfig):
54
+ """BuilderConfig for the Clean mC4 Italian."""
55
+ def __init__(self, **kwargs):
56
+ """BuilderConfig for Clean mC4 Italian.
57
+ Args:
58
+ **kwargs: keyword arguments forwarded to super.
59
+ """
60
+ super().__init__(**kwargs)
61
+ class Oscar(datasets.GeneratorBasedBuilder):
62
+ """mC4, a colossal, cleaned version of Common Crawl's web crawl corpus."""
63
+ BUILDER_CONFIGS = [
64
+ OscarConfig(
65
+ name="full",
66
+ version=datasets.Version("1.0.0"),
67
+ description=textwrap.dedent(
68
+ f"""\
69
+ The full cleaned version of the Italian portion of the multilingual C4 corpus.
70
+ Estimated size of compressed files: 103GB
71
+ """
72
+ )
73
+ )
74
+ ]
75
+ def _info(self):
76
+ return datasets.DatasetInfo(
77
+ description=_DESCRIPTION,
78
+ features=datasets.Features(
79
+ {
80
+ "text": datasets.Value("string"),
81
+ "url": datasets.Value("string"),
82
+ "timestamp": datasets.Value("string"),
83
+ "meta": datasets.Value("string"),
84
+ }
85
+ ),
86
+ supervised_keys=None,
87
+ homepage=_HOMEPAGE,
88
+ license=_LICENSE,
89
+ citation=_CITATION,
90
+ )
91
+ def _split_generators(self, dl_manager):
92
+ data_urls = {}
93
+ train_downloaded_files = file
94
+ return [
95
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": train_downloaded_files}),
96
+ ]
97
+ def _generate_examples(self, filepaths):
98
+ """This function returns the examples in the raw (text) form by iterating on all the files."""
99
+ id_ = 0
100
+ for filepath in filepaths:
101
+ logger.info(f"Generating examples from {filepath}")
102
+ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
103
+ for line in f:
104
+ if line:
105
+ example = json.loads(line)
106
+ yield id_, {'text':example['text'],'url':example['url'],'timestamp':example['timestamp'],'meta': example['meta']}
107
+ id_ += 1
2021_17/neardup/oscar-neardup-000000000001.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:172fe13d5cdc3a8883a4348b3d0bf2ced36b090bc659e4d0af3da7dacb35a8c3
3
+ size 110312802