Giter Site home page Giter Site logo

kgqa_hlm's Introduction

KGQA_HLM

基于知识图谱的《红楼梦》人物关系可视化及问答系统

Project Python version Issues Lisence Lisence

文件树:

  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图数据库,并配好环境(注意neo4j需要jdk8)。修改neo_db目录下的配置文件config.py,设置图数据库的账号和密码。
  • 2.切换到neo_db目录下,执行python create_graph.py 建立知识图谱
  • 3.去 这里 下载好ltp模型。ltp简介
  • 4.在KGQA目录下,修改ltp.py里的ltp模型文件的存放目录
  • 5.运行python app.py,浏览器打开localhost:5000即可查看

系统整体流程图:

流程

网站示例:
欢迎界面

欢迎界面

主界面

界面

界面

界面

界面

界面

kgqa_hlm's People

Contributors

chizhu 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.