fzkuji commited on
Commit
1cc226b
1 Parent(s): 2dc50b7

Upload 8 files

Browse files
CMB-Exam/CMB-test/CMB-test-choice-hierarchy.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "总题量": {
3
+ "总题量": 11200,
4
+ "医师考试": 2000,
5
+ "护理考试": 1600,
6
+ "药师考试": 3200,
7
+ "医技考试": 1200,
8
+ "专业知识考试": 1600,
9
+ "医学考研": 1600
10
+ },
11
+ "医师考试": {
12
+ "规培结业": 400,
13
+ "执业助理医师": 400,
14
+ "执业医师": 400,
15
+ "中级职称": 400,
16
+ "高级职称": 400
17
+ },
18
+ "护理考试": {
19
+ "护士执业资格": 400,
20
+ "护师执业资格": 400,
21
+ "主管护师": 400,
22
+ "高级护师": 400
23
+ },
24
+ "药师考试": {
25
+ "执业西药师": 400,
26
+ "执业中药师": 400,
27
+ "初级药士": 400,
28
+ "初级药师": 400,
29
+ "初级中药士": 400,
30
+ "初级中药师": 400,
31
+ "主管药师": 400,
32
+ "主管中药师": 400
33
+ },
34
+ "医技考试": {
35
+ "医技士": 400,
36
+ "医技师": 400,
37
+ "主管技师": 400
38
+ },
39
+ "专业知识考试": {
40
+ "基础医学": 400,
41
+ "临床医学": 400,
42
+ "预防医学与公共卫生学": 400,
43
+ "中医学与中药学": 400
44
+ },
45
+ "医学考研": {
46
+ "护理学": 400,
47
+ "考研政治": 400,
48
+ "西医综合": 400,
49
+ "中医综合": 400
50
+ }
51
+ }
CMB-Exam/CMB-test/CMB-test-merge.json ADDED
The diff for this file is too large to render. See raw diff
 
CMB-Exam/CMB-train/CMB-train-hierarchy.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "总题量": {
3
+ "总题量": 269359,
4
+ "医师考试": 122876,
5
+ "护理考试": 15279,
6
+ "药师考试": 30074,
7
+ "医技考试": 25774,
8
+ "专业知识考试": 60631,
9
+ "医学考研": 14725
10
+ },
11
+ "医师考试": {
12
+ "规培结业": 14201,
13
+ "执业助理医师": 15006,
14
+ "执业医师": 25231,
15
+ "中级职称": 55729,
16
+ "高级职称": 12709
17
+ },
18
+ "护理考试": {
19
+ "护士执业资格": 2893,
20
+ "护师执业资格": 3813,
21
+ "主管护师": 7107,
22
+ "高级护师": 1466
23
+ },
24
+ "药师考试": {
25
+ "执业西药师": 7838,
26
+ "执业中药师": 4050,
27
+ "初级药士": 2310,
28
+ "初级药师": 3295,
29
+ "初级中药士": 3092,
30
+ "初级中药师": 3607,
31
+ "主管药师": 2993,
32
+ "主管中药师": 2889
33
+ },
34
+ "医技考试": {
35
+ "医技士": 4627,
36
+ "医技师": 5662,
37
+ "主管技师": 15485
38
+ },
39
+ "专业知识考试": {
40
+ "基础医学": 24299,
41
+ "临床医学": 18753,
42
+ "预防医学与公共卫生学": 3332,
43
+ "中医学与中药学": 14247
44
+ },
45
+ "医学考研": {
46
+ "护理学": 1604,
47
+ "考研政治": 1104,
48
+ "西医综合": 8503,
49
+ "中医综合": 3514
50
+ }
51
+ }
CMB-Exam/CMB-train/CMB-train-merge.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87f948aa24c376a718a3d419e006ec0a5fc4c55cce8c13312107d173139d1799
3
+ size 229094608
CMB-Exam/CMB-val/CMB-val-hierarchy.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "专业知识考试": {
3
+ "中医学与中药学": 10,
4
+ "临床医学": 10,
5
+ "基础医学": 10,
6
+ "预防医学与公共卫生学": 10
7
+ },
8
+ "医学考研": {
9
+ "中医综合": 10,
10
+ "护理学": 10,
11
+ "考研政治": 10,
12
+ "西医综合": 10
13
+ },
14
+ "医师考试": {
15
+ "中级职称": 10,
16
+ "执业助理": 10,
17
+ "执业医师": 10,
18
+ "规培结业": 10,
19
+ "高级职称": 10
20
+ },
21
+ "医技考试": {
22
+ "主管技师": 10,
23
+ "医技士": 10,
24
+ "医技师": 10
25
+ },
26
+ "护理考试": {
27
+ "主管护师": 10,
28
+ "护士执业资格": 10,
29
+ "护师执业资格": 10,
30
+ "高级护师": 10
31
+ },
32
+ "药师考试": {
33
+ "主管中药师": 10,
34
+ "主管药师": 10,
35
+ "初级中药士": 10,
36
+ "初级中药师": 10,
37
+ "初级药士": 10,
38
+ "初级药师": 10,
39
+ "执业中药师": 10,
40
+ "执业西药师": 10
41
+ }
42
+ }
CMB-Exam/CMB-val/CMB-val-merge.json ADDED
The diff for this file is too large to render. See raw diff
 
json_2_file_deep2_for_val_test_train.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import json
3
+
4
+ def split_json_to_folders(json_file_path):
5
+ # 打开并读取json文件
6
+ with open(json_file_path, 'r', encoding='utf-8') as f:
7
+ data = json.load(f)
8
+
9
+ # 按照exam_type和exam_class将数据进行分类
10
+ categorized_data = {}
11
+ for item in data:
12
+ exam_type = item['exam_type']
13
+ exam_class = item['exam_class']
14
+ if exam_type not in categorized_data:
15
+ categorized_data[exam_type] = {}
16
+ if exam_class not in categorized_data[exam_type]:
17
+ categorized_data[exam_type][exam_class] = []
18
+ categorized_data[exam_type][exam_class].append(item)
19
+
20
+ # 为每个类别创建目录和子目录,并在其中存储json文件
21
+ for exam_type, subjects in categorized_data.items():
22
+ for exam_class, items in subjects.items():
23
+ directory = os.path.join(os.path.dirname(json_file_path), exam_type)
24
+ os.makedirs(directory, exist_ok=True)
25
+ with open(os.path.join(directory, f'{exam_class}.json'), 'w', encoding='utf-8') as f:
26
+ json.dump(items, f, ensure_ascii=False, indent=4)
27
+
28
+ # 调用函数
29
+ split_json_to_folders('/mntcephfs/data/med/xidong/CMB_copy/data/CMB-val/CMB-val-merge.json')
json_2_file_deep3_for_zhenti.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import json
3
+
4
+ # 读取JSON文件
5
+ json_file_path = 'C:/Users/xidongw/Desktop/examatlas/CMB/CMB-test-exampaper/CMB-test-exam-merge.json'
6
+ with open(json_file_path, 'r', encoding='utf-8') as f:
7
+ data = json.load(f)
8
+
9
+ # 对数据进行分类
10
+ categories = {}
11
+ for item in data:
12
+ exam_type = item.get('exam_type', 'other')
13
+ exam_class = item.get('exam_class', 'other')
14
+ exam_subject = item.get('exam_subject', 'other')
15
+
16
+ if exam_type not in categories:
17
+ categories[exam_type] = {}
18
+ if exam_class not in categories[exam_type]:
19
+ categories[exam_type][exam_class] = {}
20
+ if exam_subject not in categories[exam_type][exam_class]:
21
+ categories[exam_type][exam_class][exam_subject] = []
22
+
23
+ categories[exam_type][exam_class][exam_subject].append(item)
24
+
25
+ # 将分类后的数据写入到相应的文件中
26
+ for exam_type, classes in categories.items():
27
+ for exam_class, subjects in classes.items():
28
+ for exam_subject, items in subjects.items():
29
+ # 确保目录存在
30
+ directory = os.path.join(os.path.dirname(json_file_path), exam_class)
31
+ os.makedirs(directory, exist_ok=True)
32
+
33
+ # 将数据写入到文件中
34
+ file_path = os.path.join(directory, exam_subject + '.json')
35
+ with open(file_path, 'w', encoding='utf-8') as f:
36
+ json.dump(items, f, ensure_ascii=False, indent=4)