Update brwac-clean.py
Browse files- brwac-clean.py +2 -4
brwac-clean.py
CHANGED
@@ -8,7 +8,7 @@ import datasets
|
|
8 |
|
9 |
logger = datasets.logging.get_logger(__name__)
|
10 |
|
11 |
-
_BASE_DIR = "https://
|
12 |
_BASE_DATA_URL = "https://drive.google.com/file/d/"
|
13 |
|
14 |
|
@@ -42,7 +42,7 @@ class BrwacClean(datasets.GeneratorBasedBuilder):
|
|
42 |
)
|
43 |
|
44 |
def _split_generators(self, dl_manager):
|
45 |
-
files = _BASE_DIR
|
46 |
files = dl_manager.download(files)
|
47 |
|
48 |
with open(files, encoding="utf-8") as f:
|
@@ -58,8 +58,6 @@ class BrwacClean(datasets.GeneratorBasedBuilder):
|
|
58 |
"""This function returns the examples in the raw (text) form by iterating on all the files."""
|
59 |
id_ = 0
|
60 |
for filepath in filepaths:
|
61 |
-
print(filepath)
|
62 |
-
exit()
|
63 |
with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
|
64 |
for line in f:
|
65 |
feature = id_, {"id": id_, "text": line.replace("<END>", "\n").rstrip()}
|
|
|
8 |
|
9 |
logger = datasets.logging.get_logger(__name__)
|
10 |
|
11 |
+
_BASE_DIR = "https://drive.google.com/file/d/1-3Oynfy_ixUlhRuxDK04vW3sieVRv7Gy"
|
12 |
_BASE_DATA_URL = "https://drive.google.com/file/d/"
|
13 |
|
14 |
|
|
|
42 |
)
|
43 |
|
44 |
def _split_generators(self, dl_manager):
|
45 |
+
files = _BASE_DIR
|
46 |
files = dl_manager.download(files)
|
47 |
|
48 |
with open(files, encoding="utf-8") as f:
|
|
|
58 |
"""This function returns the examples in the raw (text) form by iterating on all the files."""
|
59 |
id_ = 0
|
60 |
for filepath in filepaths:
|
|
|
|
|
61 |
with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
|
62 |
for line in f:
|
63 |
feature = id_, {"id": id_, "text": line.replace("<END>", "\n").rstrip()}
|