wangrongsheng
commited on
Commit
•
c5f38c9
1
Parent(s):
4d2c0ed
Upload 2 files
Browse files
CMB-test/merge-answer-and-question.py
CHANGED
@@ -14,6 +14,9 @@ for i in tqdm(range(len(questions))):
|
|
14 |
if questions[i]["question_type"]=="单项选择题":
|
15 |
info = {
|
16 |
"id": str(i+1),
|
|
|
|
|
|
|
17 |
"book_content": questions[i]["question"].replace("( )。", "").replace("()。", "")+questions[i]["option"][answers[i]["answer"]]+"。"
|
18 |
}
|
19 |
results.append(info)
|
@@ -29,6 +32,9 @@ for i in tqdm(range(len(questions))):
|
|
29 |
answer_res += "。"
|
30 |
info = {
|
31 |
"id": str(i+1),
|
|
|
|
|
|
|
32 |
"book_content": questions[i]["question"].replace("( )。", "").replace("()。", "")+answer_res
|
33 |
}
|
34 |
results.append(info)
|
|
|
14 |
if questions[i]["question_type"]=="单项选择题":
|
15 |
info = {
|
16 |
"id": str(i+1),
|
17 |
+
"exam_type": answers[i]["exam_type"],
|
18 |
+
"exam_class": answers[i]["exam_class"],
|
19 |
+
"exam_subject": answers[i]["exam_subject"],
|
20 |
"book_content": questions[i]["question"].replace("( )。", "").replace("()。", "")+questions[i]["option"][answers[i]["answer"]]+"。"
|
21 |
}
|
22 |
results.append(info)
|
|
|
32 |
answer_res += "。"
|
33 |
info = {
|
34 |
"id": str(i+1),
|
35 |
+
"exam_type": answers[i]["exam_type"],
|
36 |
+
"exam_class": answers[i]["exam_class"],
|
37 |
+
"exam_subject": answers[i]["exam_subject"],
|
38 |
"book_content": questions[i]["question"].replace("( )。", "").replace("()。", "")+answer_res
|
39 |
}
|
40 |
results.append(info)
|
CMB-test/test-book.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|