nskwal commited on
Commit
1a5574e
1 Parent(s): 3ae8428

brwac clean

Browse files
Files changed (3) hide show
  1. brwac-clean.py +7 -5
  2. dataset_infos.json +1 -1
  3. file_names.txt +12 -12
brwac-clean.py CHANGED
@@ -8,8 +8,8 @@ import datasets
8
 
9
  logger = datasets.logging.get_logger(__name__)
10
 
11
- _FILES = ['10CGDFvfMddPmbkXiM4ntGZ75UyLAEX9N','1-uv2ALG5C7P02tAnOrRVoAyHsykWOTpg','10NUJo7Uf-Y1K1HS_Rj1wXPjEK6BsCnsR','1-xMQDKAssrgPs21plEI3wbn5sNmd5j_U','102iMMbfkInQwvIz8sLpz6AVgOhJFLcqo','10kZHAmyTpSWWVznqyWeSTYVJXq76cxmq','1-v2yDhV_f-eUSokNaNuy-iqLlXb2aQk-','108F-u0xgjGckwaprGidkP_PFUaiStEro','10taj31jPdDCBdla-2obITSn9LlllNC7D','111_rEBLm0V3yLZjBiAazUd25qDbwVE-O','10K1KGWjKeEOvvxjY5SHDBxOQNWWGCKmm','10YelrSn-sjGptw2ns5uZUEMSa58VNmF1']
12
- _BASE_DATA_URL = "https://drive.google.com/file/d/"
13
 
14
 
15
  class BrwacCleanConfig(datasets.BuilderConfig):
@@ -22,7 +22,7 @@ class BrwacCleanConfig(datasets.BuilderConfig):
22
  super(BrwacCleanConfig, self).__init__(name=name, description=description, **kwargs)
23
 
24
  # Additional attributes
25
- self.base_data_url = _BASE_DATA_URL
26
 
27
 
28
  class BrwacClean(datasets.GeneratorBasedBuilder):
@@ -42,9 +42,11 @@ class BrwacClean(datasets.GeneratorBasedBuilder):
42
  )
43
 
44
  def _split_generators(self, dl_manager):
45
- data_urls = [self.config.base_data_url + data_filename for data_filename in _FILES]
 
 
 
46
  downloaded_files = dl_manager.download(data_urls)
47
-
48
  return [
49
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files}),
50
  ]
 
8
 
9
  logger = datasets.logging.get_logger(__name__)
10
 
11
+ _BASE_DIR = "/home/diogo/extracted/brwac-clean/"
12
+ _BASE_DATA_DIR = "/home/diogo/extracted/brwac-clean/data/"
13
 
14
 
15
  class BrwacCleanConfig(datasets.BuilderConfig):
 
22
  super(BrwacCleanConfig, self).__init__(name=name, description=description, **kwargs)
23
 
24
  # Additional attributes
25
+ self.base_data_url = _BASE_DATA_DIR
26
 
27
 
28
  class BrwacClean(datasets.GeneratorBasedBuilder):
 
42
  )
43
 
44
  def _split_generators(self, dl_manager):
45
+ files = _BASE_DIR + "file_names.txt"
46
+ with open(files, encoding="utf-8") as f:
47
+ data_filenames = [line.split("\t")[0] for line in f if line]
48
+ data_urls = [self.config.base_data_url + data_filename.strip() for data_filename in data_filenames]
49
  downloaded_files = dl_manager.download(data_urls)
 
50
  return [
51
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files}),
52
  ]
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"brwac-clean": {"description": "", "citation": "", "homepage": "", "license": "", "features": {"id": {"dtype": "int64", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "brwac_clean", "config_name": "brwac-clean", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 7388098184, "num_examples": 3530796, "dataset_name": "brwac_clean"}}, "download_checksums": {"https://drive.google.com/file/d/10CGDFvfMddPmbkXiM4ntGZ75UyLAEX9N": {"num_bytes": 243939232, "checksum": "8fa615912efc9da24636def6b865c3f1423c1cf53c30e3662705e866e33beb01"}, "https://drive.google.com/file/d/1-uv2ALG5C7P02tAnOrRVoAyHsykWOTpg": {"num_bytes": 190833786, "checksum": "b0c137f59f685f1415a667529e1ede3a07a0049a2264beadde46d2ecf207f432"}, "https://drive.google.com/file/d/10NUJo7Uf-Y1K1HS_Rj1wXPjEK6BsCnsR": {"num_bytes": 213158458, "checksum": "1655b12a5c0bd4be49328722e01fffdb3c4d29df333280282c685f549dca911b"}, "https://drive.google.com/file/d/1-xMQDKAssrgPs21plEI3wbn5sNmd5j_U": {"num_bytes": 190491936, "checksum": "feef3bb4d6efaa51267f7756449f8c40a0f2bd56e3cfaafa24b5ba5b08657df5"}, "https://drive.google.com/file/d/102iMMbfkInQwvIz8sLpz6AVgOhJFLcqo": {"num_bytes": 254603468, "checksum": "6b78d3864e034877ab08d01c217baa69e2af31122c0ec20e60ecce834e890018"}, "https://drive.google.com/file/d/10kZHAmyTpSWWVznqyWeSTYVJXq76cxmq": {"num_bytes": 335053382, "checksum": "98d7bb6ba6430a1d1ee6a0ae306750e1e63388fd4c63161df0ebdd3cf7697789"}, "https://drive.google.com/file/d/1-v2yDhV_f-eUSokNaNuy-iqLlXb2aQk-": {"num_bytes": 229010430, "checksum": "0b0dfcf07245e99331c6de49d04ed70849568258d1afa15ea361647e72523ce8"}, "https://drive.google.com/file/d/108F-u0xgjGckwaprGidkP_PFUaiStEro": {"num_bytes": 196775422, "checksum": "b842b9a51ffa687dbb6b927220ff563f52d0d38fc0a29a104d6578c1506b0e38"}, "https://drive.google.com/file/d/10taj31jPdDCBdla-2obITSn9LlllNC7D": {"num_bytes": 259196712, "checksum": "9b793ae63a43e5077ca604a5e4bc155aa0174f95b26eae0d7a589bfca5904576"}, "https://drive.google.com/file/d/111_rEBLm0V3yLZjBiAazUd25qDbwVE-O": {"num_bytes": 321435863, "checksum": "7f8c17e20fdf43a73c8d4a39df4ea7c54d0b015962f954c1bc42f5ca160d4ab5"}, "https://drive.google.com/file/d/10K1KGWjKeEOvvxjY5SHDBxOQNWWGCKmm": {"num_bytes": 187973833, "checksum": "7677c44e950c4eeb7b2d6584b52967c557bb31ee7f571a4003c9473c5a922ea5"}, "https://drive.google.com/file/d/10YelrSn-sjGptw2ns5uZUEMSa58VNmF1": {"num_bytes": 214784795, "checksum": "29fc43db6e5af7a3841f6bf08764659453d3b95670a56edc5ab97e16906a7799"}}, "download_size": 2837257317, "post_processing_size": null, "dataset_size": 7388098184, "size_in_bytes": 10225355501}}
 
1
+ {"brwac-clean": {"description": "", "citation": "", "homepage": "", "license": "", "features": {"id": {"dtype": "int64", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "brwac_clean", "config_name": "brwac-clean", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 7388098184, "num_examples": 3530796, "dataset_name": "brwac_clean"}}, "download_checksums": {"/home/diogo/extracted/brwac-clean/data/brwac-clean-1.txt.gz": {"num_bytes": 243939232, "checksum": "11bf33debe90b4e05514e1e0b88bba04138e17a7f83a97c7e8b5e130ea50015c"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-2.txt.gz": {"num_bytes": 190833786, "checksum": "b0c137f59f685f1415a667529e1ede3a07a0049a2264beadde46d2ecf207f432"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-3.txt.gz": {"num_bytes": 213158458, "checksum": "1655b12a5c0bd4be49328722e01fffdb3c4d29df333280282c685f549dca911b"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-4.txt.gz": {"num_bytes": 190491936, "checksum": "feef3bb4d6efaa51267f7756449f8c40a0f2bd56e3cfaafa24b5ba5b08657df5"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-5.txt.gz": {"num_bytes": 254603468, "checksum": "6b78d3864e034877ab08d01c217baa69e2af31122c0ec20e60ecce834e890018"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-6.txt.gz": {"num_bytes": 335053382, "checksum": "98d7bb6ba6430a1d1ee6a0ae306750e1e63388fd4c63161df0ebdd3cf7697789"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-7.txt.gz": {"num_bytes": 229010430, "checksum": "0b0dfcf07245e99331c6de49d04ed70849568258d1afa15ea361647e72523ce8"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-8.txt.gz": {"num_bytes": 196775422, "checksum": "b842b9a51ffa687dbb6b927220ff563f52d0d38fc0a29a104d6578c1506b0e38"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-9.txt.gz": {"num_bytes": 259196712, "checksum": "9b793ae63a43e5077ca604a5e4bc155aa0174f95b26eae0d7a589bfca5904576"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-10.txt.gz": {"num_bytes": 321435863, "checksum": "7f8c17e20fdf43a73c8d4a39df4ea7c54d0b015962f954c1bc42f5ca160d4ab5"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-11.txt.gz": {"num_bytes": 187973833, "checksum": "7677c44e950c4eeb7b2d6584b52967c557bb31ee7f571a4003c9473c5a922ea5"}, "/home/diogo/extracted/brwac-clean/data/brwac-clean-12.txt.gz": {"num_bytes": 214784795, "checksum": "29fc43db6e5af7a3841f6bf08764659453d3b95670a56edc5ab97e16906a7799"}}, "download_size": 2837257317, "post_processing_size": null, "dataset_size": 7388098184, "size_in_bytes": 10225355501}}
file_names.txt CHANGED
@@ -1,12 +1,12 @@
1
- 10CGDFvfMddPmbkXiM4ntGZ75UyLAEX9N
2
- 1-uv2ALG5C7P02tAnOrRVoAyHsykWOTpg
3
- 10NUJo7Uf-Y1K1HS_Rj1wXPjEK6BsCnsR
4
- 1-xMQDKAssrgPs21plEI3wbn5sNmd5j_U
5
- 102iMMbfkInQwvIz8sLpz6AVgOhJFLcqo
6
- 10kZHAmyTpSWWVznqyWeSTYVJXq76cxmq
7
- 1-v2yDhV_f-eUSokNaNuy-iqLlXb2aQk-
8
- 108F-u0xgjGckwaprGidkP_PFUaiStEro
9
- 10taj31jPdDCBdla-2obITSn9LlllNC7D
10
- 111_rEBLm0V3yLZjBiAazUd25qDbwVE-O
11
- 10K1KGWjKeEOvvxjY5SHDBxOQNWWGCKmm
12
- 10YelrSn-sjGptw2ns5uZUEMSa58VNmF1
 
1
+ brwac-clean-1.txt.gz
2
+ brwac-clean-2.txt.gz
3
+ brwac-clean-3.txt.gz
4
+ brwac-clean-4.txt.gz
5
+ brwac-clean-5.txt.gz
6
+ brwac-clean-6.txt.gz
7
+ brwac-clean-7.txt.gz
8
+ brwac-clean-8.txt.gz
9
+ brwac-clean-9.txt.gz
10
+ brwac-clean-10.txt.gz
11
+ brwac-clean-11.txt.gz
12
+ brwac-clean-12.txt.gz