Change field name "question" to "query"
Browse files
phrase_sense_disambiguation.py
CHANGED
@@ -71,7 +71,7 @@ class PhraseSenseDisambiguation(datasets.GeneratorBasedBuilder):
|
|
71 |
BUILDER_CONFIGS = [
|
72 |
PSDConfig(
|
73 |
name=_PSD,
|
74 |
-
version=datasets.Version("1.0.
|
75 |
description="The PiC Dataset for Phrase Sense Disambiguation at short passage level (~22 sentences)"
|
76 |
)
|
77 |
]
|
@@ -84,7 +84,7 @@ class PhraseSenseDisambiguation(datasets.GeneratorBasedBuilder):
|
|
84 |
"id": datasets.Value("string"),
|
85 |
"title": datasets.Value("string"),
|
86 |
"context": datasets.Value("string"),
|
87 |
-
"
|
88 |
"answers": datasets.Sequence(
|
89 |
{
|
90 |
"text": datasets.Value("string"),
|
@@ -131,12 +131,12 @@ class PhraseSenseDisambiguation(datasets.GeneratorBasedBuilder):
|
|
131 |
answer_starts = [answer["answer_start"] for answer in example["answers"]]
|
132 |
answers = [answer["text"] for answer in example["answers"]]
|
133 |
|
134 |
-
# Features currently used are "context", "
|
135 |
# Others are extracted here for the ease of future expansions.
|
136 |
yield key, {
|
137 |
"title": title,
|
138 |
"context": example["context"],
|
139 |
-
"
|
140 |
"id": example["id"],
|
141 |
"answers": {
|
142 |
"answer_start": answer_starts,
|
|
|
71 |
BUILDER_CONFIGS = [
|
72 |
PSDConfig(
|
73 |
name=_PSD,
|
74 |
+
version=datasets.Version("1.0.3"),
|
75 |
description="The PiC Dataset for Phrase Sense Disambiguation at short passage level (~22 sentences)"
|
76 |
)
|
77 |
]
|
|
|
84 |
"id": datasets.Value("string"),
|
85 |
"title": datasets.Value("string"),
|
86 |
"context": datasets.Value("string"),
|
87 |
+
"query": datasets.Value("string"),
|
88 |
"answers": datasets.Sequence(
|
89 |
{
|
90 |
"text": datasets.Value("string"),
|
|
|
131 |
answer_starts = [answer["answer_start"] for answer in example["answers"]]
|
132 |
answers = [answer["text"] for answer in example["answers"]]
|
133 |
|
134 |
+
# Features currently used are "context", "query", and "answers".
|
135 |
# Others are extracted here for the ease of future expansions.
|
136 |
yield key, {
|
137 |
"title": title,
|
138 |
"context": example["context"],
|
139 |
+
"query": example["question"],
|
140 |
"id": example["id"],
|
141 |
"answers": {
|
142 |
"answer_start": answer_starts,
|