candidate_process
├── check_syndromes.py
├── extract_syndromes.py
├── extract_zhengxing_list.py
├── get_candidates.py
└── match.py
diagnosis_process
├── diagnose.py
└── multi_algorithm.py
experimentation
├── generate_patient_response.py
└── patient_inquiry.py
graph_construct
├── behavior.py
├── environment.py
└── organ_construct.py
└── zhenghou.py
extract_syndromes.py: Extract syndromes from the patient's description.
extract_zhengxing_list.py: Extract the list of syndromes according to the extracted syndromes.
get_candidates.py: Get the candidate zhengxing.
match.py: Match the extracted symptoms with the KG's entities.
diagnose.py: Diagnose the patient's syndromes.
multi_algorithm.py: Multiple algorithms to diagnose the patient's syndromes.
generate_patient_response.py: simulate and enerate the patient's response.
patient_inquiry.py: Generate the patient's inquiry.
behavior.py: Construct the behavior graph.
environment.py: Construct the environment graph.
organ_construct.py: Construct the organ-zhenghou relationship.
zhenghou.py: Construct the zhenghou graph.
openai
torch
transformers
tokenizers
numpy
py2neo
-
Install the required packages.
-
Construct the knowledge graph.
python graph_construct/organ_construct.py
python graph_construct/zhenghou.py
python graph_construct/behavior.py
python graph_construct/environment.py3.Run the diagnosis process.
python diagnosis_process/diagnose.pyps: There are multiple algorithms to diagnose the patient's syndromes in the multi_algorithm.py file.
1.genetic_algorithm
2.greedy_algorithm