GithubHelp home page GithubHelp logo

hhy5277 / web_kg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lixiang0/web_kg

0.0 2.0 0.0 40.3 MB

爬取百度百科中文页面,抽取三元组信息,构建中文知识图谱

Python 100.00%

web_kg's Introduction

Tips

  • 如果是项目问题,请提issue。
  • 如果涉及到不方便公开的,请发邮件。
  • ChatBot请访问链接

update 0907

  • 1.修改网页保存路径为相对路径
  • 2.删除多余的文件,只保留代码文件

开源web知识图谱项目

环境

  • python 3.6
  • requests:网络请求
  • re:url正则匹配
  • bs4:网页解析
  • pickle:进度保存
  • threading:多线程
  • neo4j:知识图谱图数据库,安装可以参考链接
  • pip install neo4j-driver:neo4j python驱动

代码目錄

  • spider/ 抓取原始网页
  • ie/ 从网页中解析正文,从正文中抽取结构化信息
  • kg/ 抽取三元組,存入neo4j数据库

代码执行顺序:

  • 1.spider目录下执行:python spider_main.py
  • 2.ie目录下执行:python extract-para.py
  • 3.ie目录下执行:python extract-table.py
  • 4.kg目录下执行:python build-triple-from-table.py
  • 5.kg目录下执行:python insert_to_neo4j.py

知识图谱效果图

web_kg's People

Contributors

lixiang0 avatar

Watchers

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