diff --git a/2022_05/dedup/2022_05_dedup.py b/2022_05/dedup/2022_05_dedup.py new file mode 100644 index 0000000000000000000000000000000000000000..ae1c0de18cc408c4d620dd97ba185089abe464c9 --- /dev/null +++ b/2022_05/dedup/2022_05_dedup.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Cleaned Indonesian split of the mC4 corpus.""" +import json +import glob +import gzip +import textwrap +import datasets +logger = datasets.logging.get_logger(__name__) + +file = sorted(glob.glob('/data/KoPI-CC/2022_05/dedup/*.gz')) +_CITATION = """ +@article{JMLR:v21:20-074, + 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}, + title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer}, + journal = {Journal of Machine Learning Research}, + year = {2020}, + volume = {21}, + number = {140}, + pages = {1-67}, + url = {http://jmlr.org/papers/v21/20-074.html} +} +""" +_DESCRIPTION = """\ +A thoroughly cleaned version of the Italian portion of the multilingual +colossal, cleaned version of Common Crawl's web crawl corpus (mC4) by AllenAI. +Based on Common Crawl dataset: "https://commoncrawl.org". +This is the processed version of Google's mC4 dataset by AllenAI, with further cleaning +detailed in the repository README file. +""" +_HOMEPAGE = "https://github.com/allenai/allennlp/discussions/5056" +_LICENSE = "Open Data Commons Attribution License (ODC-By) v1.0" +_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" +_CONFIGS = { + "tiny": {"train": 100, "validation": 1}, + "small": {"train": 250, "validation": 2}, + "medium": {"train": 500, "validation": 4}, + "large": {"train": 750, "validation": 6}, + "full": {"train": 1016, "validation": 8} +} +class OscarConfig(datasets.BuilderConfig): + """BuilderConfig for the Clean mC4 Italian.""" + def __init__(self, **kwargs): + """BuilderConfig for Clean mC4 Italian. + Args: + **kwargs: keyword arguments forwarded to super. + """ + super().__init__(**kwargs) +class Oscar(datasets.GeneratorBasedBuilder): + """mC4, a colossal, cleaned version of Common Crawl's web crawl corpus.""" + BUILDER_CONFIGS = [ + OscarConfig( + name="full", + version=datasets.Version("1.0.0"), + description=textwrap.dedent( + f"""\ + The full cleaned version of the Italian portion of the multilingual C4 corpus. + Estimated size of compressed files: 103GB + """ + ) + ) + ] + def _info(self): + return datasets.DatasetInfo( + description=_DESCRIPTION, + features=datasets.Features( + { + "text": datasets.Value("string"), + "url": datasets.Value("string"), + "timestamp": datasets.Value("string"), + "meta": datasets.Value("string"), + } + ), + supervised_keys=None, + homepage=_HOMEPAGE, + license=_LICENSE, + citation=_CITATION, + ) + def _split_generators(self, dl_manager): + data_urls = {} + train_downloaded_files = file + return [ + datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": train_downloaded_files}), + ] + def _generate_examples(self, filepaths): + """This function returns the examples in the raw (text) form by iterating on all the files.""" + id_ = 0 + for filepath in filepaths: + logger.info(f"Generating examples from {filepath}") + with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f: + for line in f: + if line: + example = json.loads(line) + yield id_, {'text':example['text'],'url':example['url'],'timestamp':example['timestamp'],'meta': example['meta']} + id_ += 1 diff --git a/2022_05/dedup/oscar-000000000001.json.gz b/2022_05/dedup/oscar-000000000001.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e9c3d5abc0aa185400c605af604e185fbf6aa5d3 --- /dev/null +++ b/2022_05/dedup/oscar-000000000001.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a372217704718b738f655798f84f4ae0f32cc82e8deb08d968f3e8a1ceb6e2a +size 163346131 diff --git a/2022_05/dedup/oscar-000000000002.json.gz b/2022_05/dedup/oscar-000000000002.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..df4bee1dc837c1584222a66422be213fda0e8129 --- /dev/null +++ b/2022_05/dedup/oscar-000000000002.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99f3c1137500f8f891c5f39a38ec680386a56875236ccdfb7acdf417dd195c2d +size 151331757 diff --git a/2022_05/dedup/oscar-000000000003.json.gz b/2022_05/dedup/oscar-000000000003.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e9506d94a7cabb4defe5713831f3994f62d470e5 --- /dev/null +++ b/2022_05/dedup/oscar-000000000003.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bed7cb128a6d2dcfd76cbe2d9a93e4141c7d3b23ab2173807b79f1e4e9f99d1 +size 151255094 diff --git a/2022_05/dedup/oscar-000000000004.json.gz b/2022_05/dedup/oscar-000000000004.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d932af3ca8ee0aaaf13d7d37114651fbf623ac90 --- /dev/null +++ b/2022_05/dedup/oscar-000000000004.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6e97b9188d5ee89a5ccf8f7667ee8a2972ce83789e21051cf02acb082b56cde +size 162896044 diff --git a/2022_05/dedup/oscar-000000000005.json.gz b/2022_05/dedup/oscar-000000000005.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b04e96dab5f6739d9c1143ba75f462768bc296e6 --- /dev/null +++ b/2022_05/dedup/oscar-000000000005.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b05a3853e9cc2cfd731bc9c0c56b2f31d55d936f27dad46b8ecc9d960e66ca93 +size 181699879 diff --git a/2022_05/dedup/oscar-000000000006.json.gz b/2022_05/dedup/oscar-000000000006.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0eeb14ae8768b20ead5e439a79975ef01ff9b661 --- /dev/null +++ b/2022_05/dedup/oscar-000000000006.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e066e887e15f2b390af0dcfbe0afcb919284bdf1b612f0459f023422926ea73 +size 191381354 diff --git a/2022_05/dedup/oscar-000000000007.json.gz b/2022_05/dedup/oscar-000000000007.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6d5865b69cccd11c51ab5da1c3f66f48667f70b1 --- /dev/null +++ b/2022_05/dedup/oscar-000000000007.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a308b2b255073eb2845c5893a0df6ff51bb47237b47ab5c568326f5b8d5c68b5 +size 162699109 diff --git a/2022_05/dedup/oscar-000000000008.json.gz b/2022_05/dedup/oscar-000000000008.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3322abeb6f7fba1db4926798058d0bcfc575d0a1 --- /dev/null +++ b/2022_05/dedup/oscar-000000000008.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31e19f66a8030d70a90b2e19778cf594a2571c05d304dc572771744ee1371e40 +size 166601140 diff --git a/2022_05/dedup/oscar-000000000009.json.gz b/2022_05/dedup/oscar-000000000009.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..47a44ae68d8679b61371f46ca923df400a768a74 --- /dev/null +++ b/2022_05/dedup/oscar-000000000009.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b59f130d47b309cc4abb62af602996dc9d396a5c18d7b5c227c5aa2913cfd6e1 +size 165284001 diff --git a/2022_05/dedup/oscar-000000000010.json.gz b/2022_05/dedup/oscar-000000000010.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b8af0c2e444f6db3167fe08d0bff9376d91701e --- /dev/null +++ b/2022_05/dedup/oscar-000000000010.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0d2016b8e5f9cd671f45632432652142cad5a57c2547095e4913fee656c7617 +size 168438592 diff --git a/2022_05/dedup/oscar-000000000011.json.gz b/2022_05/dedup/oscar-000000000011.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..80f382108464a727f329a9ef57f048435f2926d9 --- /dev/null +++ b/2022_05/dedup/oscar-000000000011.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dcd9bfceb697e1cfc0722d6e61dc655dd4e6ead28137ad07c5e970c232b5b26 +size 170420055 diff --git a/2022_05/dedup/oscar-000000000012.json.gz b/2022_05/dedup/oscar-000000000012.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3b0881326c87feb89a38211c6c3892fbd5063081 --- /dev/null +++ b/2022_05/dedup/oscar-000000000012.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abf582b4c3e720c27b16384ed3de448d4fc153bdcf28e25eb544ab60ff7802c3 +size 177269498 diff --git a/2022_05/dedup/oscar-000000000013.json.gz b/2022_05/dedup/oscar-000000000013.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c0e32071458c83cfa326b9d6752fe318fd13aed9 --- /dev/null +++ b/2022_05/dedup/oscar-000000000013.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf339f631988a0c67686144a895298da9f85a65743001589204714e29a4bf098 +size 176241609 diff --git a/2022_05/dedup/oscar-000000000014.json.gz b/2022_05/dedup/oscar-000000000014.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..db92c8eb60fc033830f8cb8c4c5f311c021b3a86 --- /dev/null +++ b/2022_05/dedup/oscar-000000000014.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8fd3d999cf1df972e3db397857a3e5256a55616d7047b2c760db7bf21379ecb +size 178975660 diff --git a/2022_05/dedup/oscar-000000000015.json.gz b/2022_05/dedup/oscar-000000000015.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2a2f5dfae78fc15843cc8f710dd51a442689ac29 --- /dev/null +++ b/2022_05/dedup/oscar-000000000015.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae371b8fb3b45c59a87c0fea9a3bb815e49b4a13cb679d529bb02d7c5db58ba7 +size 171963412 diff --git a/2022_05/dedup/oscar-000000000016.json.gz b/2022_05/dedup/oscar-000000000016.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..15e54f84bc851f97e038b28295c0719a624c2681 --- /dev/null +++ b/2022_05/dedup/oscar-000000000016.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57231ec2beb0c8e9d10f5058177ff0c9b7ca3ed7944c3532af7bb5a6e4dddf35 +size 178593802 diff --git a/2022_05/dedup/oscar-000000000017.json.gz b/2022_05/dedup/oscar-000000000017.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f01fa9e9c34361f4ea04395e394c5de4d01c2075 --- /dev/null +++ b/2022_05/dedup/oscar-000000000017.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbbca221cea80e0a3a736390f2d2c98506044f6eadb3858f08fc221c5510f2ab +size 187453164 diff --git a/2022_05/dedup/oscar-000000000018.json.gz b/2022_05/dedup/oscar-000000000018.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..87060a8fe5a3b32cf9283ecca946587dc520c3aa --- /dev/null +++ b/2022_05/dedup/oscar-000000000018.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:599804c224afd1c9cb32965a03418301bcf190e01eb03ee01b1ee2fe221d8e83 +size 161946675 diff --git a/2022_05/dedup/oscar-000000000019.json.gz b/2022_05/dedup/oscar-000000000019.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..4c615149de047c9f804423dfdad6fd0f7fe57833 --- /dev/null +++ b/2022_05/dedup/oscar-000000000019.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38db3871eca85e29707795356850c01d71b37ad80b165e1a850b090a0220aafe +size 156728887 diff --git a/2022_05/dedup/oscar-000000000020.json.gz b/2022_05/dedup/oscar-000000000020.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..6eaa527824481ce82e3f2b87555992bc758886d2 --- /dev/null +++ b/2022_05/dedup/oscar-000000000020.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41c705d8d7e518643d362ebd072f8dc942a11d622fa2106168656e1a648a0210 +size 163140004 diff --git a/2022_05/dedup/oscar-000000000021.json.gz b/2022_05/dedup/oscar-000000000021.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d7422b9108a8a41b3af00678a91eafb9235e4644 --- /dev/null +++ b/2022_05/dedup/oscar-000000000021.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:217f5ab546798ee1d15dfd0d209dd743d0768b971821c37bbf922898a54f0dad +size 165574064 diff --git a/2022_05/dedup/oscar-000000000022.json.gz b/2022_05/dedup/oscar-000000000022.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..2f6d20c95771f9a1d5a4808896c483a40aab758d --- /dev/null +++ b/2022_05/dedup/oscar-000000000022.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29b5b8c8659f5bb4ad26a50a1836769826f006ca01c65efe66b8b6be3454a8a0 +size 166866245 diff --git a/2022_05/dedup/oscar-000000000023.json.gz b/2022_05/dedup/oscar-000000000023.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8ddf0006c86811d021cee977db7b459750e698fc --- /dev/null +++ b/2022_05/dedup/oscar-000000000023.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edeef65c4399cfe78869ef1b7d12e2a5e004e74d197b64365df1d4ac3ec3317e +size 168246059 diff --git a/2022_05/dedup/oscar-000000000024.json.gz b/2022_05/dedup/oscar-000000000024.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..72dddd258a401f76ce438b40726f4401b9c8cb59 --- /dev/null +++ b/2022_05/dedup/oscar-000000000024.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cfc12be32e8ec569a0425533bcb3c50a748b3cac65922747a45abfa9e760ab2 +size 171405882 diff --git a/2022_05/dedup/oscar-000000000025.json.gz b/2022_05/dedup/oscar-000000000025.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..9d84c5e69210e2e1cc42cc25ece33874d47a86d1 --- /dev/null +++ b/2022_05/dedup/oscar-000000000025.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a28be05e9c58624f289b529a76eb100105afac06b895edd9ee91d759af81af6 +size 182130896 diff --git a/2022_05/dedup/oscar-000000000026.json.gz b/2022_05/dedup/oscar-000000000026.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0c867449b36e2c632d07375d48fb5e540abba154 --- /dev/null +++ b/2022_05/dedup/oscar-000000000026.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8fc909a9c8cae051206eaa7e5d83b006700931ea4847b0b559dbdf305a376a4 +size 172256260 diff --git a/2022_05/dedup/oscar-000000000027.json.gz b/2022_05/dedup/oscar-000000000027.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0aa3f937b77cf26ce38f6d61ff0dee9bf6ccfe25 --- /dev/null +++ b/2022_05/dedup/oscar-000000000027.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bd4ed45f2ec7cd506efbfbae82940ba2cd8ec5312113b18846631c538f3596b +size 157597647 diff --git a/2022_05/dedup/oscar-000000000028.json.gz b/2022_05/dedup/oscar-000000000028.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c91a7b8f859796414639d57931c35a20d07674e8 --- /dev/null +++ b/2022_05/dedup/oscar-000000000028.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10762e88b486a9bfbcc02db0b2b8c8186e0b84711a3fdac6bddd4dfc0948445b +size 165682277 diff --git a/2022_05/dedup/oscar-000000000029.json.gz b/2022_05/dedup/oscar-000000000029.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..00fb8dd379826d8233cbb359ecbfb77f50a67a07 --- /dev/null +++ b/2022_05/dedup/oscar-000000000029.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1ebcaf155761537085d71287da79a48f29374c83c7255c41dec4f7bffe4053c +size 173269264 diff --git a/2022_05/dedup/oscar-000000000030.json.gz b/2022_05/dedup/oscar-000000000030.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb42162c59fe849fe18dbe54d3b60c51234f30a2 --- /dev/null +++ b/2022_05/dedup/oscar-000000000030.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:674e452e91f2f2eab8e3e7f3657bf28488e706d8d6908f0f283a88a56cdd03d5 +size 188047899 diff --git a/2022_05/dedup/oscar-000000000031.json.gz b/2022_05/dedup/oscar-000000000031.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..78b52aae1eb3b7ca5a2b7a71e6d02f75a7262211 --- /dev/null +++ b/2022_05/dedup/oscar-000000000031.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d58713dc6e58df0030596c98a8ee504aced3fcb76f278f43c37cb7112dfc4b49 +size 172765224 diff --git a/2022_05/dedup/oscar-000000000032.json.gz b/2022_05/dedup/oscar-000000000032.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..47cd8d34dee3d1b43df81b08968bbd9c32db0088 --- /dev/null +++ b/2022_05/dedup/oscar-000000000032.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95352f69a7fe4c243815c4124dfb20c3fadf24068d488324d3c6a8255947647b +size 160599928 diff --git a/2022_05/dedup/oscar-000000000033.json.gz b/2022_05/dedup/oscar-000000000033.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d836333b50f57bddae96b066fcc2c2d631c78b2e --- /dev/null +++ b/2022_05/dedup/oscar-000000000033.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f54728b64c99e3f016850f5751a0e472cfe55ee3d22d520263234d982d2776e8 +size 172555809 diff --git a/2022_05/dedup/oscar-000000000034.json.gz b/2022_05/dedup/oscar-000000000034.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..75ae63e25666eb13720310f4f78c8b685c2768b4 --- /dev/null +++ b/2022_05/dedup/oscar-000000000034.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:431738777e56ba3e19cf7d2ef379f0fb0a8c056b4373f03ffe55185dfb519ee0 +size 153826811 diff --git a/2022_05/dedup/oscar-000000000035.json.gz b/2022_05/dedup/oscar-000000000035.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d03ce293fe90f24902ee6764a15d06acd13ee523 --- /dev/null +++ b/2022_05/dedup/oscar-000000000035.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5862de041cbdf2b031d3d0e88207be12803efabc17f5b73c01d3fc26c7cb387e +size 131839657 diff --git a/2022_05/dedup/oscar-000000000036.json.gz b/2022_05/dedup/oscar-000000000036.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5d1edec48ce986ee8b5dfeb36dba9628ec35ff92 --- /dev/null +++ b/2022_05/dedup/oscar-000000000036.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48c6fd76e130283d468c752dde33e2868818b98e3a557548dd485468a7e1c009 +size 184143764 diff --git a/2022_05/dedup/oscar-000000000037.json.gz b/2022_05/dedup/oscar-000000000037.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..3343d146e55514de84260e23caf34109e9cdfc94 --- /dev/null +++ b/2022_05/dedup/oscar-000000000037.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0115ee9ab5315cf7044638614dcb8edab421206c7fb121dbfba472225d1ba770 +size 188413111 diff --git a/2022_05/dedup/oscar-000000000038.json.gz b/2022_05/dedup/oscar-000000000038.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..28b375d4d6140fda7b6d8b53a2597fff9b5c4baf --- /dev/null +++ b/2022_05/dedup/oscar-000000000038.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94ef806407655a8174af2b0bbd0a642f8728b591cf4866e50323e64201dd0e95 +size 181093373 diff --git a/2022_05/dedup/oscar-000000000039.json.gz b/2022_05/dedup/oscar-000000000039.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ab7cfe60dc4433853d793dcd56e2a18f78b6bf11 --- /dev/null +++ b/2022_05/dedup/oscar-000000000039.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14bbb8d6f047b5454bf96e84482e7cac20c3dc797e49a9a19b555bbbac1279f8 +size 151247920 diff --git a/2022_05/dedup/oscar-000000000040.json.gz b/2022_05/dedup/oscar-000000000040.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..ebfe0f0ddd02d6fd4152ccf662e86185a96d7283 --- /dev/null +++ b/2022_05/dedup/oscar-000000000040.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf4d8208b951539d67536ab6840bd83d20c40548fcc1cd77215bb8584d512330 +size 50835867 diff --git a/2022_05/neardup/oscar-neardup-000000000001.json.gz b/2022_05/neardup/oscar-neardup-000000000001.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cbb22f22f22ee9f9978ea14185607e41a236140f --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000001.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1fc7c5222fe77ad49532d710ddb176355a4d0abd45a06aab61c005a74c7c939 +size 278939101 diff --git a/2022_05/neardup/oscar-neardup-000000000002.json.gz b/2022_05/neardup/oscar-neardup-000000000002.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a05ac8ce9e7cd9dea5037efe3e23c813f6dfa627 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000002.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d284f9b745b3aa9e02091a6e79dc727bedc08ac10dee32cc5066ec3d7a5f0dae +size 287163211 diff --git a/2022_05/neardup/oscar-neardup-000000000003.json.gz b/2022_05/neardup/oscar-neardup-000000000003.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b3880351097f4ce31f8dd7c2b34eab94ba98d301 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000003.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59a70e60cdcfa7184c7038f68be6e13733c6bddf1d87017481db99d5157277e9 +size 309991164 diff --git a/2022_05/neardup/oscar-neardup-000000000004.json.gz b/2022_05/neardup/oscar-neardup-000000000004.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..87f2d4322ed4c409ce1c7fdea7cea9daf80d9f3c --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000004.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77a2532e2dd500f3da51ffb6ce3ff28ba7c6535f5015cbcc241e1b2ee47f084a +size 286088783 diff --git a/2022_05/neardup/oscar-neardup-000000000005.json.gz b/2022_05/neardup/oscar-neardup-000000000005.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..552a3f9e601eff407b6e523ca4c621ee8b5476ee --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000005.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:334fd65846e33ba338e433fdaa1136d4dd8fc350a56709043b0337264134549f +size 303017201 diff --git a/2022_05/neardup/oscar-neardup-000000000006.json.gz b/2022_05/neardup/oscar-neardup-000000000006.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8848d9afec63a27f6cdab7347b762e67b51016d9 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000006.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fad1e673b05642d410a901926e578404d34a24b152e892f034563c6d84952e8 +size 310687355 diff --git a/2022_05/neardup/oscar-neardup-000000000007.json.gz b/2022_05/neardup/oscar-neardup-000000000007.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fdcc8ff3f0d39314b0fe8d7dbfa4bbe1d92cc348 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000007.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df65a7226fff827bd5533e53a2d619decc4e4c9601081ee93fb17ccbdf8d2272 +size 302264587 diff --git a/2022_05/neardup/oscar-neardup-000000000008.json.gz b/2022_05/neardup/oscar-neardup-000000000008.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e1ea26419bf31e5a34cd0f3eff4117371f6c6e48 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000008.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92cfd8d896216f31820caa8f5800fb5aff74e57d72ffbd3e62db3f8fb96e24e6 +size 296964517 diff --git a/2022_05/neardup/oscar-neardup-000000000009.json.gz b/2022_05/neardup/oscar-neardup-000000000009.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..8d0184c4e086fd40e34f789975ce7d71052af910 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000009.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8abde369053a2165a0667be3f42b867435d7bd791bcd15fce70cd9caf8c5cf75 +size 275197663 diff --git a/2022_05/neardup/oscar-neardup-000000000010.json.gz b/2022_05/neardup/oscar-neardup-000000000010.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f156b38dfa837d8476080e887be5eb2b9ddee95b --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000010.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:144643a220bf0518f5dda36bd106181bb1d54420587a4fe888bfad2d4764523e +size 295123542 diff --git a/2022_05/neardup/oscar-neardup-000000000011.json.gz b/2022_05/neardup/oscar-neardup-000000000011.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b50bb468fd46240df5bcb0f503993f5bb51b6526 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000011.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35e5b48105a1323f63d42c2edcf5af73184196c62e251786e4cf6c2b63bf173a +size 313576955 diff --git a/2022_05/neardup/oscar-neardup-000000000012.json.gz b/2022_05/neardup/oscar-neardup-000000000012.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..54f2de2ff90002144a64814eabdbc0808fd29c38 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000012.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3606ed410b8c0e8583054fb5dd7077574aac055e553eeac3d5d4b5f4dd3a592a +size 285161361 diff --git a/2022_05/neardup/oscar-neardup-000000000013.json.gz b/2022_05/neardup/oscar-neardup-000000000013.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..88834501c6ca20220261df8c37a910aa89cea278 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000013.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1aecc338d7a1fb6960b788e16620cfa0e22764789280548cce73d07201570dbd +size 307749187 diff --git a/2022_05/neardup/oscar-neardup-000000000014.json.gz b/2022_05/neardup/oscar-neardup-000000000014.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b59e8bf69726678b88d8e4c3ca4670655d9a7a3e --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000014.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1591ed7be3dd00ae7a95af7a48768dbd5df8ae7d2512ff9f41cb2a94168e57a +size 298927157 diff --git a/2022_05/neardup/oscar-neardup-000000000015.json.gz b/2022_05/neardup/oscar-neardup-000000000015.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..541ac4796cd57707cad19d052af531b53e64aa54 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000015.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e098d91f92ebbd8d35f7e2c0a61388d375ad23ce49c102e474a34f16d6acf130 +size 281998031 diff --git a/2022_05/neardup/oscar-neardup-000000000016.json.gz b/2022_05/neardup/oscar-neardup-000000000016.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..35d1f264cff48a01aa6f634edb7a3073744c0143 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000016.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a0420e51dabcde99f49a37201b0c3c10617b417de2aaa8013fec77c53948739 +size 266128339 diff --git a/2022_05/neardup/oscar-neardup-000000000017.json.gz b/2022_05/neardup/oscar-neardup-000000000017.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..e1a4e70f4c465a128b9ea93e6ce7bbb9e40cab51 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000017.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a42b3efbcb06701f5467ffc39f47172ea5992db515de13faa4a9a6dba8a0f62c +size 297616644 diff --git a/2022_05/neardup/oscar-neardup-000000000018.json.gz b/2022_05/neardup/oscar-neardup-000000000018.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..f46a41793a7ae362d3fef146c8fa63b263e830a2 --- /dev/null +++ b/2022_05/neardup/oscar-neardup-000000000018.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48218865d9b423396529ee07a49c0e20ee289778d135b90465849e976cf21c8d +size 96212780 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000001.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000001.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5e4ee8092022315571f52b748106678b330f64f9 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000001.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4ad91b5949508e5ee6375d1007ec5007bf5cf2890af5b4b2da33d53e1a6cf88 +size 104228941 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000002.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000002.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0dc009ae1c577bc47d8a0517e2176c0df380910e --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000002.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86cbcca3e060e62a00291b615489c50ed756ddd2a90751add60398d5e08a99ac +size 102969223 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000003.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000003.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..fa0d140b390cf340b5e997f3d933f0679ca27155 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000003.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a058569c5e2b7a9c72eb26037d72dbcae8dd24b42548af3bd9c44f9502cb835 +size 103093985 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000004.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000004.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..0b59923421b3c865255db7c3eb0109e3d29771a8 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000004.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e12372117b702aae412175021d8f49e74a438b637a5cf3d23a3916cfa9a54f +size 104965492 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000005.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000005.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b5d46244c49dcb214171224fe1f3819006f407d5 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000005.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52e770b31a3f36f4126866b908747499150ef314a2c73b5def1b265d026276f6 +size 105336981 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000006.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000006.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..263400ac046525d26ddc67ebda0f978b086a1008 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000006.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b78a909f926dd4e9c3a24f1400739bf987bfae039a1cbc28e4431a1d9c070bc +size 103736470 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000007.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000007.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..09aaf6d33b757c6d67a7e8d873712ce6f14280db --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000007.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef953a31d9f35d078499d5819975e6d4a66fd5880d7f8c175015710b960d76ac +size 109275087 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000008.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000008.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..64352dc403b23bd68b422d00d65ba77b41099e09 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000008.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aae1eaebde932c0d6a2cb3e0dcb58f96332892e99e747782d3a767045d472f9 +size 105840813 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000009.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000009.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..76660e142ccbd1cd740f524a2a932952ba887dcd --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000009.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2459844b3d5c233a5622ba977260d9edb9f117f76e8ac4d4934edd2db00cfd04 +size 102544806 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000010.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000010.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..b3bb0a2d2395b691123c03acad57758a1832845b --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000010.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34578a22b52ee52f2b69bb30fb352888471aeda23f8e1b2c3c0665c69d460611 +size 103675110 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000011.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000011.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..032435e5696b53b8c7dc27b5e1968a739fd38616 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000011.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7162832248611471949474b47504dd518d1a1b7b25b81e080b098c49477cc72 +size 109645484 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000012.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000012.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..d7d286a1efc88bea261edbaf6a26127e16949625 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000012.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd78dec90bf9aa6581a2ab10c56d01e78420d5ac9b71e965922244aae74733fd +size 107676321 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000013.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000013.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..c905ad80c3235a63b1f174fccf01b456e17db93a --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000013.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f08f164c0970384610b43c0159e6634e0da016d3aecd050c4455a0ca029f79 +size 111363294 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000014.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000014.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..39e0cd30daf9419f9444bd787d112505bc73309d --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000014.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c956aee482041271445d5e635305e24d0377ae5ab0422ce1b1bd2ebfcd3085c8 +size 109786602 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000015.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000015.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..85c24c8198ffdbd3b2b3f2b1c3058330d26d8d58 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000015.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:056e1efce4aed99a34c69308e2fc84cb1cbae8a09ca65fb38abf51147b0e1e73 +size 108996013 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000016.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000016.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..7b79b02fa31e2ad1b3483f0cc05df6b0f8b50090 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000016.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6fe5c4ca796dd98e6b27b2d96e5dd77ff84991c9519afe57f2d9193e235bc18 +size 108288815 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000017.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000017.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..cc8a4ddec4e568fe382999d09a0e04ce2719b9b0 --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000017.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ae8bfc91eb52a0e0ae792a774e8c0d1e5455de1b75f323905957fe8a8e5b3e5 +size 108356001 diff --git a/2022_05/neardup_clean/cleaned_oscar-neardup-000000000018.json.gz b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000018.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..a89f07f51e0531b0c290cecafdcb3d7d926b859a --- /dev/null +++ b/2022_05/neardup_clean/cleaned_oscar-neardup-000000000018.json.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad402b86cc385f7c7a881b7669cef4680346ef866bc6ee49db4a3f074e3355f8 +size 40583249 diff --git a/2022_05/raw/raw_2022_05.py b/2022_05/raw/raw_2022_05.py new file mode 100644 index 0000000000000000000000000000000000000000..42ecd53a34048f7c1b695fdecf95f88146535e55 --- /dev/null +++ b/2022_05/raw/raw_2022_05.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Cleaned Indonesian split of the mC4 corpus.""" +import json +import glob +import gzip +import textwrap +import zstandard as zstd +import datasets +logger = datasets.logging.get_logger(__name__) + +file = sorted(glob.glob('/data/KoPI-CC/2022_05/raw/*.zst')) +_CITATION = """ +@article{JMLR:v21:20-074, + 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}, + title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer}, + journal = {Journal of Machine Learning Research}, + year = {2020}, + volume = {21}, + number = {140}, + pages = {1-67}, + url = {http://jmlr.org/papers/v21/20-074.html} +} +""" +_DESCRIPTION = """\ +A thoroughly cleaned version of the Italian portion of the multilingual +colossal, cleaned version of Common Crawl's web crawl corpus (mC4) by AllenAI. +Based on Common Crawl dataset: "https://commoncrawl.org". +This is the processed version of Google's mC4 dataset by AllenAI, with further cleaning +detailed in the repository README file. +""" +_HOMEPAGE = "https://github.com/allenai/allennlp/discussions/5056" +_LICENSE = "Open Data Commons Attribution License (ODC-By) v1.0" +_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" +_CONFIGS = { + "tiny": {"train": 100, "validation": 1}, + "small": {"train": 250, "validation": 2}, + "medium": {"train": 500, "validation": 4}, + "large": {"train": 750, "validation": 6}, + "full": {"train": 1016, "validation": 8} +} +class OscarConfig(datasets.BuilderConfig): + """BuilderConfig for the Clean mC4 Italian.""" + def __init__(self, **kwargs): + """BuilderConfig for Clean mC4 Italian. + Args: + **kwargs: keyword arguments forwarded to super. + """ + super().__init__(**kwargs) +class Oscar(datasets.GeneratorBasedBuilder): + """mC4, a colossal, cleaned version of Common Crawl's web crawl corpus.""" + BUILDER_CONFIGS = [ + OscarConfig( + name="full", + version=datasets.Version("1.0.0"), + description=textwrap.dedent( + f"""\ + The full cleaned version of the Italian portion of the multilingual C4 corpus. + Estimated size of compressed files: 103GB + """ + ) + ) + ] + def _info(self): + return datasets.DatasetInfo( + description=_DESCRIPTION, + features=datasets.Features( + { + "text": datasets.Value("string"), + "url": datasets.Value("string"), + "timestamp": datasets.Value("string"), + "meta": datasets.Value("string"), + } + ), + supervised_keys=None, + homepage=_HOMEPAGE, + license=_LICENSE, + citation=_CITATION, + ) + def _split_generators(self, dl_manager): + data_urls = {} + train_downloaded_files = file + return [ + datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": train_downloaded_files}), + ] + def _generate_examples(self, filepaths): + """This function returns the examples in the raw (text) form by iterating on all the files.""" + id_ = 0 + for filepath in filepaths: + logger.info(f"Generating examples from {filepath}") + with zstd.open(open(filepath, "rb"), "rt", encoding="utf-8") as f: + for line in f: + if line: + example = json.loads(line) + meta = dict() + meta["warc_headers"] = example["warc_headers"] + meta["warc_headers"]["warc-identified-content-language"] = example[ + "warc_headers" + ].get("warc-identified-content-language") + meta["identification"] = example["metadata"]["identification"] + meta["annotations"] = example["metadata"]["annotation"] + meta["line_identifications"] = example["metadata"][ + "sentence_identifications" + ] + yield id_, {'text':example['content'],'url':example['warc_headers']['warc-target-uri'],'timestamp':example['warc_headers']['warc-date'],"meta": json.dumps(meta)} + id_ += 1 \ No newline at end of file