基于医药知识图谱的智能问答系统安装
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
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!