Update causenet_wiki.py
Browse files- causenet_wiki.py +4 -2
causenet_wiki.py
CHANGED
@@ -26,7 +26,7 @@ _URL = "https://github.com/causenet-org/CIKM-20"
|
|
26 |
|
27 |
# use dl=1 to force browser to download data instead of displaying it
|
28 |
_TRAIN_DOWNLOAD_URL = "https://groups.uni-paderborn.de/wdqa/causenet/causality-graphs/extraction/wikipedia/wikipedia-extraction.tsv"
|
29 |
-
|
30 |
|
31 |
class CauseNetWikiCorpus(datasets.GeneratorBasedBuilder):
|
32 |
def _info(self):
|
@@ -50,8 +50,10 @@ class CauseNetWikiCorpus(datasets.GeneratorBasedBuilder):
|
|
50 |
def _split_generators(self, dl_manager):
|
51 |
"""Returns SplitGenerators."""
|
52 |
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
|
|
53 |
return [
|
54 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path})
|
|
|
55 |
]
|
56 |
|
57 |
|
|
|
26 |
|
27 |
# use dl=1 to force browser to download data instead of displaying it
|
28 |
_TRAIN_DOWNLOAD_URL = "https://groups.uni-paderborn.de/wdqa/causenet/causality-graphs/extraction/wikipedia/wikipedia-extraction.tsv"
|
29 |
+
_DEMO_DOWNLOAD_URL = "https://drive.google.com/uc?export=download&id=11gKbdn77ngBJr2C1iCK-YUDu9mWbXWx2"
|
30 |
|
31 |
class CauseNetWikiCorpus(datasets.GeneratorBasedBuilder):
|
32 |
def _info(self):
|
|
|
50 |
def _split_generators(self, dl_manager):
|
51 |
"""Returns SplitGenerators."""
|
52 |
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
53 |
+
demo_path = dl_manager.download_and_extract(_DEMO_DOWNLOAD_URL)
|
54 |
return [
|
55 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
|
56 |
+
datasets.SplitGenerator(name="demo", gen_kwargs={"filepath": demo_path})
|
57 |
]
|
58 |
|
59 |
|