initial commit
This commit is contained in:
commit
68489d0db4
|
|
@ -0,0 +1,2 @@
|
|||
工具/临时文件/
|
||||
**/*.pdf
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"# 这里修改题目id, 可以不满6位\n",
|
||||
"index = \"10942\".zfill(6)\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"line = '\"id\": \"'+index+'\",'\n",
|
||||
"before = database[:database.index(line)]\n",
|
||||
"position = len(re.findall(r\"\\n\",before))\n",
|
||||
"os.system(r\"code -g ../题库0.3/Problems.json:\" +str(position))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"\"\"\"---设置关键字, 同一field下不同选项为or关系, 同一字典中不同字段间为and关系, 不同字典间为or关系, _not表示列表中的关键字都不含, 同一字典中的数字用来供应同一字段不同的条件之间的and---\"\"\"\n",
|
||||
"keywords_dict_table = [\n",
|
||||
" {\"tags\": [\"第三单元\"], \"content1\": [r\"[\\d]\\alpha\",\"2x\"], \"content2\": [\"sin\"], \"content3\": [\"cos\"],\"content4\": [\"cot\"], \"content5\": [\"tan\"]},\n",
|
||||
"]\n",
|
||||
"\"\"\"---关键字设置完毕---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置输出文件名---\"\"\"\n",
|
||||
"filename = \"临时文件/关键字筛选题号.txt\"\n",
|
||||
"\"\"\"---文件名设置完毕---\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def match_condition(problem,condition_dict):\n",
|
||||
" match = True\n",
|
||||
" for field1 in [c for c in condition_dict if not \"_not\" in c]:\n",
|
||||
" cond_list = condition_dict[field1]\n",
|
||||
" field = re.sub(\"\\d\",\"\",field1)\n",
|
||||
" string = str(problem[field])\n",
|
||||
" current_match = False\n",
|
||||
" for cond in cond_list:\n",
|
||||
" if len(re.findall(cond,string)) > 0:\n",
|
||||
" current_match = True\n",
|
||||
" if current_match == False:\n",
|
||||
" match = False\n",
|
||||
" for field1 in [c for c in condition_dict if \"_not\" in c]:\n",
|
||||
" cond_list = condition_dict[field1]\n",
|
||||
" field1 = field1.replace(\"_not\",\"\")\n",
|
||||
" field = re.sub(\"\\d\",\"\",field1)\n",
|
||||
" string = str(problem[field])\n",
|
||||
" current_match = True\n",
|
||||
" for cond in cond_list:\n",
|
||||
" if len(re.findall(cond,string)) > 0:\n",
|
||||
" current_match = False\n",
|
||||
" if current_match == False:\n",
|
||||
" match = False\n",
|
||||
" \n",
|
||||
" return match\n",
|
||||
"\n",
|
||||
"#读取题库json文件并转化为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"match_list = []\n",
|
||||
"for condition in keywords_dict_table:\n",
|
||||
" for id in pro_dict:\n",
|
||||
" if match_condition(pro_dict[id],condition) and not id in match_list:\n",
|
||||
" match_list.append(id)\n",
|
||||
"\n",
|
||||
"with open(filename,\"w\",encoding=\"utf8\") as f:\n",
|
||||
" f.write(\",\".join(match_list))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"#读取题库json文件并转化为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取目标数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"obj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#以下是单元题目统计\n",
|
||||
"tags_descr = [\"第一单元\",\"第二单元\",\"第三单元\",\"第四单元\",\"第五单元\",\"第六单元\",\"第七单元\",\"第八单元\",\"第九单元\",\"暂无对应\"] \n",
|
||||
"tags_dict = {}\n",
|
||||
"units_string = \"\"\n",
|
||||
"for t in tags_descr:\n",
|
||||
" tags_dict[t] = [0,\"\"]\n",
|
||||
"for p in pro_dict:\n",
|
||||
" for t in tags_descr:\n",
|
||||
" if t in pro_dict[p][\"tags\"]:\n",
|
||||
" tags_dict[t][0] += 1\n",
|
||||
" tags_dict[t][1] += p + \",\"\n",
|
||||
"#units_string是简要列表, tags_dict是详细清单\n",
|
||||
"for t in tags_descr:\n",
|
||||
" units_string += t + \": \" + str(tags_dict[t][0]) + \"\\n\" \n",
|
||||
"#单元统计完成\n",
|
||||
"\n",
|
||||
"#以下是课时题目统计\n",
|
||||
"#生成单元课时列表(Kddll)\n",
|
||||
"lessons_descr = [] \n",
|
||||
"for o in obj_dict:\n",
|
||||
" if not o[:5] in lessons_descr:\n",
|
||||
" lessons_descr.append(o[:5])\n",
|
||||
"lessons_dict = {}\n",
|
||||
"lessons_string = \"\"\n",
|
||||
"for l in lessons_descr:\n",
|
||||
" lessons_dict[l] = [0,\"\"]\n",
|
||||
"for p in pro_dict:\n",
|
||||
" for l in lessons_descr:\n",
|
||||
" for o in pro_dict[p][\"objs\"]:\n",
|
||||
" if l in o:\n",
|
||||
" lessons_dict[l][0] += 1\n",
|
||||
" lessons_dict[l][1] += p + \",\"\n",
|
||||
" break\n",
|
||||
"#lessons_string是简要列表, lessons_dict是详细清单\n",
|
||||
"for l in lessons_descr:\n",
|
||||
" lessons_string += l + \": \" + str(lessons_dict[l][0]) + \"\\n\" \n",
|
||||
"#课时统计完成\n",
|
||||
"\n",
|
||||
"#以下是目标题目统计\n",
|
||||
"objs_dict = {}\n",
|
||||
"objs_string = \"\"\n",
|
||||
"for o in obj_dict:\n",
|
||||
" objs_dict[o] = [0,\"\"]\n",
|
||||
"for p in pro_dict:\n",
|
||||
" for o in obj_dict:\n",
|
||||
" if o in pro_dict[p][\"objs\"]:\n",
|
||||
" objs_dict[o][0] += 1\n",
|
||||
" objs_dict[o][1] += p + \",\"\n",
|
||||
"# objs_string是简要列表, objs_dict是详细清单\n",
|
||||
"for o in obj_dict:\n",
|
||||
" objs_string += o + \": \" + str(objs_dict[o][0]) + \"\\n\" \n",
|
||||
"#课时统计完成\n",
|
||||
"\n",
|
||||
"#以下为清点结果输出\n",
|
||||
"with open(r\"临时文件\\单元课时目标题目数据清点结果.txt\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(\"---单元清点结果---\\n\")\n",
|
||||
" f.write(units_string)\n",
|
||||
" f.write(\"\\n---课时清点结果---\\n\")\n",
|
||||
" f.write(lessons_string)\n",
|
||||
" f.write(\"\\n---目标清点结果---\\n\")\n",
|
||||
" f.write(objs_string)\n",
|
||||
" f.write(\"\\n\"*10)\n",
|
||||
" f.write(\"---单元详细清点结果数据库---\\n\")\n",
|
||||
" f.write(json.dumps(tags_dict,indent = 4,ensure_ascii = False))\n",
|
||||
" f.write(\"\\n\"*5+\"---课时详细清点结果数据库---\\n\")\n",
|
||||
" f.write(json.dumps(lessons_dict,indent = 4,ensure_ascii = False))\n",
|
||||
" f.write(\"\\n\"*5+\"---目标详细清点结果数据库---\\n\")\n",
|
||||
" f.write(json.dumps(objs_dict,indent = 4,ensure_ascii = False))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"def form_decimals(string):\n",
|
||||
" string = re.sub(r\"[\\s]+\",r\"\\t\",string)\n",
|
||||
" numerals_list = [n for n in string.split(\"\\t\") if len(n)>0]\n",
|
||||
" for i in range(len(numerals_list)):\n",
|
||||
" numeral = numerals_list[i]\n",
|
||||
" str_numeral = \"%.3f\" %float(numeral)\n",
|
||||
" numerals_list[i] = str_numeral\n",
|
||||
" return \"\\t\".join(numerals_list)\n",
|
||||
"\n",
|
||||
"with open(\"临时文件/统计结果.txt\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" data = f.read()\n",
|
||||
"\n",
|
||||
"blocks = re.findall(r\"\\[BEGIN\\]([\\s\\S]*?)\\[END\\]\",data)\n",
|
||||
"\n",
|
||||
"results_dict = {}\n",
|
||||
"for block in blocks:\n",
|
||||
" temp_list = [l.strip() for l in block.split(\"\\n\") if l.strip() != \"\"] \n",
|
||||
" for line in temp_list:\n",
|
||||
" if line[:2] == \"##\":\n",
|
||||
" date = line[2:].strip()\n",
|
||||
" elif line[:2] == \"**\":\n",
|
||||
" current_class = line[2:].strip()\n",
|
||||
" else:\n",
|
||||
" separating_pos = re.search(\"\\s\",line).span(0)[0]\n",
|
||||
" if not line[:separating_pos].zfill(6) in results_dict:\n",
|
||||
" results_dict[line[:separating_pos].zfill(6)] = [date + \"\\t\" + current_class + \"\\t\" + form_decimals(re.sub(\"\\s+?\",\"\\t\",line[separating_pos:])).strip()]\n",
|
||||
" else:\n",
|
||||
" results_dict[line[:separating_pos].zfill(6)].append(date + \"\\t\" + current_class + \"\\t\" + form_decimals(re.sub(\"\\s+?\",\"\\t\",line[separating_pos:])).strip())\n",
|
||||
"\n",
|
||||
"output_data = \"usages\\n\"\n",
|
||||
"for id in results_dict:\n",
|
||||
" output_data += id + \"\\n\"\n",
|
||||
" output_data += \"\\n\".join(results_dict[id])\n",
|
||||
" output_data += \"\\n\\n\"\n",
|
||||
"\n",
|
||||
"with open(\"临时文件/统计测试.txt\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(output_data)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"\"\"\"---明确数据文件位置---\"\"\"\n",
|
||||
"datafile = \"临时文件/统计测试.txt\"\n",
|
||||
"# 双回车分隔,记录内单回车分隔列表,首行为字段名\n",
|
||||
"\"\"\"---文件位置结束---\"\"\"\n",
|
||||
"\n",
|
||||
"def trim(string):\n",
|
||||
" string = re.sub(r\"^[ \\t\\n]*\",\"\",string)\n",
|
||||
" string = re.sub(r\"[ \\t\\n]*$\",\"\",string)\n",
|
||||
" return string\n",
|
||||
"def FloatToInt(string):\n",
|
||||
" f = float(string)\n",
|
||||
" if abs(f-round(f))<0.01:\n",
|
||||
" f = round(f)\n",
|
||||
" return f\n",
|
||||
"\n",
|
||||
"with open(datafile,\"r\",encoding=\"utf8\") as f:\n",
|
||||
" data = f.read()\n",
|
||||
"pos = data.index(\"\\n\")\n",
|
||||
"field = data[:pos].strip()\n",
|
||||
"appending_data = data[pos:]\n",
|
||||
"\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"obj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#该字段列表可能需要更新\n",
|
||||
"fields = [\"content\",\"objs\",\"tags\",\"genre\",\"ans\",\"solution\",\"duration\",\"usages\",\"origin\",\"edit\",\"same\",\"related\",\"remark\",\"space\"]\n",
|
||||
"\n",
|
||||
"if field in fields:\n",
|
||||
" field_type = type(pro_dict[\"000001\"][field])\n",
|
||||
" datalist = [record.strip() for record in appending_data.split(\"\\n\\n\") if len(trim(record)) > 0]\n",
|
||||
" for record in datalist:\n",
|
||||
" id = re.findall(r\"^[\\d]{1,}\",record)[0]\n",
|
||||
" data = record[len(id):].strip()\n",
|
||||
" id = id.zfill(6)\n",
|
||||
" if not id in pro_dict:\n",
|
||||
" print(\"题号:\",id,\"不在数据库中.\")\n",
|
||||
" break\n",
|
||||
" \n",
|
||||
" #字符串类型字段添加数据\n",
|
||||
" elif field_type == str and data in pro_dict[id][field]:\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已有该数据:\",data)\n",
|
||||
" elif field_type == str and not data in pro_dict[id][field] and not field == \"ans\":\n",
|
||||
" origin_data = pro_dict[id][field]\n",
|
||||
" new_data = trim(origin_data + \"\\n\" + data)\n",
|
||||
" pro_dict[id][field] = new_data\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已添加数据:\",data)\n",
|
||||
" elif field_type == str and not data in pro_dict[id][field] and field == \"ans\":\n",
|
||||
" pro_dict[id][field] = data\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已修改数据:\",data)\n",
|
||||
" \n",
|
||||
" #数值类型字段添加数据\n",
|
||||
" elif (field_type == int or field_type == float) and abs(float(data) - pro_dict[id][field])<0.01:\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已有该数据:\",FloatToInt(data))\n",
|
||||
" elif (field_type == int or field_type == float) and abs(float(data) - pro_dict[id][field])>=0.01:\n",
|
||||
" pro_dict[id][field] = FloatToInt(data)\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已修改数据:\",FloatToInt(data))\n",
|
||||
" \n",
|
||||
" #列表类型字段添加数据\n",
|
||||
" elif field_type == list:\n",
|
||||
" cell_data_list = [d.strip() for d in data.split(\"\\n\")]\n",
|
||||
" for cell_data in cell_data_list:\n",
|
||||
" if cell_data in pro_dict[id][field]:\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已有该数据:\",cell_data)\n",
|
||||
" elif not field == \"objs\":\n",
|
||||
" pro_dict[id][field].append(cell_data)\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已添加数据:\",cell_data)\n",
|
||||
" else:\n",
|
||||
" if not cell_data in obj_dict and not cell_data.upper() == \"KNONE\":\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"目标编号有误:\",cell_data)\n",
|
||||
" else:\n",
|
||||
" pro_dict[id][field].append(cell_data.upper())\n",
|
||||
" print(\"题号:\",id,\", 字段:\",field,\"中已添加数据:\",cell_data.upper())\n",
|
||||
"\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(json.dumps(pro_dict,indent=4,ensure_ascii=False))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"#范围定义在使用前需要替换\n",
|
||||
"\"\"\"使用前替换范围定义\"\"\"\n",
|
||||
"obj_range = \"K0101001B:K0102010B,K0105001B\"\n",
|
||||
"\"\"\"范围定义到此结束\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# 检查某一字符串是否在由,:的表达式给出的范围内\n",
|
||||
"def within_range(string,list):\n",
|
||||
" flag = False\n",
|
||||
" for item in list:\n",
|
||||
" if string == item.strip():\n",
|
||||
" flag = True\n",
|
||||
" break\n",
|
||||
" elif \":\" in item:\n",
|
||||
" start, end = item.split(\":\")\n",
|
||||
" if start <= string <= end:\n",
|
||||
" flag = True\n",
|
||||
" break\n",
|
||||
" return flag\n",
|
||||
"\n",
|
||||
"# 读取课时目标数据库\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"obj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"# 根据范围生成若干用于检查的闭区间范围\n",
|
||||
"obj_range_list = obj_range.split(\",\")\n",
|
||||
"output_string = \"\"\n",
|
||||
"\n",
|
||||
"# 逐一选择目标, 并整合成表格的内容部分\n",
|
||||
"for obj_id in obj_dict:\n",
|
||||
" if within_range(obj_id,obj_range_list):\n",
|
||||
" output_string += obj_id + \" & \" + obj_dict[obj_id][\"content\"] + \" & \" + r\"\\\\ \\hline\" + \"\\n\"\n",
|
||||
"\n",
|
||||
"#输出到临时文件夹\n",
|
||||
"with open(r\"临时文件/课时目标提取结果.tex\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(output_string)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
\documentclass[10pt,a4paper,twoside]{article}
|
||||
\usepackage[UTF8, fontset = none, heading = true]{ctex}
|
||||
\setCJKmainfont[BoldFont=黑体,ItalicFont=楷体]{华文中宋}
|
||||
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs,dsfont,graphicx}
|
||||
\usepackage{ifthen,indentfirst,enumerate,color,lastpage}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usepackage{makecell}
|
||||
\usepackage{longtable}
|
||||
\usepackage{diagbox}
|
||||
\usepackage[top=1in, bottom=1in,left=0.8in,right=0.8in]{geometry}
|
||||
\usepackage{fancyhdr}
|
||||
\fancyhf{}
|
||||
\fancyhead[LO]{学号\blank{50} \ 姓名\blank{80}}
|
||||
\chead{\papername}
|
||||
\rhead{--\ \thepage\ of \pageref{LastPage} \ --}
|
||||
\pagestyle{fancy}
|
||||
\ctexset{section={
|
||||
name={},
|
||||
number=\chinese{section},
|
||||
}}
|
||||
\CTEXsetup[format={\bfseries\raggedright}]{section}
|
||||
\usetikzlibrary{arrows,calc,intersections,patterns,decorations.pathreplacing,3d,angles,quotes,positioning,shapes.geometric}
|
||||
|
||||
\renewcommand{\baselinestretch}{1.5}
|
||||
\newtheorem{defi}{定义~}
|
||||
\newtheorem{eg}{例~}
|
||||
\newtheorem{ex}{~}
|
||||
\newtheorem{rem}{注~}
|
||||
\newtheorem{thm}{定理~}
|
||||
\newtheorem{coro}{推论~}
|
||||
\newtheorem{axiom}{公理~}
|
||||
\newtheorem{prop}{性质~}
|
||||
\newcommand{\blank}[1]{\underline{\hbox to #1pt{}}}
|
||||
\newcommand{\bracket}[1]{(\hbox to #1pt{})}
|
||||
\newcommand{\onech}[4]{\par\begin{tabular}{p{.9\textwidth}}
|
||||
A.~#1\\
|
||||
B.~#2\\
|
||||
C.~#3\\
|
||||
D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\twoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
A.~#1& B.~#2\\
|
||||
C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\vartwoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
(1)~#1& (2)~#2\\
|
||||
(3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\fourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
A.~#1 &B.~#2& C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\varfourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
(1)~#1 &(2)~#2& (3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
|
||||
|
||||
\newcommand{\papername}{标题替换}
|
||||
|
||||
\begin{document}
|
||||
\begin{center}
|
||||
{\bf\large 高三上学期\papername}
|
||||
\end{center}
|
||||
|
||||
|
||||
\section{填空题}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
待替换1
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\section{选择题}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
待替换2
|
||||
\end{enumerate}
|
||||
|
||||
\section{解答题}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
待替换3
|
||||
\end{enumerate}
|
||||
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#修改起始id,出处,文件名\n",
|
||||
"starting_id = 11988\n",
|
||||
"origin = \"\"\n",
|
||||
"filename = \"../临时/test3.tex\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"#从enumerate环境的字符串生成题目列表\n",
|
||||
"def GenerateProblemListFromString(data):\n",
|
||||
" try:\n",
|
||||
" data = re.findall(r\"\\\\begin\\{document\\}([\\s\\S]*?)\\\\end\\{document\\}\",data)[0]\n",
|
||||
" except:\n",
|
||||
" pass\n",
|
||||
" data = re.sub(r\"\\n[\\s]*?\\%[\\s\\S]*?\\n\",\"\\n\",data)\n",
|
||||
" data = re.sub(r\"\\n{2,}\",\"\\n\",data)\n",
|
||||
" data = re.sub(r\"\\\\item\",r\"\\\\enditem\\\\item\",data)\n",
|
||||
" data = re.sub(r\"\\\\end\\{enumerate\\}\",r\"\\\\enditem\",data)\n",
|
||||
" ProblemList = [p.strip() for p in re.findall(r\"\\\\item([\\s\\S]*?)\\\\enditem\",data)]\n",
|
||||
" return ProblemList\n",
|
||||
"\n",
|
||||
"# 创建新的空题目\n",
|
||||
"def CreateEmptyProblem(problem):\n",
|
||||
" NewProblem = problem.copy()\n",
|
||||
" for field in NewProblem:\n",
|
||||
" if type(NewProblem[field]) == str:\n",
|
||||
" NewProblem[field] = \"\"\n",
|
||||
" elif type(NewProblem[field]) == list:\n",
|
||||
" NewProblem[field] = []\n",
|
||||
" elif type(NewProblem[field]) == int or type(NewProblem[field]) == float:\n",
|
||||
" NewProblem[field] = -1\n",
|
||||
" return NewProblem\n",
|
||||
"\n",
|
||||
"# 创建新题目\n",
|
||||
"def CreateNewProblem(id,content,origin,dict):\n",
|
||||
" NewProblem = CreateEmptyProblem(dict[\"000001\"])\n",
|
||||
" NewProblem[\"id\"] = str(id).zfill(6)\n",
|
||||
" NewProblem[\"content\"] = content\n",
|
||||
" NewProblem[\"origin\"] = origin\n",
|
||||
" return NewProblem\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"with open(filename,\"r\",encoding = \"utf8\") as f:\n",
|
||||
" problems_string = f.read()\n",
|
||||
"problems = GenerateProblemListFromString(problems_string)\n",
|
||||
"\n",
|
||||
"id = starting_id\n",
|
||||
"for p in problems:\n",
|
||||
" pid = str(id).zfill(6)\n",
|
||||
" NewProblem = CreateNewProblem(id = pid, content = p, origin = origin, dict = pro_dict)\n",
|
||||
" pro_dict[pid] = NewProblem\n",
|
||||
" id += 1\n",
|
||||
"\n",
|
||||
"#按id排序生成字典\n",
|
||||
"sorted_dict_id = sorted(pro_dict)\n",
|
||||
"sorted_dict = {}\n",
|
||||
"for id in sorted_dict_id:\n",
|
||||
" sorted_dict[id] = pro_dict[id]\n",
|
||||
"#将排序后的字典转为json\n",
|
||||
"new_database = json.dumps(sorted_dict,indent = 4,ensure_ascii=False)\n",
|
||||
"#写入json数据库文件\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(new_database)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# 读取题库数据并转换为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"# 读取已分类的相似文件列表\n",
|
||||
"with open(\"临时文件/相似题目.txt\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" similar_text = \"\\n\"+f.read()\n",
|
||||
"\n",
|
||||
"similar_types = re.findall(r\"\\n[\\d]\\.[\\d]{4}[\\s]*([srSRnN ])[\\s]*\\n\",similar_text)\n",
|
||||
"similar_problems = re.findall(r\"\\n([\\d]{6}) \",similar_text)\n",
|
||||
"\n",
|
||||
"if len(similar_types) * 2 == len(similar_problems):\n",
|
||||
" for i in similar_types:\n",
|
||||
" id1 = similar_problems.pop(0)\n",
|
||||
" id2 = similar_problems.pop(0)\n",
|
||||
" if i.upper() == \"S\":\n",
|
||||
" if not id2 in pro_dict[id1][\"same\"]:\n",
|
||||
" pro_dict[id1][\"same\"].append(id2)\n",
|
||||
" if not id1 in pro_dict[id2][\"same\"]:\n",
|
||||
" pro_dict[id2][\"same\"].append(id1)\n",
|
||||
" print(\"相同题目已标注:\",id1,id2)\n",
|
||||
" elif i.upper() == \"R\":\n",
|
||||
" if not id2 in pro_dict[id1][\"related\"]:\n",
|
||||
" pro_dict[id1][\"related\"].append(id2)\n",
|
||||
" if not id1 in pro_dict[id2][\"related\"]:\n",
|
||||
" pro_dict[id2][\"related\"].append(id1)\n",
|
||||
" print(\"关联题目已标注:\",id1,id2)\n",
|
||||
"\n",
|
||||
"else:\n",
|
||||
" print(\"相似程度数据:\",len(similar_types),\"个, 相似题目:\",len(similar_problems),\"题. 数据有问题, 请检查.\")\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# 将题库字典转换为json文件并保存至原位\n",
|
||||
"database = json.dumps(pro_dict,indent=4,ensure_ascii=False)\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(database)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from hashlib import new\n",
|
||||
"import os,re,difflib,Levenshtein,time,json\n",
|
||||
"\n",
|
||||
"# 重要!!! 新题目的范围\n",
|
||||
"id_new_problems = \"20000:20010\"\n",
|
||||
"threshold = 0.85\n",
|
||||
"\n",
|
||||
"#生成数码列表, 逗号分隔每个区块, 区块内部用:表示整数闭区间\n",
|
||||
"def generate_number_set(string):\n",
|
||||
" string = re.sub(r\"[\\n\\s]\",\"\",string)\n",
|
||||
" string_list = string.split(\",\")\n",
|
||||
" numbers_list = []\n",
|
||||
" for s in string_list:\n",
|
||||
" if not \":\" in s:\n",
|
||||
" numbers_list.append(s.zfill(6))\n",
|
||||
" else:\n",
|
||||
" start,end = s.split(\":\")\n",
|
||||
" for ind in range(int(start),int(end)+1):\n",
|
||||
" numbers_list.append(str(ind).zfill(6))\n",
|
||||
" return numbers_list\n",
|
||||
"\n",
|
||||
"#字符串预处理\n",
|
||||
"def pre_treating(string):\n",
|
||||
" string = re.sub(r\"[\\s\\\\\\{\\}\\$\\(\\)\\[\\]]\",\"\",string)\n",
|
||||
" string = re.sub(r\"[\\\\n\\\\t]\",\"\",string)\n",
|
||||
" string = re.sub(r\"(displaystyle)|(overrightarrow)\",\"\",string)\n",
|
||||
" string = re.sub(r\"\\\\begin\\{center\\}[\\s\\S]*?\\\\end\\{center\\}\",\"\",string)\n",
|
||||
" return string\n",
|
||||
"\n",
|
||||
"#difflab字符串比较\n",
|
||||
"def difflab_get_equal_rate(str1, str2):\n",
|
||||
" str1 = pre_treating(str1)\n",
|
||||
" str2 = pre_treating(str2)\n",
|
||||
" return difflib.SequenceMatcher(None, str1, str2).ratio()\n",
|
||||
"\n",
|
||||
"#Levenshtein jaro字符串比较\n",
|
||||
"def jaro_get_equal_rate(str1,str2):\n",
|
||||
" str1 = pre_treating(str1)\n",
|
||||
" str2 = pre_treating(str2)\n",
|
||||
" return Levenshtein.jaro(str1,str2)\n",
|
||||
"\n",
|
||||
"#Levenshtein 字符串比较\n",
|
||||
"def Lev_get_equal_rate(str1,str2):\n",
|
||||
" str1 = pre_treating(str1)\n",
|
||||
" str2 = pre_treating(str2)\n",
|
||||
" return Levenshtein.ratio(str1,str2)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#指定对比方法\n",
|
||||
"sim_test = jaro_get_equal_rate\n",
|
||||
"\n",
|
||||
"#读入题库\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#生成旧题目数据库字典与新题目数据库字典\n",
|
||||
"new_id_list = generate_number_set(id_new_problems)\n",
|
||||
"old_problems_dict = {}\n",
|
||||
"new_problems_dict = {}\n",
|
||||
"for id in pro_dict:\n",
|
||||
" if id in new_id_list:\n",
|
||||
" new_problems_dict[id] = pro_dict[id]\n",
|
||||
" else:\n",
|
||||
" old_problems_dict[id] = pro_dict[id]\n",
|
||||
"print(\"旧题目数:\",len(old_problems_dict),\", 新题目数:\",len(new_problems_dict))\n",
|
||||
"\n",
|
||||
"#记录起始时间\n",
|
||||
"start_time = time.time()\n",
|
||||
"suspect_count = 0\n",
|
||||
"remarked = 0\n",
|
||||
"\n",
|
||||
"alike_problems = \"\"\n",
|
||||
"\n",
|
||||
"#开始新题与旧题的比对\n",
|
||||
"count = 0\n",
|
||||
"print(\"开始新题与旧题的比对\")\n",
|
||||
"for id_new in new_problems_dict:\n",
|
||||
" count += 1\n",
|
||||
" if count % 50 == 0:\n",
|
||||
" print(count)\n",
|
||||
" for id_old in old_problems_dict:\n",
|
||||
" similar_rate = sim_test(new_problems_dict[id_new][\"content\"],old_problems_dict[id_old][\"content\"])\n",
|
||||
" if similar_rate > threshold or id_new in old_problems_dict[id_old][\"related\"] or id_new in old_problems_dict[id_old][\"same\"] or id_old in new_problems_dict[id_new][\"related\"] or id_old in new_problems_dict[id_new][\"same\"]:\n",
|
||||
" suspect_count += 1\n",
|
||||
" if not (id_new in old_problems_dict[id_old][\"related\"] or id_new in old_problems_dict[id_old][\"same\"] or id_old in new_problems_dict[id_new][\"related\"] or id_old in new_problems_dict[id_new][\"same\"]):\n",
|
||||
" alike_problems += (\"%.4f\" %similar_rate) + \"\\n\\n\" + id_new + \" \" + new_problems_dict[id_new][\"content\"] + \"\\n\\n\" + id_old + \" \" + old_problems_dict[id_old][\"content\"] + \"\\n\\n\"\n",
|
||||
" else:\n",
|
||||
" remarked += 1\n",
|
||||
"\n",
|
||||
"#开始新题之间的比对\n",
|
||||
"count = 0\n",
|
||||
"print(\"开始新题之间的比对\")\n",
|
||||
"while len(new_problems_dict) >= 2:\n",
|
||||
" count += 1\n",
|
||||
" if count % 50 == 0:\n",
|
||||
" print(count)\n",
|
||||
" keys = list(new_problems_dict.keys())\n",
|
||||
" current_problem = new_problems_dict.pop(keys[0])\n",
|
||||
" for id_new in new_problems_dict:\n",
|
||||
" similar_rate = sim_test(new_problems_dict[id_new][\"content\"],current_problem[\"content\"])\n",
|
||||
" if similar_rate > threshold or id_new in current_problem[\"related\"] or id_new in current_problem[\"same\"] or current_problem[\"id\"] in new_problems_dict[id_new][\"related\"] or current_problem[\"id\"] in new_problems_dict[id_new][\"same\"]:\n",
|
||||
" suspect_count += 1\n",
|
||||
" if not (id_new in current_problem[\"related\"] or id_new in current_problem[\"same\"] or current_problem[\"id\"] in new_problems_dict[id_new][\"related\"] or current_problem[\"id\"] in new_problems_dict[id_new][\"same\"]):\n",
|
||||
" alike_problems += (\"%.4f\" %similar_rate) + \"\\n\\n\" + id_new + \" \" + new_problems_dict[id_new][\"content\"] + \"\\n\\n\" + current_problem[\"id\"] + \" \" + current_problem[\"content\"] + \"\\n\\n\"\n",
|
||||
" else:\n",
|
||||
" remarked += 1\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#记录终止时间及显示结果\n",
|
||||
"end_time = time.time()\n",
|
||||
"print(\"总耗时:\",end_time-start_time,\"秒.\")\n",
|
||||
"print(\"发现相似: \",suspect_count,\", 其中已标注: \",remarked,\".\")\n",
|
||||
"\n",
|
||||
"with open(\"临时文件/相似题目.txt\",\"w\",encoding=\"utf8\") as f:\n",
|
||||
" f.write(alike_problems)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
\documentclass[10pt,a4paper,twoside]{article}
|
||||
\usepackage[UTF8, fontset = none, heading = true]{ctex}
|
||||
\setCJKmainfont[BoldFont=黑体,ItalicFont=楷体]{华文中宋}
|
||||
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs,dsfont,graphicx}
|
||||
\usepackage{ifthen,indentfirst,enumerate,color,lastpage}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usepackage{makecell}
|
||||
\usepackage{longtable}
|
||||
\usepackage{diagbox}
|
||||
\usepackage[top=1in, bottom=1in,left=0.8in,right=0.8in]{geometry}
|
||||
\usepackage{fancyhdr}
|
||||
\fancyhf{}
|
||||
\fancyhead[LO]{学号\blank{50} \ 姓名\blank{80}}
|
||||
\chead{\notesindex.\notestitle}
|
||||
\rhead{--\ \thepage\ of \pageref{LastPage} \ --}
|
||||
\pagestyle{fancy}
|
||||
\ctexset{section={
|
||||
name={},
|
||||
number=\chinese{section},
|
||||
}}
|
||||
\CTEXsetup[format={\bfseries\raggedright}]{section}
|
||||
\usetikzlibrary{arrows,calc,intersections,patterns,decorations.pathreplacing,3d,angles,quotes,positioning,shapes.geometric}
|
||||
|
||||
\renewcommand{\baselinestretch}{1.5}
|
||||
\newtheorem{defi}{定义~}
|
||||
\newtheorem{eg}{例~}
|
||||
\newtheorem{ex}{~}
|
||||
\newtheorem{rem}{注~}
|
||||
\newtheorem{thm}{定理~}
|
||||
\newtheorem{coro}{推论~}
|
||||
\newtheorem{axiom}{公理~}
|
||||
\newtheorem{prop}{性质~}
|
||||
\newcommand{\blank}[1]{\underline{\hbox to #1pt{}}}
|
||||
\newcommand{\bracket}[1]{(\hbox to #1pt{})}
|
||||
\newcommand{\onech}[4]{\par\begin{tabular}{p{.9\textwidth}}
|
||||
A.~#1\\
|
||||
B.~#2\\
|
||||
C.~#3\\
|
||||
D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\twoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
A.~#1& B.~#2\\
|
||||
C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\vartwoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
(1)~#1& (2)~#2\\
|
||||
(3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\fourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
A.~#1 &B.~#2& C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\varfourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
(1)~#1 &(2)~#2& (3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
|
||||
|
||||
% 修改标题处
|
||||
\newcommand{\notesindex}{1}
|
||||
\newcommand{\notestitle}{集合}
|
||||
|
||||
\begin{document}
|
||||
\begin{center}
|
||||
{\bf\large 第\zhnumber{\notesindex}讲 \ \notestitle}
|
||||
\end{center}
|
||||
|
||||
|
||||
\section{课前练习}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
待替换1
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\section{课后练习}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
待替换2
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json,time\n",
|
||||
"\n",
|
||||
"\"\"\"---设置模式(1为整卷统一编号, 0为每一部分从1开始编号)---\"\"\"\n",
|
||||
"enumi_mode = 0\n",
|
||||
"\"\"\"---设置模式结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置模板文件名---\"\"\"\n",
|
||||
"# template_file = \"第一轮复习讲义模板.tex\"\n",
|
||||
"template_file = \"测验周末卷模板.tex\"\n",
|
||||
"\"\"\"---设置模板文件名结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置其他预处理替换命令---\"\"\"\n",
|
||||
"#2023届第一轮讲义更换标题\n",
|
||||
"#exec_list = [(r\"\\\\newcommand{\\\\notesindex}\\{1\\}\",r\"\\\\newcommand{\\\\notesindex}{10}\"),(r\"\\\\newcommand{\\\\notestitle}{集合}\",r\"\\\\newcommand{\\\\notestitle}{测试}\")] \n",
|
||||
"#enumi_mode = 0\n",
|
||||
"\n",
|
||||
"#2023届测验卷与周末卷\n",
|
||||
"# exec_list = [(\"标题替换\",\"周末卷02\")]\n",
|
||||
"# enumi_mode = 1\n",
|
||||
"\"\"\"---其他预处理替换命令结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置目标文件名---\"\"\"\n",
|
||||
"destination_file = \"临时文件/复习讲义测试\"\n",
|
||||
"\"\"\"---设置目标文件名结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置题号数据---\"\"\"\n",
|
||||
"problems = [\"1,3,5:7\",\"30000:40000\",\"10000:10010\"]\n",
|
||||
"\"\"\"---设置题号数据结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#生成数码列表, 逗号分隔每个区块, 区块内部用:表示整数闭区间\n",
|
||||
"def generate_number_set(string):\n",
|
||||
" string = re.sub(r\"[\\n\\s]\",\"\",string)\n",
|
||||
" string_list = string.split(\",\")\n",
|
||||
" numbers_list = []\n",
|
||||
" for s in string_list:\n",
|
||||
" if not \":\" in s:\n",
|
||||
" numbers_list.append(s.zfill(6))\n",
|
||||
" else:\n",
|
||||
" start,end = s.split(\":\")\n",
|
||||
" for ind in range(int(start),int(end)+1):\n",
|
||||
" numbers_list.append(str(ind).zfill(6))\n",
|
||||
" return numbers_list\n",
|
||||
"\n",
|
||||
"#将正确率转化为含颜色代码的字符串\n",
|
||||
"def get_color(value):\n",
|
||||
" value = float(value)\n",
|
||||
" if value>=0.5:\n",
|
||||
" (r,g,b)=(1,2-2*value,0)\n",
|
||||
" else:\n",
|
||||
" (r,g,b)=(2*value,1,0)\n",
|
||||
" return \"{\" + \"%.3f\" %(r) + \",\" + \"%.3f\" %(g) + \",0}\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def color_value(matchobj):\n",
|
||||
" value = matchobj.group(1)\n",
|
||||
" return \"\\t\"+\"\\\\fcolorbox[rgb]{0,0,0}\"+ get_color(value) +\"{\" + value +\"}\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#读取题库json文件并转化为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取目标数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"obj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取系统日期\n",
|
||||
"current_time = time.localtime()\n",
|
||||
"time_string = \"_\"+str(current_time.tm_year).zfill(4)+str(current_time.tm_mon).zfill(2)+str(current_time.tm_mday).zfill(2)\n",
|
||||
"\n",
|
||||
"#生成目标文件名和目标文件目录\n",
|
||||
"teachers_latex_file = destination_file + \"_教师\" + time_string + \".tex\"\n",
|
||||
"students_latex_file = destination_file + \"_学生\" + time_string + \".tex\"\n",
|
||||
"d = re.search(\"/[^/]*$\",destination_file).span()[0]\n",
|
||||
"destination_dir = destination_file[:d]\n",
|
||||
"\n",
|
||||
"#读取模板\n",
|
||||
"with open(template_file,\"r\",encoding=\"utf8\") as f:\n",
|
||||
" latex_raw = f.read()\n",
|
||||
"#预处理\n",
|
||||
"for command in exec_list:\n",
|
||||
" latex_raw = re.sub(command[0],command[1],latex_raw)\n",
|
||||
"\n",
|
||||
"data_teachers = latex_raw\n",
|
||||
"data_students = latex_raw\n",
|
||||
"\n",
|
||||
"#计数待替换部分\n",
|
||||
"blocks_count = len(re.findall(\"待替换[\\d]\",latex_raw))\n",
|
||||
"\n",
|
||||
"if not len(problems) == blocks_count:\n",
|
||||
" print(\"题号块数与模板待替换块数不符, 请检查\")\n",
|
||||
"else:\n",
|
||||
" problems_count = 0\n",
|
||||
" for blockid in range(1,blocks_count+1):\n",
|
||||
" print(\"正在处理题块\",blockid,\".\")\n",
|
||||
" string_to_replace = \"待替换\" + str(blockid)\n",
|
||||
" teachers_string = \"\"\n",
|
||||
" students_string = \"\"\n",
|
||||
" problem_list = [id for id in generate_number_set(problems[blockid-1].strip()) if id in pro_dict]\n",
|
||||
" #生成教师题目字符串与学生题目字符串, 准备替换至latex文件\n",
|
||||
" for id in problem_list:\n",
|
||||
" problemset = pro_dict[id]\n",
|
||||
" problem = problemset[\"content\"]\n",
|
||||
" solution = (problemset[\"solution\"] if problemset[\"solution\"] != \"\" else \"暂无解答与提示\")\n",
|
||||
" answer = (problemset[\"ans\"] if problemset[\"ans\"] != \"\" else \"暂无答案\")\n",
|
||||
" usages_list = problemset[\"usages\"]\n",
|
||||
" if len(usages_list) > 0:\n",
|
||||
" usage = re.sub(\"\\\\t([\\d]\\.[\\d]{0,10})\",color_value,\"\\n\\n\".join(usages_list))\n",
|
||||
" usage = re.sub(\"[\\\\t ]([\\d]\\.[\\d]{0,10})\",color_value,usage)\n",
|
||||
" else:\n",
|
||||
" usage = \"暂无使用记录\"\n",
|
||||
" origin = (problemset[\"origin\"] if problemset[\"origin\"] != \"\" else \"出处不详\")\n",
|
||||
" objects = problemset[\"objs\"]\n",
|
||||
" if len(objects) == 0:\n",
|
||||
" objects = \"暂未关联目标\\n\\n\"\n",
|
||||
" elif \"KNONE\" in [o.upper() for o in objects]:\n",
|
||||
" objects = \"该题的考查目标不在目前的集合中\\n\\n\"\n",
|
||||
" else:\n",
|
||||
" objects_string = \"\"\n",
|
||||
" for obj in objects:\n",
|
||||
" if not obj in obj_dict:\n",
|
||||
" objects_string = \"目标\" + obj + \"有误\\n\\n\"\n",
|
||||
" break\n",
|
||||
" else:\n",
|
||||
" objects_string += obj + \"|\" + obj_dict[obj][\"content\"] + \"\\n\\n\"\n",
|
||||
" objects = objects_string\n",
|
||||
" space = (\"\" if problemset[\"space\"] == \"\" else r\"\\vspace*{\"+problemset[\"space\"]+\"}\\n\")\n",
|
||||
" tags = (\"|\".join(problemset[\"tags\"]) if len(problemset[\"origin\"])>0 else \"暂无标签\")\n",
|
||||
" raw_string = \"\\\\item \" + \"{\\\\tiny (\"+id+\")}\"+problem\n",
|
||||
" teachers_string += raw_string.replace(\"\\\\tiny\",\"\")+\"\\n\\n关联目标:\\n\\n\"+ objects + \"\\n\\n标签: \" + tags + \"\\n\\n答案: \"+answer + \"\\n\\n\" + \"解答或提示: \" + solution + \"\\n\\n使用记录:\\n\\n\"+ usage + \"\\n\" + \"\\n\\n出处: \"+origin + \"\\n\"\n",
|
||||
" students_string += raw_string + space + \"\\n\\n\"\n",
|
||||
" teachers_string = r\"\\setcounter{enumi}{\"+ str(enumi_mode * problems_count) + \"}\\n\\n\" + teachers_string\n",
|
||||
" students_string = r\"\\setcounter{enumi}{\"+ str(enumi_mode * problems_count) + \"}\\n\\n\" + students_string\n",
|
||||
" problems_count += len(problem_list)\n",
|
||||
"\n",
|
||||
" #替换源文件中的字符串\n",
|
||||
" data_teachers = data_teachers.replace(string_to_replace,teachers_string)\n",
|
||||
" data_students = data_students.replace(string_to_replace,students_string)\n",
|
||||
" print(\"题块\",blockid,\"处理完毕.\")\n",
|
||||
"\n",
|
||||
" #保存和编译latex文件\n",
|
||||
" with open(teachers_latex_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(data_teachers)\n",
|
||||
" print(\"开始编译教师版本pdf文件: \", teachers_latex_file)\n",
|
||||
" os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ teachers_latex_file)\n",
|
||||
" print(os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ teachers_latex_file))\n",
|
||||
" with open(students_latex_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(data_students)\n",
|
||||
" print(\"开始编译学生版本pdf文件: \", students_latex_file)\n",
|
||||
" os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ students_latex_file)\n",
|
||||
" print(os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ students_latex_file))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"# 读取数据库并转成题目字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#根据特征字符识别题目类型\n",
|
||||
"for p in pro_dict:\n",
|
||||
" if pro_dict[p][\"genre\"] == \"\":\n",
|
||||
" if \"bracket\" in pro_dict[p][\"content\"]:\n",
|
||||
" pro_dict[p][\"genre\"] = \"选择题\"\n",
|
||||
" elif \"blank\" in pro_dict[p][\"content\"]:\n",
|
||||
" pro_dict[p][\"genre\"] = \"填空题\"\n",
|
||||
" else:\n",
|
||||
" pro_dict[p][\"genre\"] = \"解答题\"\n",
|
||||
"\n",
|
||||
"#将修改结果写入json数据库\n",
|
||||
"database = json.dumps(pro_dict,indent = 4, ensure_ascii= False)\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(database)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"count = 0\n",
|
||||
"for id in pro_dict:\n",
|
||||
" if pro_dict[id][\"genre\"] == \"\":\n",
|
||||
" count += 1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"count"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
\documentclass[10pt,a4paper]{article}
|
||||
\usepackage[UTF8,fontset = windows,heading = true]{ctex}
|
||||
\setCJKmainfont[BoldFont=黑体,ItalicFont=楷体]{华文中宋}
|
||||
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs,dsfont,graphicx}
|
||||
\usepackage{ifthen,indentfirst,enumerate,color,titletoc}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usepackage{makecell}
|
||||
\usepackage{longtable}
|
||||
\usetikzlibrary{arrows,calc,intersections,patterns,decorations.pathreplacing,3d,angles}
|
||||
\usepackage[bf,small,indentafter,pagestyles]{titlesec}
|
||||
\usepackage[top=1in, bottom=1in,left=0.8in,right=0.8in]{geometry}
|
||||
\renewcommand{\baselinestretch}{1.65}
|
||||
\newtheorem{defi}{定义~}
|
||||
\newtheorem{eg}{例~}
|
||||
\newtheorem{ex}{~}
|
||||
\newtheorem{rem}{注~}
|
||||
\newtheorem{thm}{定理~}
|
||||
\newtheorem{coro}{推论~}
|
||||
\newtheorem{axiom}{公理~}
|
||||
\newtheorem{prop}{性质~}
|
||||
\newcommand{\blank}[1]{\underline{\hbox to #1pt{}}}
|
||||
\newcommand{\bracket}[1]{(\hbox to #1pt{})}
|
||||
\newcommand{\onech}[4]{\par\begin{tabular}{p{.9\textwidth}}
|
||||
A.~#1\\
|
||||
B.~#2\\
|
||||
C.~#3\\
|
||||
D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\twoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
A.~#1& B.~#2\\
|
||||
C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\vartwoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
(1)~#1& (2)~#2\\
|
||||
(3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\fourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
A.~#1 &B.~#2& C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\varfourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
(1)~#1 &(2)~#2& (3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\begin{document}
|
||||
|
||||
待替换
|
||||
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
\documentclass[12pt,a4paper]{article}
|
||||
\usepackage[UTF8,fontset = windows]{ctex}
|
||||
\setCJKmainfont[BoldFont=黑体,ItalicFont=楷体]{华文中宋}
|
||||
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs,dsfont,graphicx}
|
||||
\usepackage{ifthen,indentfirst,enumerate,color,titletoc}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,calc,intersections}
|
||||
\usepackage[bf,small,indentafter,pagestyles]{titlesec}
|
||||
\usepackage[top=1in, bottom=1in,left=0.8in,right=0.8in]{geometry}
|
||||
\usepackage{longtable}
|
||||
\newtheorem{defi}{定义~}
|
||||
\newtheorem{eg}{例~}
|
||||
\newtheorem{ex}{~}
|
||||
\newtheorem{rem}{注~}
|
||||
\newtheorem{thm}{定理~}
|
||||
\newtheorem{coro}{推论~}
|
||||
\newtheorem{axiom}{公理~}
|
||||
\newtheorem{prop}{性质~}
|
||||
\renewcommand{\baselinestretch}{2}
|
||||
\newcommand{\blank}[1]{\underline{\hbox to #1pt{}}}
|
||||
\newcommand{\bracket}[1]{(\hbox to #1pt{})}
|
||||
\newcommand{\onech}[4]{\par\begin{tabular}{p{.9\textwidth}}
|
||||
A.~#1\\
|
||||
B.~#2\\
|
||||
C.~#3\\
|
||||
D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\twoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
A.~#1& B.~#2\\
|
||||
C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\vartwoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
(1)~#1& (2)~#2\\
|
||||
(3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\fourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
A.~#1 &B.~#2& C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\varfourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
(1)~#1 &(2)~#2& (3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\begin{document}
|
||||
|
||||
\begin{longtable}{|p{.15\textwidth}|p{.15\textwidth}|p{.65\textwidth}|}
|
||||
\hline
|
||||
课时目标 & 对应单元目标 & 目标内容 \\ \hline
|
||||
课时目标待替换
|
||||
& & \\ \hline
|
||||
\end{longtable}
|
||||
|
||||
\newpage
|
||||
|
||||
\begin{longtable}{|p{.15\textwidth}|p{.75\textwidth}|}
|
||||
\hline
|
||||
单元目标 & 目标内容 \\ \hline
|
||||
单元目标待替换
|
||||
& \\ \hline
|
||||
\end{longtable}
|
||||
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,time,json\n",
|
||||
"\n",
|
||||
"\"\"\"\n",
|
||||
"同目录下 课时划分.tex 与 课时目标及单元目标.tex 文件不能缺失\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置文件名---\"\"\"\n",
|
||||
"#目录和文件的分隔务必用/\n",
|
||||
"lessoncut_file = \"临时文件/课时划分\" \n",
|
||||
"lessonobj_file = \"临时文件/课时目标及单元目标\" \n",
|
||||
"\"\"\"---设置文件名结束---\"\"\"\n",
|
||||
"\n",
|
||||
"#读取系统日期\n",
|
||||
"current_time = time.localtime()\n",
|
||||
"time_string = \"_\"+str(current_time.tm_year).zfill(4)+str(current_time.tm_mon).zfill(2)+str(current_time.tm_mday).zfill(2)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"lessoncut_file += time_string +\".tex\"\n",
|
||||
"lessonobj_file += time_string +\".tex\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#读取题库json文件并转化为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取目标数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"lessonobj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取课时数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/LessonsCut.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"lessoncut_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取单元目标数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/UnitObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"unitobj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#以下是课时题目统计\n",
|
||||
"#生成单元课时列表(Kddll)\n",
|
||||
"lessons_descr = [] \n",
|
||||
"for o in lessonobj_dict:\n",
|
||||
" if not o[:5] in lessons_descr:\n",
|
||||
" lessons_descr.append(o[:5])\n",
|
||||
"lessons_dict = {}\n",
|
||||
"lessons_string = \"\"\n",
|
||||
"for l in lessons_descr:\n",
|
||||
" lessons_dict[l] = [0,\"\"]\n",
|
||||
"for p in pro_dict:\n",
|
||||
" for l in lessons_descr:\n",
|
||||
" for o in pro_dict[p][\"objs\"]:\n",
|
||||
" if l in o:\n",
|
||||
" lessons_dict[l][0] += 1\n",
|
||||
" lessons_dict[l][1] += p + \",\"\n",
|
||||
" break\n",
|
||||
"#lessons_string是简要列表, lessons_dict是详细清单\n",
|
||||
"for l in lessons_descr:\n",
|
||||
" lessons_string += l + \": \" + str(lessons_dict[l][0]) + \"\\n\" \n",
|
||||
"#课时统计完成\n",
|
||||
"\n",
|
||||
"#以下是目标题目统计\n",
|
||||
"objs_dict = {}\n",
|
||||
"objs_string = \"\"\n",
|
||||
"for o in lessonobj_dict:\n",
|
||||
" objs_dict[o] = [0,\"\"]\n",
|
||||
"for p in pro_dict:\n",
|
||||
" for o in lessonobj_dict:\n",
|
||||
" if o in pro_dict[p][\"objs\"]:\n",
|
||||
" objs_dict[o][0] += 1\n",
|
||||
" objs_dict[o][1] += p + \",\"\n",
|
||||
"# objs_string是简要列表, objs_dict是详细清单\n",
|
||||
"for o in lessonobj_dict:\n",
|
||||
" objs_string += o + \": \" + str(objs_dict[o][0]) + \"\\n\" \n",
|
||||
"#课时统计完成\n",
|
||||
"\n",
|
||||
"#生成课时目标汇总的latex文件内容lessons_obj_string, 准备放到latex文件中\n",
|
||||
"lessons_obj_string = \"\"\n",
|
||||
"for obj in lessonobj_dict:\n",
|
||||
" lessons_obj_string += lessonobj_dict[obj][\"id\"] + \" & \" + lessonobj_dict[obj][\"unit_obj\"] + \" & \" + lessonobj_dict[obj][\"content\"] + r\"\\\\ \\hline\" + \"\\n\" \n",
|
||||
"\n",
|
||||
"#生成单元目标汇总的latex文件内容units_obj_string, 准备放到latex文件中\n",
|
||||
"units_obj_string = \"\"\n",
|
||||
"for obj in unitobj_dict:\n",
|
||||
" units_obj_string += unitobj_dict[obj][\"id\"] + \"&\" + unitobj_dict[obj][\"content\"] + r\"\\\\ \\hline\" + \"\\n\"\n",
|
||||
"\n",
|
||||
"#生成课时统计的latex文件内容lessons_cut_string, 准备放到latex文件中\n",
|
||||
"lessons_cut_string = \"\"\n",
|
||||
"for lesson in lessons_dict:\n",
|
||||
" unit_index = lesson[1:3]\n",
|
||||
" lesson_index = lesson[3:5]\n",
|
||||
" lessons_cut_string += r\"\\section*{第\" + unit_index + \"单元, 第\" + lesson_index +r\"课时}\"+ \"\\n\\n\"\n",
|
||||
" lessons_cut_string += r\"起始页码: \" + lessoncut_dict[lesson][\"start\"] + \"; 终止页码: \" + lessoncut_dict[lesson][\"end\"] + \".\\n\\n\"\n",
|
||||
" lessons_cut_string += r\"\\begin{itemize}\" + \"\\n\\n\"\n",
|
||||
" for o in lessonobj_dict:\n",
|
||||
" if lesson in o:\n",
|
||||
" lessons_cut_string += r\"\\item \" + o + \"|\" + lessonobj_dict[o][\"unit_obj\"] + \"|\" + lessonobj_dict[o][\"content\"] + \"\\n\\n\"\n",
|
||||
" lessons_cut_string += \"关联题目数: \" + str(objs_dict[o][0]) + \". 列表: \" + objs_dict[o][1].replace(\",\",\", \") + \"\\n\\n\"\n",
|
||||
" lessons_cut_string += r\"\\item 课时汇总\" + \"\\n\\n\" + \"本课时总题目数: \" + str(lessons_dict[lesson][0]) + \".\\n\\n\" + \"列表: \" + lessons_dict[lesson][1].replace(\",\",\", \") + \"\\n\\n\"\n",
|
||||
" lessons_cut_string += r\"\\end{itemize}\" + \"\\n\\n\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#替换单元课时目标的latex文件的内容并编译\n",
|
||||
"with open(\"课时目标及单元目标.tex\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" obj_latex_file_raw = f.read()\n",
|
||||
"obj_latex_file_new = obj_latex_file_raw.replace(\"课时目标待替换\",lessons_obj_string).replace(\"单元目标待替换\",units_obj_string)\n",
|
||||
"with open(lessonobj_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(obj_latex_file_new)\n",
|
||||
"print(\"开始编译单元与课时目标信息pdf文件:\", lessonobj_file)\n",
|
||||
"d = re.search(\"/[^/]*$\",lessonobj_file).span()[0]\n",
|
||||
"lessonobj_dir = lessonobj_file[:d]\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessonobj_dir + \" \"+ lessonobj_file)\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessonobj_dir + \" \"+ lessonobj_file)\n",
|
||||
"\n",
|
||||
"#替换课时划分的latex文件的内容并编译\n",
|
||||
"with open(\"课时划分.tex\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" lessons_cut_latex_file_raw = f.read()\n",
|
||||
"lessons_cut_latex_file_new = lessons_cut_latex_file_raw.replace(\"待替换\",lessons_cut_string)\n",
|
||||
"with open(lessoncut_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(lessons_cut_latex_file_new)\n",
|
||||
"print(\"开始编译课时划分信息pdf文件:\", lessoncut_file)\n",
|
||||
"d = re.search(\"/[^/]*$\",lessoncut_file).span()[0]\n",
|
||||
"lessoncut_dir = lessoncut_file[:d]\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessoncut_dir + \" \"+ lessoncut_file)\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessoncut_dir + \" \"+ lessoncut_file)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"开始编译教师版本pdf文件: 临时文件/教师用题目单_20220911.tex\n",
|
||||
"0\n",
|
||||
"开始编译学生版本pdf文件: 临时文件/学生用题目单_20220911.tex\n",
|
||||
"0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os,re,time,json\n",
|
||||
"\n",
|
||||
"\"\"\"\n",
|
||||
"同目录下 题目清单.tex 文件不能缺失\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置题目列表---\"\"\"\n",
|
||||
"#留空为编译全题库\n",
|
||||
"problems = r\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"\n",
|
||||
"\"\"\"---设置题目列表结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置文件名---\"\"\"\n",
|
||||
"#目录和文件的分隔务必用/\n",
|
||||
"teachers_file = \"临时文件/教师用题目单\"\n",
|
||||
"students_file = \"临时文件/学生用题目单\"\n",
|
||||
"\"\"\"---设置文件名结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#读取系统日期\n",
|
||||
"current_time = time.localtime()\n",
|
||||
"time_string = \"_\"+str(current_time.tm_year).zfill(4)+str(current_time.tm_mon).zfill(2)+str(current_time.tm_mday).zfill(2)\n",
|
||||
"\n",
|
||||
"teachers_latex_file = teachers_file + time_string + \".tex\"\n",
|
||||
"students_latex_file = students_file + time_string + \".tex\"\n",
|
||||
"\n",
|
||||
"#生成数码列表, 逗号分隔每个区块, 区块内部用:表示整数闭区间\n",
|
||||
"def generate_number_set(string,dict):\n",
|
||||
" string = re.sub(r\"[\\n\\s]\",\"\",string)\n",
|
||||
" string_list = string.split(\",\")\n",
|
||||
" numbers_list = []\n",
|
||||
" for s in string_list:\n",
|
||||
" if not \":\" in s:\n",
|
||||
" numbers_list.append(s.zfill(6))\n",
|
||||
" else:\n",
|
||||
" start,end = s.split(\":\")\n",
|
||||
" for ind in range(int(start),int(end)+1):\n",
|
||||
" numbers_list.append(str(ind).zfill(6))\n",
|
||||
" return numbers_list\n",
|
||||
"\n",
|
||||
"#将正确率转化为含颜色代码的字符串\n",
|
||||
"def get_color(value):\n",
|
||||
" value = float(value)\n",
|
||||
" if value>=0.5:\n",
|
||||
" (r,g,b)=(1,2-2*value,0)\n",
|
||||
" else:\n",
|
||||
" (r,g,b)=(2*value,1,0)\n",
|
||||
" return \"{\" + \"%.3f\" %(r) + \",\" + \"%.3f\" %(g) + \",0}\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def color_value(matchobj):\n",
|
||||
" value = matchobj.group(1)\n",
|
||||
" return \"\\t\"+\"\\\\fcolorbox[rgb]{0,0,0}\"+ get_color(value) +\"{\" + value +\"}\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#读取题库json文件并转化为字典\n",
|
||||
"with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"pro_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#读取目标数据库json并转化为字典\n",
|
||||
"with open(r\"../题库0.3/LessonObj.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" database = f.read()\n",
|
||||
"obj_dict = json.loads(database)\n",
|
||||
"\n",
|
||||
"#生成题目列表\n",
|
||||
"if problems.strip() == \"\":\n",
|
||||
" problem_list = list(pro_dict.keys())\n",
|
||||
"else:\n",
|
||||
" problem_list = [id for id in generate_number_set(problems.strip(),pro_dict) if id in pro_dict]\n",
|
||||
"\n",
|
||||
"data_teachers = \"\"\n",
|
||||
"data_students = \"\"\n",
|
||||
"id_list = \"\"\n",
|
||||
"\n",
|
||||
"#生成教师题目字符串与学生题目字符串, 准备替换至latex文件\n",
|
||||
"for id in problem_list:\n",
|
||||
" problemset = pro_dict[id]\n",
|
||||
" problem = problemset[\"content\"]\n",
|
||||
" solution = (problemset[\"solution\"] if problemset[\"solution\"] != \"\" else \"暂无解答与提示\")\n",
|
||||
" answer = (problemset[\"ans\"] if problemset[\"ans\"] != \"\" else \"暂无答案\")\n",
|
||||
" usages_list = problemset[\"usages\"]\n",
|
||||
" if len(usages_list) > 0:\n",
|
||||
" usage = re.sub(\"\\\\t([\\d]\\.[\\d]{0,10})\",color_value,\"\\n\\n\".join(usages_list))\n",
|
||||
" usage = re.sub(\"[\\\\t ]([\\d]\\.[\\d]{0,10})\",color_value,usage)\n",
|
||||
" else:\n",
|
||||
" usage = \"暂无使用记录\"\n",
|
||||
" origin = (problemset[\"origin\"] if problemset[\"origin\"] != \"\" else \"出处不详\")\n",
|
||||
" objects = problemset[\"objs\"]\n",
|
||||
" if len(objects) == 0:\n",
|
||||
" objects = \"暂未关联目标\\n\\n\"\n",
|
||||
" elif \"KNONE\" in [o.upper() for o in objects]:\n",
|
||||
" objects = \"该题的考查目标不在目前的集合中\\n\\n\"\n",
|
||||
" else:\n",
|
||||
" objects_string = \"\"\n",
|
||||
" for obj in objects:\n",
|
||||
" if not obj in obj_dict:\n",
|
||||
" objects_string = \"目标\" + obj + \"有误\\n\\n\"\n",
|
||||
" break\n",
|
||||
" else:\n",
|
||||
" objects_string += obj + \"|\" + obj_dict[obj][\"content\"] + \"\\n\\n\"\n",
|
||||
" objects = objects_string\n",
|
||||
" space = (\"\" if problemset[\"space\"] == \"\" else r\"\\vspace*{\"+problemset[\"space\"]+\"}\\n\")\n",
|
||||
" tags = (\"|\".join(problemset[\"tags\"]) if len(problemset[\"origin\"])>0 else \"暂无标签\")\n",
|
||||
" raw_string = \"\\\\item \" + \"{\\\\tiny (\"+id+\")}\"+problem\n",
|
||||
" teachers_string = raw_string.replace(\"\\\\tiny\",\"\")+\"\\n\\n关联目标:\\n\\n\"+ objects + \"\\n\\n标签: \" + tags + \"\\n\\n答案: \"+answer + \"\\n\\n\" + \"解答或提示: \" + solution + \"\\n\\n使用记录:\\n\\n\"+ usage + \"\\n\" + \"\\n\\n出处: \"+origin + \"\\n\"\n",
|
||||
" students_string = raw_string + space + \"\\n\\n\"\n",
|
||||
" data_teachers += teachers_string\n",
|
||||
" data_students += students_string\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"#替换latex文件的内容并编译\n",
|
||||
"with open(\"题目清单.tex\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" latex_raw = f.read()\n",
|
||||
"latex_teachers = latex_raw.replace(\"编译模板\",data_teachers)\n",
|
||||
"with open(teachers_latex_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(latex_teachers)\n",
|
||||
"print(\"开始编译教师版本pdf文件: \", teachers_latex_file)\n",
|
||||
"d = re.search(\"/[^/]*$\",teachers_latex_file).span()[0]\n",
|
||||
"pdf_dir = teachers_latex_file[:d]\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + pdf_dir + \" \"+ teachers_latex_file)\n",
|
||||
"print(os.system(\"xelatex -interaction=batchmode -output-directory=\" + pdf_dir + \" \"+ teachers_latex_file))\n",
|
||||
"\n",
|
||||
"latex_students = latex_raw.replace(\"编译模板\",data_students)\n",
|
||||
"with open(students_latex_file,\"w\",encoding = \"utf8\") as f:\n",
|
||||
" f.write(latex_students)\n",
|
||||
"print(\"开始编译学生版本pdf文件: \", students_latex_file)\n",
|
||||
"d = re.search(\"/[^/]*$\",students_latex_file).span()[0]\n",
|
||||
"pdf_dir = students_latex_file[:d]\n",
|
||||
"os.system(\"xelatex -interaction=batchmode -output-directory=\" + pdf_dir + \" \"+ students_latex_file)\n",
|
||||
"print(os.system(\"xelatex -interaction=batchmode -output-directory=\" + pdf_dir + \" \"+ students_latex_file))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
\documentclass[10pt,a4paper]{article}
|
||||
\usepackage[UTF8,fontset = windows]{ctex}
|
||||
\setCJKmainfont[BoldFont=黑体,ItalicFont=楷体]{华文中宋}
|
||||
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs,dsfont,graphicx}
|
||||
\usepackage{ifthen,indentfirst,enumerate,color,titletoc,xcolor}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usepackage{makecell}
|
||||
\usepackage{longtable}
|
||||
\usepackage{diagbox}
|
||||
\usetikzlibrary{arrows,calc,intersections,patterns,decorations.pathreplacing,3d,angles,quotes,positioning,shapes.geometric}
|
||||
\usepackage[top=1in, bottom=1in,left=0.8in,right=0.8in]{geometry}
|
||||
\renewcommand{\baselinestretch}{1.65}
|
||||
\newtheorem{defi}{定义~}
|
||||
\newtheorem{eg}{例~}
|
||||
\newtheorem{ex}{~}
|
||||
\newtheorem{rem}{注~}
|
||||
\newtheorem{thm}{定理~}
|
||||
\newtheorem{coro}{推论~}
|
||||
\newtheorem{axiom}{公理~}
|
||||
\newtheorem{prop}{性质~}
|
||||
\newcommand{\blank}[1]{\underline{\hbox to #1pt{}}}
|
||||
\newcommand{\bracket}[1]{(\hbox to #1pt{})}
|
||||
\newcommand{\onech}[4]{\par\begin{tabular}{p{.9\textwidth}}
|
||||
A.~#1\\
|
||||
B.~#2\\
|
||||
C.~#3\\
|
||||
D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\twoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
A.~#1& B.~#2\\
|
||||
C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\vartwoch}[4]{\par\begin{tabular}{p{.46\textwidth}p{.46\textwidth}}
|
||||
(1)~#1& (2)~#2\\
|
||||
(3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\fourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
A.~#1 &B.~#2& C.~#3& D.~#4
|
||||
\end{tabular}}
|
||||
\newcommand{\varfourch}[4]{\par\begin{tabular}{p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}p{.23\textwidth}}
|
||||
(1)~#1 &(2)~#2& (3)~#3& (4)~#4
|
||||
\end{tabular}}
|
||||
\begin{document}
|
||||
|
||||
\begin{enumerate}[1.]
|
||||
|
||||
编译模板
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
\end{document}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"1": "预备知识",
|
||||
"2": "函数",
|
||||
"3": "三角与三角函数",
|
||||
"4": "数列",
|
||||
"5": "平面向量与复数",
|
||||
"6": "立体几何",
|
||||
"7": "解析几何",
|
||||
"8": "计数原理与概率",
|
||||
"9": "统计"
|
||||
}
|
||||
|
|
@ -0,0 +1,401 @@
|
|||
{
|
||||
"D01001B": {
|
||||
"id": "D01001B",
|
||||
"content": "通过具体的例子理解集合的含义, 理解元素与集合的“属于”关系, 理解空集和全集的含义. 学会在具体情境中用列举法和描述法描述集合. 理解集合的基本关系(包含、相等、真包含)和基本运算(两个集合的交集、并集、给定集合中一个子集的补集), 学会用文氏图表达集合的基本关系和基本运算, 体会图形对理解抽象概念的作用, 能在具体情境中识别给定集合的子集, 判断并证明集合的包含关系、相等关系及真包含关系, 会求两个集合的并集与交集以及给定集合中一个子集的补集. 会逐步用集合思想观察、思考、表达和交流一些简单问题, 体会集合是刻画一类事物的语言和工具.",
|
||||
"editor": [
|
||||
"徐慧 20220415"
|
||||
]
|
||||
},
|
||||
"D01002B": {
|
||||
"id": "D01002B",
|
||||
"content": "结合集合之间的包含关系, 理解推出关系的含义以及推出关系的传递性, 能基于推出关系有理有据地判定熟悉的陈述句之间的必要条件关系、充分条件关系和充要条件关系. 能对比较熟悉的陈述句进行否定, 能正确使用反证法证明简单的数学命题. 通过对典型数学命题的梳理与学习, 理解性质定理与必要条件的关系、判定定理与充分条件的关系, 以及数学定义与充要条件的关系.",
|
||||
"editor": [
|
||||
"徐慧 20220415",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D01003B": {
|
||||
"id": "D01003B",
|
||||
"content": "回顾等式的性质, 理解不等式的含义, 通过类比等式的性质掌握不等式的性质. 知道算术平均值和几何平均值的定义, 经历平均值不等式、三角不等式和一些常用的不等式的推导过程. 在具体的数学情境中, 会用不等式的基本性质、平均值不等式、三角不等式或作差法比较大小、证明一些简单的不等式. 结合具体实例, 能用平均值不等式、三角不等式等解决简单的求最大值或最小值的问题.",
|
||||
"editor": [
|
||||
"徐慧 20220415",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D01004B": {
|
||||
"id": "D01004B",
|
||||
"content": "会用集合表示一元一次方程、一元二次方程的解集. 理解一元二次方程根与系数的关系(韦达定理), 并解决相关问题. 会求解一元一次不等式(组), 并能用集合表示一元一次不等式(组)的解集. 经历从实际情境中抽象出一元二次不等式的过程, 了解一元二次不等式的现实意义. 建立一元二次不等式与相应的一元二次方程的联系, 通过对方程判别式分类讨论的方式, 以及对因式分解后两部分符号的讨论学习一元二次不等式的求解过程. 掌握结合一元二次函数的图像求解一元二次不等式的方法, 并能用集合表示一元二次不等式的解集. 了解分式不等式, 会用一元一次不等式(组)和一元二次不等式(组)的解法解一些简单的分式不等式. 了解含绝对值的不等式, 会用绝对值的几何意义和分类讨论的思想求解一些基本的含绝对值的不等式.",
|
||||
"editor": [
|
||||
"徐慧 20220415",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D02001B": {
|
||||
"id": "D02001B",
|
||||
"content": "回顾初中学习的正整数指数幂的定义与运算性质, 在保证幂的一些运算性质成立的条件下, 拓展定义整数指数幂, 进而定义有理数指数幂、实数指数幂, 通过指数幂的推广, 感悟数学中的类比思想. 通过现实情境, 引入对数运算, 体会对数运算是指数运算的逆运算, 并能根据指数的运算性质推导对数的运算性质. 会运用对数的定义推导换底公式, 并在实际的对数运算中体会换底公式的作用.",
|
||||
"editor": [
|
||||
"伍杨超 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D02002B": {
|
||||
"id": "D02002B",
|
||||
"content": "通过具体的数学情境的实例, 结合幂、指数与对数的运算, 引入幂函数、指数函数与对数函数的概念. 借助计算器和(或)计算机等信息技术工具作出这些函数图像, 通过图像认识函数的一些基本性质, 经历用代数语言表达性质, 然后用代数方法证明性质的过程, 在过程中初步感悟用代数语言描述几何特征. 在具体的现实情境中学习用幂、指数和对数函数模型描述现实世界.",
|
||||
"editor": [
|
||||
"伍杨超 20220614"
|
||||
]
|
||||
},
|
||||
"D02003B": {
|
||||
"id": "D02003B",
|
||||
"content": "从初中学习的具体的函数: 一次函数、二次函数、反比例函数与高中学习的具体的函数: 幂函数、指数函数、对数函数中, 归纳它们的共同点, 并能在理解初中函数的定义(刻画两个变量之间的依赖关系)的基础上, 用集合语言与对应关系刻画函数, 建立完整的函数概念, 体会集合语言和对应关系在刻画函数概念中的作用. 通过对二次函数、幂函数、指数函数与对数函数的研究, 根据它们的图像特征, 概括出函数的一些常见的性质, 并能用符号语言严谨表达出这些性质: 奇偶性、单调性、最值, 体会形的直观与数的严谨, 并初步掌握研究函数的一般方法.",
|
||||
"editor": [
|
||||
"伍杨超 20220614"
|
||||
]
|
||||
},
|
||||
"D02004B": {
|
||||
"id": "D02004B",
|
||||
"content": "理解函数模型是描述客观世界中变量关系和规律的重要数学语言和工具, 并能运用函数工具解决求解方程与求解、证明不等式等数学问题, 了解函数零点存在定理与用二分法求方程近似解的思路. 能在实际情境中, 建立合适的函数模型进而解决现实领域中的问题.",
|
||||
"editor": [
|
||||
"伍杨超 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D02005X": {
|
||||
"id": "D02005X",
|
||||
"content": "通过实例分析, 经历由平均变化率到瞬时变化率的过程, 了解导数概念的实际背景, 并通过函数图像直观了解导数的几何意义, 体会极限思想. 能根据导数的定义求函数$y=c$, $y=x$, $y=x^2$, $y=x^3$, $y=1/x$, $y=x^{1/2}$的导数, 并能利用基本初等函数的导数公式和导数的四则运算及复合公式, 求简单初等函数的导数.",
|
||||
"editor": [
|
||||
"伍杨超 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D02006X": {
|
||||
"id": "D02006X",
|
||||
"content": "通过函数图像的直观, 利用导数研究函数的单调性, 极值, 最值, 从而解决具体的数学与实际问题. 感悟导数为研究函数提供了通用和便捷的手段, 比初等数学工具更强大有效.",
|
||||
"editor": [
|
||||
"伍杨超 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D03001B": {
|
||||
"id": "D03001B",
|
||||
"content": "经历从锐角、直角、钝角到推广到任意角的过程, 能进行一般的角度制与弧度制的互化, 体会弧度制的必要性, 通过数学抽象和直观想象推广角的概念及带有方向的角的度量方法;借助单位圆的直观, 掌握任意角的正弦、余弦、正切、余切的定义, 借助定义理解并会应用同角三角函数的基本关系式, 发展数学抽象和逻辑推理素养.",
|
||||
"editor": [
|
||||
"孙雷鸣 20220420",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D03002B": {
|
||||
"id": "D03002B",
|
||||
"content": "经历利用对称性得到诱导的过程, 感悟诱导公式的作用是将对任意角的研究化归到对锐角的研究, 在此基础上会用反三角符号表示锐角, 进而表示任意角, 会借助单位圆求解最简三角方程. 经历两角差的余弦公式的推导过程, 知道两角差的余弦公式的意义, 体会数形结合的思想.在得到两角差的余弦公式基础之上, 推导出一系列的三角恒等变换公式. 体会公式推导的过程, 了解其内在联系, 发展逻辑推理和数学运算等核心素养. 通过实例, 体会倍角公式变形的必要性, 会运用二倍角公式进行恒等变换推导出半角公式.",
|
||||
"editor": [
|
||||
"孙雷鸣 20220420",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D03003B": {
|
||||
"id": "D03003B",
|
||||
"content": "经历正弦定理、余弦定理的推导过程, 体会正弦定理和余弦定理的区别与联系, 能灵活运用正、余弦定理求解三角形, 能够通过解三角形解决一些现实情境中的测量问题.",
|
||||
"editor": [
|
||||
"孙雷鸣 20220420",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D03004B": {
|
||||
"id": "D03004B",
|
||||
"content": "在现实情境中, 借助单位圆理解正弦函数、余弦函数的意义与数学表达. 熟练掌握正、余弦函数的概念、图像与性质. 会利用三角函数构建数学模型, 解决实际问题, 加强三角与现实世界的密切联系. 能类比正弦函数的研究方法, 画出正切函数的图像. 掌握正切函数的性质, 会用正切函数的性质解决简单的问题.",
|
||||
"editor": [
|
||||
"孙雷鸣 20220420",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D04001X": {
|
||||
"id": "D04001X",
|
||||
"content": "通过具体生活实例, 理解等差数列的概念, 知道公差及等差中项的概念. 建立等差数列的通项公式, 在此基础上掌握等差数列的项与序数间的联系, 体会等差数列与一次函数的关系. 推导并掌握等差数列的前$n$项和公式, 理解等差数列的通项公式与前$n$项和公式间的联系.明白求和符号$\\Sigma$的意义, 并能在简单情境下使用该符号. 能在具体的问题情境中, 发现数列的等差关系, 并解决相应问题.",
|
||||
"editor": [
|
||||
"毛培菁 20220615",
|
||||
"王伟叶 20220615",
|
||||
"王伟叶 20220718"
|
||||
]
|
||||
},
|
||||
"D04002X": {
|
||||
"id": "D04002X",
|
||||
"content": "通过具体的生活中的实例, 理解等比数列的概念, 知道公比及等比中项的概念. 建立等比数列的通项公式, 掌握等比数列项与序数间的联系, 体会等比数列与指数函数的关系. 体会等差数列与等比数列间的联系. 推导并掌握等比数列的前$n$项和公式, 理解等比数列的通项公式与前$n$项和公式间的关联. 理解直观描述下数列极限的概念, 掌握$0<|q|<1$($q$为公比)的无穷等比数列的前$n$项和的极限. 能在具体的问题情境中, 发现数列的等比关系, 并解决相应问题.",
|
||||
"editor": [
|
||||
"毛培菁 20220615",
|
||||
"王伟叶 20220615"
|
||||
]
|
||||
},
|
||||
"D04003X": {
|
||||
"id": "D04003X",
|
||||
"content": "通过具体生活与数学中的情境, 了解数列的概念, 能够借助通项公式、列表等方式表示数列, 了解数列是一种特殊的函数. 了解数列的性质, 理解单调数列的定义, 能根据定义判断简单数列的单调性, 并能依据单调性求解简单数列的最大项、最小项. 结合等差数列与等比数列这两类特殊的数列, 理解数列的通项公式与递推公式是表示数列的两种方法并在一些特殊的情形下能根据递推公式求得通项公式. 能在具体的问题中发现数列的递推关系并解决相应问题.",
|
||||
"editor": [
|
||||
"毛培菁 20220615",
|
||||
"王伟叶 20220615"
|
||||
]
|
||||
},
|
||||
"D04004X": {
|
||||
"id": "D04004X",
|
||||
"content": "了解数学归纳法的原理, 掌握数学归纳法证明命题的一般步骤, 能够以“先猜想, 后证明”的方式用数学归纳法证明与自然数有关的一些简单命题.",
|
||||
"editor": [
|
||||
"毛培菁 20220615",
|
||||
"王伟叶 20220615"
|
||||
]
|
||||
},
|
||||
"D04005X": {
|
||||
"id": "D04005X",
|
||||
"content": "在具体例子中了解基于用递推公式表示的近似计算的迭代算法,知道算法的优劣取决于迭代的收敛速度;通过日常生活和数学中的实例,感受算法的作用.",
|
||||
"editor": [
|
||||
"毛培菁 20220711"
|
||||
]
|
||||
},
|
||||
"D05001B": {
|
||||
"id": "D05001B",
|
||||
"content": "通过力、速度、加速度等实际情境, 引入平面向量的概念, 经历向量的概念的抽象过程, 借助实例和平面向量的几何表示, 运用类比的方法探索实数运算与向量运算的的共性与差异, 学习平面向量的基本运算, 建立平面向量的运算结构, 理解向量运算的几何意义.",
|
||||
"editor": [
|
||||
"王慎有 20220413"
|
||||
]
|
||||
},
|
||||
"D05002B": {
|
||||
"id": "D05002B",
|
||||
"content": "通过力的分解, 引出平面向量基本定理, 建立基的概念和向量的坐标表示, 经历将向量的运算转化为向量的坐标运算的过程, 加深对平面向量代数意义的理解.",
|
||||
"editor": [
|
||||
"王慎有 20220413",
|
||||
"王伟叶 20220608"
|
||||
]
|
||||
},
|
||||
"D05003B": {
|
||||
"id": "D05003B",
|
||||
"content": "经历用向量语言、方法表述和解决现实情境、数学情境和科学情境中的一些问题的过程, 体会向量在上述过程中发挥的作用, 为后续学习奠定基础.",
|
||||
"editor": [
|
||||
"王慎有 20220413",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D05004B": {
|
||||
"id": "D05004B",
|
||||
"content": "通过方程的求解, 理解引入复数的必要性, 借助对应的数学史内容, 体会数系扩充的必要性. 类比实数的运算, 建立复数的运算体系. 通过建立复平面, 理解复数的表示和几何意义, 完善求解实系数一元二次方程的理论体系.",
|
||||
"editor": [
|
||||
"王慎有 20220413"
|
||||
]
|
||||
},
|
||||
"D05005B": {
|
||||
"id": "D05005B",
|
||||
"content": "通过具体的数学情境, 结合三角部分基础知识和复数的几何意义, 引入复数的三角形式, 了解复数的代数表示与三角形式之间的关系, 掌握三角形式下复数的乘除运算、乘方、开方运算, 理解其几何意义.",
|
||||
"editor": [
|
||||
"王慎有 20220413",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D06001B": {
|
||||
"id": "D06001B",
|
||||
"content": "以长方体等较为熟悉的几何体作为载体, 直观认识和理解空间中点、线、平面的位置关系;并且在此基础上, 抽象出空间点、线、平面的位置关系的定义, 掌握关于空间点线面位置关系的三个公理以及公理的三个推论的内容和作用;借助这些公理, 在简单的具体或抽象情境中证明共面、共线问题, 能用自然语言、图形语言及集合符号语言刻画空间图形, 表述推理论证过程;经历平面直观图的绘制, 初步感悟用直观图描述现实生活中的立体图形, 形成空间的概念.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D06002B": {
|
||||
"id": "D06002B",
|
||||
"content": "借助长方体, 引入平行公理, 能够借助平行公理, 能在简单的情形下证明空间中两条直线平行;借助长方体及空间直线与直线的位置关系, 形成异面直线的概念, 通过经历异面直线判定定理的证明过程, 掌握用反证法证明两条直线异面;经历等角定理的证明过程, 知道可以通过平移的方式, 求两条异面直线所成角的大小, 感悟异面直线所成角概念的形成, 体会空间问题转化为平面问题的思想方法. ",
|
||||
"editor": [
|
||||
"杨懿荔 20220324",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D06003B": {
|
||||
"id": "D06003B",
|
||||
"content": "以长方体为载体, 通过直观感知, 理解空间直线与平面的三种位置关系, 经历空间中直线与平面平行、直线与平面垂直的判定定理及性质定理的证明过程, 并在具体的情形中能够用定理证明简单的相关问题;通过直线与平面斜交的特殊情形, 引入直线在平面内射影的概念及直线与平面所成角的概念, 继续感悟用平面方法解决空间问题的思想, 并且能够在具体的情形下求出直线与平面所成角的大小.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324"
|
||||
]
|
||||
},
|
||||
"D06004B": {
|
||||
"id": "D06004B",
|
||||
"content": "以长方体为载体, 通过直观感知, 理解空间平面与平面的两种位置关系, 经历空间中平面与平面平行的判定定理及性质定理的证明过程, 并在具体的情形中能够用定理证明简单的相关问题;通过现实情境中的实例探索两个(半)平面所成角的大小, 形成二面角及二面角的平面角的概念, 能在简单的具体情境中利用定义计算二面角的大小;了解平面与平面垂直的概念, 经历面面垂直的判定定理与性质定理的证明过程, 能够用定理证明简单的相关命题.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D06005B": {
|
||||
"id": "D06005B",
|
||||
"content": "在实际与数学情境中,直观感知并形成两条异面直线的公垂线及距离的概念,经历异面直线公垂线段的存在性与唯一性的证明,能够在简单的情形中求两异面直线的距离.",
|
||||
"editor": [
|
||||
"毛培菁 20220712"
|
||||
]
|
||||
},
|
||||
"D06006B": {
|
||||
"id": "D06006B",
|
||||
"content": "利用实物、计算机软件等观察空间图形, 初步认识柱体、锥体、台体、球体的概念及结构特征, 知道棱柱、棱锥、棱台是特殊的多面体, 圆柱、圆锥、圆台、球是特殊的旋转体;借助祖暅原理, 经历推导柱体、锥体、台体、球体的体积计算公式的过程;知道直棱柱和圆柱、正棱锥和圆锥的表面积计算公式, 初步感悟这些公式在解决简单的实际问题中所起到的作用.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324"
|
||||
]
|
||||
},
|
||||
"D06007X": {
|
||||
"id": "D06007X",
|
||||
"content": "类比平面向量的概念与运算, 经历由平面向量推广到空间向量的过程, 了解空间向量的概运算及其法则, 并且能够对空间向量进行简单的运算.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324"
|
||||
]
|
||||
},
|
||||
"D06008X": {
|
||||
"id": "D06008X",
|
||||
"content": "回忆平面向量基本定理, 得出向量共面的充要条件, 再根据实例类比到空间中, 得到空间向量基本定理, 经历空间向量基本定理的证明过程, 体会把一个空间中的向量表示为三个不共面的向量的线性组合;以长方体及空间向量基本定理为载体, 掌握空间向量的正交分解, 在平面直角坐标系的基础上, 感悟建立空间直角坐标系的必要性;引入空间直角坐标系后, 经历刻画空间中点的位置, 探索两点间的距离公式, 类比平面直角坐标系中的向量表示, 掌握空间向量的模、加减法、数乘、数量积、夹角的坐标运算公式, 初步感悟向量是研究几何问题的有效工具.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D06009X": {
|
||||
"id": "D06009X",
|
||||
"content": "能用向量语言描述直线和平面, 理解直线的方向向量与平面的法向量的概念;借助空间向量的坐标表示, 表述空间直线与直线、直线与平面、平面与平面所成角以及其平行、垂直关系的证明;借助向量的方法解决空间中点到直线、点到平面、平行直线、直线到平面及互相平行的平面的距离问题和简单的所成角问题, 在具体情形中经历对这类数学问题和几何问题的解决过程, 提炼出问题解决的程序, 感悟向量方法在解决立体几何证明及计算问题中的作用.",
|
||||
"editor": [
|
||||
"杨懿荔 20220324",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D07001X": {
|
||||
"id": "D07001X",
|
||||
"content": "经历在平面直角坐标系中探索确定直线位置的几何要素, 理解直线的倾斜角和斜率的概念, 能对直线的倾斜角与斜率进行互化. 经历用代数方法刻画直线斜率的过程, 掌握过两点的直线斜率的计算公式. 知道一次函数的一次项系数就是其对应直线的斜率. 在整个过程中, 体会用代数语言描述几何对象及其性质的思想方法.",
|
||||
"editor": [
|
||||
"周双 20220614"
|
||||
]
|
||||
},
|
||||
"D07002X": {
|
||||
"id": "D07002X",
|
||||
"content": "能根据确定一条直线的几何要素, 掌握直线方程的几种形式(点斜式、两点式、斜截式、点法式、点向式及一般式)及其使用范围, 并能在具体的实例中求直线的方程. 通过具体实例, 知道直线的方程是一个二元一次方程, 并且任意一个二元一次方程都能表示一条直线.",
|
||||
"editor": [
|
||||
"周双 20220614"
|
||||
]
|
||||
},
|
||||
"D07003X": {
|
||||
"id": "D07003X",
|
||||
"content": "经历探究二元一次方程组的解与两条相交直线的交点坐标之间的对应关系, 能根据两条直线的方程的系数、斜率及法向量讨论两条直线的位置关系(相交、平行或重合)以及两条直线是否垂直. 能用解方程组的方法求两条直线的交点坐标. 经历将两条直线的夹角转化为对应法向量的夹角的过程, 掌握两条直线的夹角公式. 通过具体实例, 探究并求解点到直线的距离, 掌握点到直线的距离公式, 并由此推导及掌握两条平行线之间的距离公式.",
|
||||
"editor": [
|
||||
"周双 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D07004X": {
|
||||
"id": "D07004X",
|
||||
"content": "回顾直线方程的概念, 结合具体的实例, 理解曲线与其对应方程的概念, 并能在简单的情境中, 判断曲线与方程是否对应. 在平面直角坐标系中, 根据确定圆的几何要素, 探索并掌握圆的标准方程与一般方程, 能利用配方法将圆的一般方程化为标准方程. 能根据给定直线、圆的方程, 通过几何与代数两种方法判断直线与圆的位置关系、知道如何用距离与半径判断圆与圆的位置关系, 体会用代数方法研究几何问题的思想方法. 通过具体实例, 探究圆的切线方程并推广至一般情形. 会利用直线与圆的方程解决简单的平面几何问题与实际问题.",
|
||||
"editor": [
|
||||
"周双 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D07005X": {
|
||||
"id": "D07005X",
|
||||
"content": "经历从具体情境(天文学、数学史等方面)抽象出椭圆, 并借助信息技术等工具绘制出椭圆的这一过程, 掌握椭圆的定义. 能根据椭圆的定义, 推导椭圆的标准方程, 掌握两种类型的标准方程. 经历通过椭圆的标准方程研究椭圆的几何性质这一过程, 掌握椭圆的几何性质(对称性、顶点、范围、离心率), 初步领会可以用代数方法研究曲线的哪些方面. 通过具体例子, 会判断直线与椭圆的公共点个数, 从代数角度类比直线与圆的位置关系, 掌握直线与椭圆的位置关系.",
|
||||
"editor": [
|
||||
"周双 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D07006X": {
|
||||
"id": "D07006X",
|
||||
"content": "经历从具体情境(天文学、数学史等方面)抽象出双曲线, 并借助信息技术等工具绘制出双曲线的这一过程, 掌握双曲线的定义. 能根据双曲线的定义, 推导双曲线的标准方程, 掌握两种类型的标准方程. 经历通过双曲线的标准方程研究双曲线的几何性质这一过程, 掌握双曲线的几何性质(对称性、顶点、范围、渐近线、离心率), 进一步领会可以用代数方法研究曲线的哪些方面. 知道等轴双曲线的概念. 通过具体例子, 会判断直线与双曲线的公共点个数, 从形的角度掌握直线与双曲线的位置关系.",
|
||||
"editor": [
|
||||
"周双 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D07007X": {
|
||||
"id": "D07007X",
|
||||
"content": "经历从具体情境(天文学、数学史等方面)抽象出抛物线, 并借助信息技术等工具绘制出抛物线的这一过程, 掌握抛物线的定义. 能根据抛物线的定义, 推导抛物线的标准方程, 包括证明以所求方程的任意一组解为坐标的点都在该抛物线上, 掌握四种类型的标准方程. 经历通过抛物线的标准方程研究抛物线的几何性质这一过程, 掌握抛物线的几何性质(对称性、顶点、离心率), 进一步领会如何用代数方法研究曲线. 会判断直线与抛物线的公共点个数, 从形的角度掌握直线与抛物线的位置关系.",
|
||||
"editor": [
|
||||
"周双 20220614",
|
||||
"王伟叶 20220614"
|
||||
]
|
||||
},
|
||||
"D07008X": {
|
||||
"id": "D07008X",
|
||||
"content": "经历从科学情境抽象出参数方程, 了解用参数方程表示曲线与普通方程表示曲线时重点的不同, 能在熟悉的情境中进行参数方程与普通方程的互化. 通过联系复数的三角形式, 理解极坐标表示点的思想, 感悟极坐标和直角坐标的异同. 能用极坐标方程表示直线、圆、等速螺线等曲线, 体会极坐标表示曲线的优势和劣势, 并建立两者之间的联系.",
|
||||
"editor": [
|
||||
"王伟叶 20220722"
|
||||
]
|
||||
},
|
||||
"D08001B": {
|
||||
"id": "D08001B",
|
||||
"content": "通过具体的情境, 结合实例, 引入样本点和有限样本空间的概念, 理解随机事件的表达, 在用集合语言表达随机线性的基础上, 理解随机事件并、交运算, 理解互斥与对立的含义, 结合实例进行运算. 基于上述概念与运算, 结合实例引入古典概型, 理解古典概型的一般特征, 并掌握简单的随机事件概率的计算, 认识概率的性质, 掌握随机事件概率的运算法则. 通过具体实例, 引入频率及相关的概念, 体会随机事件发生的不确定性以及频率的稳定性, 从而理解频率可以作为概率的估计值. 理解随机思想.",
|
||||
"editor": [
|
||||
"蔡海鸾 20220423",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D08002B": {
|
||||
"id": "D08002B",
|
||||
"content": "结合有限样本空间, 理解两个随机事件相互独立的概念并了解其数学表达. 结合古典概型, 掌握独立事件积的概率计算方法.",
|
||||
"editor": [
|
||||
"蔡海鸾 20220423",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D08003X": {
|
||||
"id": "D08003X",
|
||||
"content": "结合具体的实例, 掌握分类加法计数原理与分步乘法计数原理, 体会分类讨论的思想方法. 通过具体实例, 引入排列组合的概念及其相关计算, 并领会计数原理在推导排列组合相关的公式上的作用. 掌握借助计算器求排列数与组合数的方法. 结合具体实例, 学习求解简单的排列问题与组合问题以及排列组合的综合问题. 在具体的情境中学习二项式定理, 掌握二项式系数的性质, 并用于解决一些简单的计数问题和求概率的问题. 发展观察能力、分析能力及归纳能力.",
|
||||
"editor": [
|
||||
"蔡海鸾 20220423",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D08004X": {
|
||||
"id": "D08004X",
|
||||
"content": "结合具体的古典概型实例, 理解条件概率的概念, 以及条件概率与独立性的关系, 掌握简单事件的条件概率的计算方法. 结合具体的古典概型实例, 掌握利用乘法公式, 全概率公式计算概率的方法, 并了解贝叶斯公式.",
|
||||
"editor": [
|
||||
"蔡海鸾 20220423"
|
||||
]
|
||||
},
|
||||
"D08005X": {
|
||||
"id": "D08005X",
|
||||
"content": "从现实生活情境与实例出发, 体会随机变量的概念, 理解随机变量的分布及其数字特征(期望、方差). 通过具体实例, 了解贝努利实验, 掌握二项分布的数字特征(均值、方差, 了解超几何分布的概念及其均值, 并能借助这些概率分布解决简单的实际问题. 通过误差模型, 了解服从正态分布的随机变量. 结合实例, 借助频率直方图的几何直观, 了解正态分布的特征, 了解正态分布的均值、方差及其含义. 认识到随机变量能刻画随机现象、感悟随机事件与随机变量之间的关系.",
|
||||
"editor": [
|
||||
"蔡海鸾 20220423",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D09001B": {
|
||||
"id": "D09001B",
|
||||
"content": "通过具体的现实情境的实例, 了解现实生活中的很多实际问题可以转化为统计问题, 并结合具体问题进行描述性说明, 了解数据的随机性, 了解总体、样本、样本量的含义, 会计算样本均值和样本方差, 并利用数字特征进行简单的数据分析, 了解样本与总体的关系.",
|
||||
"editor": [
|
||||
"余利成 20220420",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D09002B": {
|
||||
"id": "D09002B",
|
||||
"content": "通过具体的不同现实情境的实例, 认识各种各样的数据, 能根据收集数据的不同方法, 判断所收集的数据类型是观测数据还是实验数据. 通过各种具体的现实情境的实例, 引入获取数据一些基本途径, 包括: 统计报表和年鉴、社会调查、试验设计、普查和抽样、互联网等. 通过实际调查的问题, 理解数据的意义, 初步感悟数据的变异性和数据来源对形成统计结论的重要性.",
|
||||
"editor": [
|
||||
"余利成 20220420"
|
||||
]
|
||||
},
|
||||
"D09003B": {
|
||||
"id": "D09003B",
|
||||
"content": "通过具体的现实情境的实例, 感受随机数的“随机性”, 体会随机抽样的必要性和重要性, 了解简单随机抽样的含义及其解决问题的过程, 掌握两种简单随机抽样方法: 抽签法和随机数法. 通过具体的现实情境的实例, 了解分层随机抽样的特点和适用范围, 了解分层随机抽样的必要性, 掌握各层样本量比例分配的方法. 结合具体的现实情境的实例, 探索快速、有效计算分层随机抽样数据均值和方差的方法, 体会分层随机抽样法的应用和现实意义. 在简单的实际情境中, 能根据实际问题的特点, 设计恰当的抽样方法解决问题.",
|
||||
"editor": [
|
||||
"余利成 20220420"
|
||||
]
|
||||
},
|
||||
"D09004B": {
|
||||
"id": "D09004B",
|
||||
"content": "通过具体的现实情境的实例, 将未经处理的统计数据制作成频率分布表, 进而根据频率分布表制作频率分布直方图以及频率分布折线图, 会用简单的语言描述统计图表呈现的信息, 掌握通过制作统计图表来展现样本数据分布情况的方法. 能根据实际问题的特点, 选择恰当的统计图表对数据进行可视化描述, 体会合理使用统计图表的重要性. 通过具体的现实情境的实例, 制作茎叶图, 理解茎叶图中“茎”、“叶”的具体含义, 并能解读茎叶图中蕴含的数据分布信息, 体会其中的分组思想.在具体的现实情境中, 制作散点图, 并通过散点图发现数据之间的关系, 发展数据分析素养.",
|
||||
"editor": [
|
||||
"余利成 20220420"
|
||||
]
|
||||
},
|
||||
"D09005B": {
|
||||
"id": "D09005B",
|
||||
"content": "结合具体的现实情境的实例, 用样本估计总体的集中趋势参数(平均数、中位数、众数)、离散程度参数(标准差、方差、极差), 理解集中趋势参数的统计含义和离散程度参数的统计含义. 通过生活中的实例, 理解百分位数的统计含义, 掌握百分位数的计算方法, 用样本的百分位数估计总体的百分位数, 体会用统计方法解决实际问题的全过程, 体会用样本估计总体的思想. 在具体的现实情境的实例中, 初步了解统计活动的基本步骤, 结合具体问题, 经历完整的统计过程, 通过实际操作, 计算机模拟等实活动, 积累数据分析的经验. 在不断积累统计活动经验的同时, 加深理解统计的思想与方法, 体会统计思维与确定性思维的差异、归纳推断与演绎证明的差异, 发展数据分析素养.",
|
||||
"editor": [
|
||||
"余利成 20220420",
|
||||
"王伟叶 20220609"
|
||||
]
|
||||
},
|
||||
"D09006X": {
|
||||
"id": "D09006X",
|
||||
"content": "通过具体实例, 掌握处理成对数据的两种基本统计方法, 即相关分析和回归分析. 结合具体的现实情境的实例, 了解成对数据间的关系, 并会借助散点图对其进行初步的相关分析;在具体的实例中, 认识了解样本相关系数的统计含义, 体会两个变量的相关系数的特点, 结合实例, 会通过相关系数比较多组成对数据的相关性. 结合具体的现实情境的实例, 了解一元线性回归模型的含义, 了解模型参数的统计意义, 了解最小二乘原理, 掌握一元线性回归模型参数的最小二乘估计方法, 并会使用相关的统计软件, 掌握建立一元线性回归模型的一般步骤, 针对实际问题, 会用一元线性回归模型进行预测, 培养模型思想. 通过具体实例, 进一步体会相关分析和回归分析的联系与区别. 通过具体的现实情境的实例, 理解$2\\times 2$列联表的统计意义, 了解$2\\times 2$列联表独立性检验及其具体应用, 掌握运用$2\\times 2$列联表的方法解决独立性检验的简单实际问题, 培养估计思想和检验思想.",
|
||||
"editor": [
|
||||
"余利成 20220420"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue