xiaojuan0920
commited on
Commit
·
29a2bc5
1
Parent(s):
cb25a68
Update cskg_2.py
Browse files
cskg_2.py
CHANGED
@@ -53,11 +53,11 @@ _LICENSE = "Creative Commons Attribution-ShareAlike 4.0 International License"
|
|
53 |
# "second_domain": "https://huggingface.co/great-new-dataset-second_domain.zip",
|
54 |
# }
|
55 |
# _URLS = {
|
56 |
-
# "cskg": "https://zenodo.org/record/4331372/files/cskg.tsv.gz",
|
57 |
# }
|
58 |
|
59 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
60 |
-
class
|
61 |
"""a commonsense knowledge graph"""
|
62 |
|
63 |
VERSION = datasets.Version("1.1.0")
|
@@ -133,7 +133,7 @@ class cskg_2(datasets.GeneratorBasedBuilder):
|
|
133 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
134 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
135 |
# urls = _URLS[self.config.name]
|
136 |
-
data_dir =
|
137 |
return [
|
138 |
datasets.SplitGenerator(
|
139 |
name=datasets.Split.TRAIN,
|
@@ -198,5 +198,4 @@ class cskg_2(datasets.GeneratorBasedBuilder):
|
|
198 |
# "second_domain_answer": "" if split == "test" else data["second_domain_answer"],
|
199 |
# }
|
200 |
|
201 |
-
|
202 |
-
|
|
|
53 |
# "second_domain": "https://huggingface.co/great-new-dataset-second_domain.zip",
|
54 |
# }
|
55 |
# _URLS = {
|
56 |
+
# # "cskg": "https://zenodo.org/record/4331372/files/cskg.tsv.gz",
|
57 |
# }
|
58 |
|
59 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
60 |
+
class CSKG(datasets.GeneratorBasedBuilder):
|
61 |
"""a commonsense knowledge graph"""
|
62 |
|
63 |
VERSION = datasets.Version("1.1.0")
|
|
|
133 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
134 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
135 |
# urls = _URLS[self.config.name]
|
136 |
+
data_dir = 'cskg_connected.kgtk'
|
137 |
return [
|
138 |
datasets.SplitGenerator(
|
139 |
name=datasets.Split.TRAIN,
|
|
|
198 |
# "second_domain_answer": "" if split == "test" else data["second_domain_answer"],
|
199 |
# }
|
200 |
|
201 |
+
|
|