| |
|
|
| GLOBAL_ONTOLOGY = { |
| "algebra": { |
| "solve_linear_system": { |
| "concepts": ["诪注专讻转", "诪注专讻转 诪砖讜讜讗讜转", "讞讬转讜讱 讬砖专讬诐", "讛砖讜讜讗转 讘讬讟讜讬讬诐", "谞注诇诪讬诐", "谞爪讬讘", "谞讞诇抓", "诪砖讜讜讗讜转", "诪砖转谞讛", "注专讱"], |
| "tag": "讛砖讜讜讗讛" |
| }, |
| "isolate_variable": { |
| "concepts": ["讘讬讚讜讚 诪砖转谞讛", "讛注讘专转 讗讙驻讬诐", "谞讞诇拽 讘诪拽讚诐", "谞讞住专", "谞讻谞住 讗讬讘专讬诐 讚讜诪讬诐", "谞驻砖讟", "讗讬讘专讬诐"], |
| "tag": "讘讬讚讜讚 诪砖转谞讛" |
| }, |
| "substitute": { |
| "concepts": ["讛爪讘讛", "谞爪讬讘 讗转 讛注专讱", "诪砖讜讜讗讛 诪拽讜专讬转", "注专讱 讛-y", "注专讱 讛-x", "诪砖转谞讛 砖谞讬"], |
| "tag": "讛爪讘讛" |
| }, |
| "general_algebra": { |
| "concepts": ["诪砖讜讜讗讛", "谞注诇诐", "驻转专讜谉", "讛住讘专", "讞讬砖讜讘", "砖诇讘"], |
| "tag": "讗诇讙讘专讛 讘住讬住讬转" |
| } |
| }, |
| "geometry": { |
| |
| } |
| } |
|
|
| def get_allowed_concepts(category: str, rule_id: str) -> list[str]: |
| """Fetch allowed concepts from ontology""" |
| domain = GLOBAL_ONTOLOGY.get(category.lower(), {}) |
| rule_data = domain.get(rule_id, domain.get("general_algebra", {"concepts": []})) |
| return rule_data.get("concepts", []) |
|
|
| def get_pedagogical_tag(category: str, rule_id: str) -> str: |
| """Fetch pedagogical tag from ontology""" |
| domain = GLOBAL_ONTOLOGY.get(category.lower(), {}) |
| rule_data = domain.get(rule_id, domain.get("general_algebra", {"tag": "讻诇诇讬"})) |
| return rule_data.get("tag", "讻诇诇讬") |
|
|