nskwal commited on
Commit
35a993e
·
1 Parent(s): 3d7798a

Update brwac-clean.py

Browse files
Files changed (1) hide show
  1. brwac-clean.py +4 -5
brwac-clean.py CHANGED
@@ -9,7 +9,7 @@ import datasets
9
  logger = datasets.logging.get_logger(__name__)
10
 
11
  _BASE_DIR = "https://huggingface.co/datasets/nlpufg/brwac-clean/blob/main/"
12
- _BASE_DATA_DIR = "https://huggingface.co/datasets/nlpufg/brwac-clean/blob/main/data/"
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_DIR
26
 
27
 
28
  class BrwacClean(datasets.GeneratorBasedBuilder):
@@ -44,13 +44,12 @@ class BrwacClean(datasets.GeneratorBasedBuilder):
44
  def _split_generators(self, dl_manager):
45
  files = _BASE_DIR + "file_names.txt"
46
  files = dl_manager.download(files)
47
- print(files)
48
  with open(files, encoding="utf-8") as f:
49
  data_filenames = [line.split("\t")[0] for line in f if line]
50
  data_urls = [self.config.base_data_url + data_filename.strip() for data_filename in data_filenames]
51
  downloaded_files = dl_manager.download(data_urls)
52
- print(downloaded_files)
53
- exit()
54
  return [
55
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files}),
56
  ]
 
9
  logger = datasets.logging.get_logger(__name__)
10
 
11
  _BASE_DIR = "https://huggingface.co/datasets/nlpufg/brwac-clean/blob/main/"
12
+ _BASE_DATA_URL = "https://drive.google.com/file/d/"
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_URL
26
 
27
 
28
  class BrwacClean(datasets.GeneratorBasedBuilder):
 
44
  def _split_generators(self, dl_manager):
45
  files = _BASE_DIR + "file_names.txt"
46
  files = dl_manager.download(files)
47
+
48
  with open(files, encoding="utf-8") as f:
49
  data_filenames = [line.split("\t")[0] for line in f if line]
50
  data_urls = [self.config.base_data_url + data_filename.strip() for data_filename in data_filenames]
51
  downloaded_files = dl_manager.download(data_urls)
52
+
 
53
  return [
54
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files}),
55
  ]