add some text
Browse files- some_text.txt +3 -0
- test.py +4 -3
some_text.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
foo
|
2 |
+
bar
|
3 |
+
foobar
|
test.py
CHANGED
@@ -8,7 +8,7 @@ _DESCRIPTION = """\
|
|
8 |
This is a test dataset.
|
9 |
"""
|
10 |
|
11 |
-
|
12 |
|
13 |
|
14 |
class Test(datasets.GeneratorBasedBuilder):
|
@@ -29,10 +29,11 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
29 |
)
|
30 |
|
31 |
def _split_generators(self, dl_manager):
|
32 |
-
|
33 |
|
34 |
return [
|
35 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath":
|
|
|
36 |
]
|
37 |
|
38 |
def _generate_examples(self, filepath):
|
|
|
8 |
This is a test dataset.
|
9 |
"""
|
10 |
|
11 |
+
_URLS = {"train": "https://pastebin.com/raw/HvpE1CnA", "dev": "some_text.txt"}
|
12 |
|
13 |
|
14 |
class Test(datasets.GeneratorBasedBuilder):
|
|
|
29 |
)
|
30 |
|
31 |
def _split_generators(self, dl_manager):
|
32 |
+
downloaded_files = dl_manager.download_and_extract(_URLS)
|
33 |
|
34 |
return [
|
35 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
36 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
37 |
]
|
38 |
|
39 |
def _generate_examples(self, filepath):
|