基于医药知识图谱的智能问答系统安装

https://github.com/YeYzheng/KGQA-Based-On-medicine

1.Linux centos7 升级安装Python2.7到3.6

https://www.jianshu.com/p/1cc8f77679c8

2.python库安装

pip install django=3.1.8
pip install jieba
pip install SPARQLWrapper
pip install REfO

3.修改文件kgqa/KB_query/jena_sparql_endpoint.py

第16行 endpoint_url='http://jena所在服务器ip:3030/kgdrug/query'

4.修改文件KGQA_Based_On_medicine/settings.py

第139行 改为项目所在路径,例如:

q2s = question2sparql.Question2Sparql(['E:/github/KGQA-Based-On-medicine/kgqa/KB_query/dict/jibing_pos_name.txt',
                                       'E:/github/KGQA-Based-On-medicine/kgqa/KB_query/dict/drug_pos_name.txt',
                                       'E:/github/KGQA-Based-On-medicine/kgqa/KB_query/dict/symptom_pos.txt'])

5.运行KB_query文件夹中的query_main.py,开启命令行模式

python query_main.py

6.在项目根目录下运行manage.py

python manage.py runserver
posted @ 2021-06-03 09:33  叨叨勋  阅读(269)  评论(0编辑  收藏  举报