shivangibithel
commited on
Commit
•
be9ca74
1
Parent(s):
36cb928
Update SOTAB.py
Browse files
SOTAB.py
CHANGED
@@ -25,6 +25,28 @@ def _read_table_from_file(table_name: str, root_dir: str)-> dict:
|
|
25 |
|
26 |
class SOTAB(datasets.GeneratorBasedBuilder):
|
27 |
"""The SOTAB dataset"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
def _split_generators(self, dl_manager):
|
29 |
train_url = "https://data.dws.informatik.uni-mannheim.de/structureddata/sotab/CTA_Training.zip"
|
30 |
dev_url = "https://data.dws.informatik.uni-mannheim.de/structureddata/sotab/CTA_Validation.zip"
|
|
|
25 |
|
26 |
class SOTAB(datasets.GeneratorBasedBuilder):
|
27 |
"""The SOTAB dataset"""
|
28 |
+
|
29 |
+
def _info(self):
|
30 |
+
features = datasets.Features(
|
31 |
+
{
|
32 |
+
# "id": datasets.Value("int32"),
|
33 |
+
"column_index": datasets.Value("string"),
|
34 |
+
"label": datasets.Value("string"),
|
35 |
+
"table": {
|
36 |
+
"header": datasets.features.Sequence(datasets.Value("string")),
|
37 |
+
"rows": datasets.features.Sequence(datasets.features.Sequence(datasets.Value("string"))),
|
38 |
+
"name": datasets.Value("string"),
|
39 |
+
},
|
40 |
+
}
|
41 |
+
)
|
42 |
+
|
43 |
+
# datasets.value -- single value
|
44 |
+
# datasets.features.Sequence -- list
|
45 |
+
|
46 |
+
return datasets.DatasetInfo(
|
47 |
+
features=features
|
48 |
+
)
|
49 |
+
|
50 |
def _split_generators(self, dl_manager):
|
51 |
train_url = "https://data.dws.informatik.uni-mannheim.de/structureddata/sotab/CTA_Training.zip"
|
52 |
dev_url = "https://data.dws.informatik.uni-mannheim.de/structureddata/sotab/CTA_Validation.zip"
|