This is the code of this paper: [Task-oriented Dialogue System for Automatic Diagnosis](http://www.aclweb.org/anthology/P18-2033).
A Medical-domain Dialogue System for Diseases Identification.
Both the symptoms and the diseases are treated as slots as in the conventional dialogue systems.
There is only one agent in the dialogue system, who is in charge of both symptom selection and disease prediction.
# Data
Our dataset is available [here](https://github.com/LiuQL2/MedicalChatbot/blob/develop/acl2018-mds.zip) or can be found at the homepage of [Prof. Wei](http://www.sdspeople.fudan.edu.cn/zywei/). Please read the README.txt in the zip file and our paper for the details about our dataset.
# How to use
1. Downloading our [dataset](http://www.sdspeople.fudan.edu.cn/zywei/data/acl2018-mds.zip).
2. Putting the dataset in a directory and pointing the path of the dataset in src/dialogue_system/run/run.py
3. Using the following command to see how to run this code, i.e., each parameter in the code.
```
cd src/dialogue_system/run
python run.py --help
```
# Cite
```
@inproceedings{wei2018task,
title={Task-oriented Dialogue System for Automatic Diagnosis},
author={Liu, Qianlong and Wei, Zhongyu and Peng, Baolin and Tou, Huaixiao and Chen, Ting and Huang, Xuanjing and Wong, Kam-Fai and Dai, Xiangying},
booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
volume={2},
pages={201--207},
year={2018}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本项目是demo,可以直接使用代码注释清楚,文档教程完整。 面向任务的自动诊断对话系统是一种利用人工智能技术,特别是自然语言处理(NLP)和机器学习,来模拟医生和患者之间的对话,以便于自动进行疾病诊断的系统。这类系统通常专注于特定的任务,如症状评估、疾病筛查、开具初步诊断或建议等。以下是构建这类系统时需要考虑的关键要素: 任务定义:首先明确系统的任务范围,比如是针对常见病症的初步诊断、特定疾病的详细评估,还是仅仅提供症状与可能疾病的对应关系。 数据收集与预处理:收集大量的医疗对话数据,包括患者与医生的交流记录、症状描述、诊断结果等。对这些数据进行清洗、标注和结构化处理,以备后续的模型训练和使用。 知识库构建:构建一个包含医学知识的知识库,这可能包括疾病症状、诊断标准、治疗方案等。知识库需要结构化,便于模型查询和应用。 自然语言理解:开发或采用预训练的NLP模型来理解用户的自然语言输入,如症状描述、病史询问等。这可能涉及到文本分类、实体识别、关系提取等技术。 对话管理:设计对话管理模块来控制对话的流程,包括提问、回答、澄清、引导等。这需要模型能够理解对话的状态,并据此作出适当的响应。 诊断模型:训练一个或多个机器学习模型来根据用户的输入和知识库中的信息进行诊断。这可能涉及到分类、回归、推理等算法。
资源推荐
资源详情
资源评论
收起资源包目录
面向任务的自动诊断对话系统.zip (95个子文件)
面向任务的自动诊断对话系统
ploter.py 2KB
others
__init__.py 0B
util.py 4KB
ptb_word_lm.py 20KB
reader.py 4KB
__pycache__
reader.cpython-36.pyc 4KB
util.cpython-36.pyc 3KB
__init__.cpython-36.pyc 145B
result
checkpoint 81B
word_embedding.py 1KB
graph.pbtxt 18.38MB
events.out.tfevents.1512977904.LIUQIANLONG 10.96MB
events.out.tfevents.1512975107.LIUQIANLONG 10.96MB
model.ckpt-0.meta 5.49MB
model.ckpt-0.data-00000-of-00001 17.74MB
model.ckpt-0.index 470B
preprocess
__init__.py 0B
match_disease.py 1014B
symptom_liking.py 2KB
README.txt 641B
aligned_symptoms_extracting.py 8KB
extract_symptom.py 3KB
top_disease.py 4KB
label
__init__.py 0B
preprocess_label.py 7KB
get_slot_from_goal.py 2KB
frequency.py 6KB
statistics.py 5KB
run_pre.py 4KB
src
__init__.py 0B
dqn_gym.py 2KB
classifier
__init__.py 0B
data
stopwords.txt 20KB
self_report_as_feature
__init__.py 32B
report_classifier.py 7KB
__pycache__
corpus.cpython-36.pyc 3KB
find_dataset.py 14KB
symptom_as_feature
__init__.py 33B
symptom_classifier.py 14KB
run
__init__.py 0B
run_cla.py 3KB
dialogue_system
agent
__init__.py 139B
agent.py 14KB
agent_actor_critic_2.py 2KB
agent_dqn.py 3KB
agent_random.py 854B
agent_rule.py 5KB
agent_actor_critic.py 2KB
__init__.py 0B
dialogue_configuration.py 1KB
state_tracker
__init__.py 28B
state_tracker.py 9KB
__pycache__
__init__.cpython-36.pyc 225B
dialogue_manager
__init__.py 31B
__pycache__
__init__.cpython-36.pyc 231B
dialogue_manager.py 7KB
policy_learning
__init__.py 46B
actor_critic_4.py 9KB
actor_critic_2.py 5KB
actor_critic_3.py 5KB
dqn.py 24KB
actor_critic.py 11KB
gym_actor_critic.py 4KB
tf_gradient.py 4KB
utilities
__init__.py 0B
slot_distribution.py 4KB
draw_learning_curve.py 6KB
goal_to_slot.py 724B
goal_action_slots_dumper.py 5KB
user_simulator
__init__.py 44B
user_rule.py 513B
user.py 28KB
__pycache__
__init__.cpython-36.pyc 238B
user_rule.cpython-36.pyc 917B
model
dqn
learning_rate03
learning_rate_d4_e99_agent1_dqn1.p 5KB
learning_rate
learning_rate_d10_e999_agent1_dqn0.p 42KB
learning_rate_d10_e999_agent1_dqn1.p 42KB
learning_rate_d4_e499_agent1_dqn1.p 21KB
learning_rate_d7_e999_agent1_dqn0.p 42KB
learning_rate_d7_e999_agent1_dqn1.p 42KB
learning_rate_d7_e999_agent1_dqn0.p.png 201KB
learning_rate_d4_e999_agent1_dqn1.p.png 250KB
learning_rate_d4_e499_agent1_dqn1.p.png 260KB
learning_rate_d4_e999_agent1_dqn1.p 53KB
run
running_steward.py 14KB
__init__.py 30B
run_for_parameter.py 14KB
run.py 12KB
__pycache__
__init__.cpython-36.pyc 217B
__pycache__
__init__.cpython-36.pyc 181B
__pycache__
__init__.cpython-36.pyc 165B
branch_info.txt 184B
requirements.txt 43B
acl2018-mds.zip 64KB
README.md 1KB
共 95 条
- 1
资源评论
小码蚁.
- 粉丝: 2525
- 资源: 4090
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功