Giter VIP home page Giter VIP logo

kgqa_tcm's Introduction

基于知识图谱的中药方剂可视化及问答系统

项目目录

  1. app.py是整个系统的主入口
  2. templates文件夹是HTML的页面
     |——index.html 欢迎界面
     |——search.html 搜索处方关系页面
     |——all_relation.html 所有处方关系页面
     |——KGQA.html 处方问答页面
  3. static文件夹存放css和js,是页面的样式和效果的文件
  4. raw_data文件夹是存在数据处理后的三元组文件
  5. neo_db文件夹是知识图谱构建模块
     |——config.py 配置参数
     |——create_graph.py 创建知识图谱,图数据库的建立
     |——query_graph.py 知识图谱的查询
  6. KGQA文件夹是问答系统模块
     |——ltp.py 分词、词性标注、命名实体识别
  7. spider文件夹是爬虫模块
     |——get_*.py 是之前爬取人物资料的代码,已经产生好images和json 可以不用再执行
     |——show_profile.py 是调用处方资料和图谱展示在前端的代码

部署步骤:

  • 0.安装所需的库 执行pip install -r requirement.txt
  • 1.先下载好neo4j图数据库,并配好环境。修改neo_db目录下的配置文件config.py,设置图数据库的账号和密码。
  • 2.切换到neo_db目录下,执行python create_graph.py 建立知识图谱
  • 3.在spider目录下,运行data_process.py(已处理好)
  • 4.在static目录下,运行neo2json.py(已处理好)
  • 5.去这里下载好ltp模型。ltp简介
  • 6.在KGQA目录下,修改ltp.py里的ltp模型文件的存放目录
  • 7.运行python app.py,浏览器打开localhost:5000即可查看

网站示例:

欢迎界面 image 索引界面 image 问答界面 image

参考

https://github.com/chizhu/KGQA_HLM

kgqa_tcm's People

Contributors

dreams-flying avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.