Skip to content

Bolin97/DiagTCM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keeper

Directory Structure

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

candidate_process: The process of generating candidate syndromes.

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.

diagnosis_process: The process of diagnosing syndromes.

diagnose.py: Diagnose the patient's syndromes.
multi_algorithm.py: Multiple algorithms to diagnose the patient's syndromes.

experimentation: The process of generating patient response and patient inquiry.

generate_patient_response.py: simulate and enerate the patient's response.
patient_inquiry.py: Generate the patient's inquiry.

graph_construct: The process of constructing the knowledge graph.

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.

Required packages

openai
torch
transformers
tokenizers
numpy
py2neo

How to run the code

  1. Install the required packages.

  2. Construct the knowledge graph.

python graph_construct/organ_construct.py
python graph_construct/zhenghou.py
python graph_construct/behavior.py
python graph_construct/environment.py

3.Run the diagnosis process.

python diagnosis_process/diagnose.py

ps: There are multiple algorithms to diagnose the patient's syndromes in the multi_algorithm.py file.

1.genetic_algorithm
2.greedy_algorithm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages