Datasets:
siyue
commited on
Commit
·
4a68a6a
1
Parent(s):
481f76c
readme
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ size_categories:
|
|
| 11 |
|
| 12 |
|
| 13 |
## SQUALL Dataset
|
| 14 |
-
To explore the utility of fine-grained, lexical-level supervision, authors introduce SQUALL, a dataset that enriches 11,276 WikiTableQuestions English-language questions with manually created SQL equivalents plus alignments between SQL and question fragments. 5-fold splits are applied to the full dataset (1 fold as dev set at each time). The subset defines which fold is selected as the validation dataset.
|
| 15 |
|
| 16 |
WARN: alignment data (i.e., `nl_ralign` and `align`) is not implemented.
|
| 17 |
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
## SQUALL Dataset
|
| 14 |
+
To explore the utility of fine-grained, lexical-level supervision, authors introduce SQUALL, a dataset that enriches 11,276 WikiTableQuestions English-language questions with manually created SQL equivalents plus alignments between SQL and question fragments. 5-fold splits are applied to the full dataset (1 fold as dev set at each time). The subset defines which fold is selected as the validation dataset.
|
| 15 |
|
| 16 |
WARN: alignment data (i.e., `nl_ralign` and `align`) is not implemented.
|
| 17 |
|
squall.py
CHANGED
|
@@ -43,24 +43,24 @@ alignments between SQL and question fragments.
|
|
| 43 |
"""
|
| 44 |
|
| 45 |
_URL = "https://raw.githubusercontent.com/tzshi/squall/main/data/"
|
| 46 |
-
# _URLS = {
|
| 47 |
-
# "squall": _URL + "squall.json",
|
| 48 |
-
# "wtq-test": _URL + "wtq-test.json",
|
| 49 |
-
# "dev-0": _URL + "dev-0.ids",
|
| 50 |
-
# "dev-1": _URL + "dev-1.ids",
|
| 51 |
-
# "dev-2": _URL + "dev-2.ids",
|
| 52 |
-
# "dev-3": _URL + "dev-3.ids",
|
| 53 |
-
# "dev-4": _URL + "dev-4.ids",
|
| 54 |
-
# }
|
| 55 |
_URLS = {
|
| 56 |
-
"squall": _URL,
|
| 57 |
-
"wtq-test": _URL,
|
| 58 |
-
"dev-0": _URL,
|
| 59 |
-
"dev-1": _URL,
|
| 60 |
-
"dev-2": _URL,
|
| 61 |
-
"dev-3": _URL,
|
| 62 |
-
"dev-4": _URL,
|
| 63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
class SquallConfig(datasets.BuilderConfig):
|
| 66 |
"""BuilderConfig for Squall."""
|
|
@@ -124,8 +124,17 @@ class Squall(datasets.GeneratorBasedBuilder):
|
|
| 124 |
)
|
| 125 |
|
| 126 |
def _split_generators(self, dl_manager):
|
| 127 |
-
downloaded_files = dl_manager.download(_URLS)
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
return [
|
| 130 |
datasets.SplitGenerator(
|
| 131 |
name=datasets.Split.TRAIN,
|
|
@@ -142,9 +151,9 @@ class Squall(datasets.GeneratorBasedBuilder):
|
|
| 142 |
"""This function returns the examples in the raw (text) form."""
|
| 143 |
logger.info("generating examples from = %s", filepath)
|
| 144 |
|
| 145 |
-
squall_full = filepath["squall"]
|
| 146 |
-
dev_ids = filepath["dev-" + self.config.name]
|
| 147 |
-
test = filepath["wtq-test"]
|
| 148 |
|
| 149 |
if split_key != 'test':
|
| 150 |
with open(squall_full, encoding="utf-8") as f:
|
|
|
|
| 43 |
"""
|
| 44 |
|
| 45 |
_URL = "https://raw.githubusercontent.com/tzshi/squall/main/data/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
_URLS = {
|
| 47 |
+
"squall": _URL + "squall.json",
|
| 48 |
+
"wtq-test": _URL + "wtq-test.json",
|
| 49 |
+
"dev-0": _URL + "dev-0.ids",
|
| 50 |
+
"dev-1": _URL + "dev-1.ids",
|
| 51 |
+
"dev-2": _URL + "dev-2.ids",
|
| 52 |
+
"dev-3": _URL + "dev-3.ids",
|
| 53 |
+
"dev-4": _URL + "dev-4.ids",
|
| 54 |
}
|
| 55 |
+
# _URLS = {
|
| 56 |
+
# "squall": _URL,
|
| 57 |
+
# "wtq-test": _URL,
|
| 58 |
+
# "dev-0": _URL,
|
| 59 |
+
# "dev-1": _URL,
|
| 60 |
+
# "dev-2": _URL,
|
| 61 |
+
# "dev-3": _URL,
|
| 62 |
+
# "dev-4": _URL,
|
| 63 |
+
# }
|
| 64 |
|
| 65 |
class SquallConfig(datasets.BuilderConfig):
|
| 66 |
"""BuilderConfig for Squall."""
|
|
|
|
| 124 |
)
|
| 125 |
|
| 126 |
def _split_generators(self, dl_manager):
|
| 127 |
+
# downloaded_files = dl_manager.download(_URLS)
|
| 128 |
+
urls_to_download = {
|
| 129 |
+
"squall": _URLS["squall"],
|
| 130 |
+
"wtq-test": _URLS["wtq-test"],
|
| 131 |
+
"dev-0": _URLS["dev-0"],
|
| 132 |
+
"dev-1": _URLS["dev-1"],
|
| 133 |
+
"dev-2": _URLS["dev-2"],
|
| 134 |
+
"dev-3": _URLS["dev-3"],
|
| 135 |
+
"dev-4": _URLS["dev-4"],
|
| 136 |
+
}
|
| 137 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 138 |
return [
|
| 139 |
datasets.SplitGenerator(
|
| 140 |
name=datasets.Split.TRAIN,
|
|
|
|
| 151 |
"""This function returns the examples in the raw (text) form."""
|
| 152 |
logger.info("generating examples from = %s", filepath)
|
| 153 |
|
| 154 |
+
squall_full = filepath["squall"]
|
| 155 |
+
dev_ids = filepath["dev-" + self.config.name]
|
| 156 |
+
test = filepath["wtq-test"]
|
| 157 |
|
| 158 |
if split_key != 'test':
|
| 159 |
with open(squall_full, encoding="utf-8") as f:
|