maximedb commited on
Commit
7c489e1
1 Parent(s): 14a2c5e

add domain and bucket to question

Browse files
Files changed (1) hide show
  1. mqa.py +5 -1
mqa.py CHANGED
@@ -73,6 +73,8 @@ class MQA(datasets.GeneratorBasedBuilder):
73
  "id": datasets.Value("string"),
74
  "text": datasets.Value("string"),
75
  "name": datasets.Value("string"),
 
 
76
  "answers": [{
77
  "text": datasets.Value("string"),
78
  "name": datasets.Value("string"),
@@ -87,7 +89,7 @@ class MQA(datasets.GeneratorBasedBuilder):
87
  }
88
  domain = {
89
  "domain": datasets.Value("string"),
90
- "pages": [page]
91
  }
92
  if self.config.level == "question":
93
  features = question
@@ -136,6 +138,8 @@ class MQA(datasets.GeneratorBasedBuilder):
136
  questions = [{
137
  "text": default(question, "text"),
138
  "name": default(question, "name"),
 
 
139
  "id": question["hash"],
140
  "answers": [{
141
  "text": default(answer, "text"),
 
73
  "id": datasets.Value("string"),
74
  "text": datasets.Value("string"),
75
  "name": datasets.Value("string"),
76
+ "domain": datasets.Value("string"),
77
+ "bucket": datasets.Value("string"),
78
  "answers": [{
79
  "text": datasets.Value("string"),
80
  "name": datasets.Value("string"),
 
89
  }
90
  domain = {
91
  "domain": datasets.Value("string"),
92
+ "pages": [page]
93
  }
94
  if self.config.level == "question":
95
  features = question
 
138
  questions = [{
139
  "text": default(question, "text"),
140
  "name": default(question, "name"),
141
+ "domain": page["domain"],
142
+ "bucket": page["bucket"],
143
  "id": question["hash"],
144
  "answers": [{
145
  "text": default(answer, "text"),