Datasets:
Tasks:
Question Answering
Modalities:
Text
Sub-tasks:
extractive-qa
Languages:
code
Size:
100K - 1M
License:
Update data script - make a list of spans
Browse files- codequeries.py +15 -18
codequeries.py
CHANGED
@@ -137,28 +137,25 @@ class Codequeries(datasets.GeneratorBasedBuilder):
|
|
137 |
"header": datasets.Value("string")
|
138 |
}
|
139 |
)
|
140 |
-
features["answer_spans"] =
|
141 |
{
|
142 |
-
"
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
'end_column': datasets.Value("int32")
|
148 |
-
}
|
149 |
}
|
150 |
-
|
151 |
-
|
|
|
152 |
{
|
153 |
-
"
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
'end_column': datasets.Value("int32")
|
159 |
-
}
|
160 |
}
|
161 |
-
|
162 |
features["code_file_path"] = datasets.Value("string")
|
163 |
features["example_type"] = datasets.Value("int32")
|
164 |
features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
|
|
|
137 |
"header": datasets.Value("string")
|
138 |
}
|
139 |
)
|
140 |
+
features["answer_spans"] = [
|
141 |
{
|
142 |
+
'span': datasets.Value("string"),
|
143 |
+
'start_line': datasets.Value("int32"),
|
144 |
+
'start_column': datasets.Value("int32"),
|
145 |
+
'end_line': datasets.Value("int32"),
|
146 |
+
'end_column': datasets.Value("int32")
|
|
|
|
|
147 |
}
|
148 |
+
]
|
149 |
+
|
150 |
+
features["supporting_fact_spans"] = [
|
151 |
{
|
152 |
+
'span': datasets.Value("string"),
|
153 |
+
'start_line': datasets.Value("int32"),
|
154 |
+
'start_column': datasets.Value("int32"),
|
155 |
+
'end_line': datasets.Value("int32"),
|
156 |
+
'end_column': datasets.Value("int32")
|
|
|
|
|
157 |
}
|
158 |
+
]
|
159 |
features["code_file_path"] = datasets.Value("string")
|
160 |
features["example_type"] = datasets.Value("int32")
|
161 |
features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
|