Update GitTables.py
Browse files- GitTables.py +7 -4
GitTables.py
CHANGED
@@ -148,10 +148,13 @@ class GitTables(datasets.GeneratorBasedBuilder):
|
|
148 |
data = json.loads(row)
|
149 |
if self.config.name == "dbpedia":
|
150 |
table_text = {}
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
155 |
# Yields examples as (key, example) tuples
|
156 |
yield key, {
|
157 |
"id": data["id"],
|
|
|
148 |
data = json.loads(row)
|
149 |
if self.config.name == "dbpedia":
|
150 |
table_text = {}
|
151 |
+
if data["table_text"] != None:
|
152 |
+
print(type(data["table_text"]))
|
153 |
+
print(data["table_text"])
|
154 |
+
for i in range(35):
|
155 |
+
col_info = data["table_text"].get(f"col{i}", "")
|
156 |
+
if col_info != "":
|
157 |
+
table_text[f"col{i}"] = col_info
|
158 |
# Yields examples as (key, example) tuples
|
159 |
yield key, {
|
160 |
"id": data["id"],
|