{"id":14959409,"url":"https://github.com/lixiang0/web_kg","last_synced_at":"2025-04-12T23:38:52.630Z","repository":{"id":41368146,"uuid":"117514398","full_name":"lixiang0/WEB_KG","owner":"lixiang0","description":"爬取百度百科中文页面，抽取三元组信息，构建中文知识图谱","archived":false,"fork":false,"pushed_at":"2020-07-20T14:17:47.000Z","size":43067,"stargazers_count":945,"open_issues_count":19,"forks_count":191,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-12T23:38:31.192Z","etag":null,"topics":["baidu","baike","knowledge-graph","neo4j","nlp","spider","wiki"],"latest_commit_sha":null,"homepage":"http://kg.rubenxiao.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lixiang0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-15T07:53:21.000Z","updated_at":"2025-04-02T10:13:19.000Z","dependencies_parsed_at":"2022-08-31T01:50:13.147Z","dependency_job_id":null,"html_url":"https://github.com/lixiang0/WEB_KG","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixiang0%2FWEB_KG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixiang0%2FWEB_KG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixiang0%2FWEB_KG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixiang0%2FWEB_KG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lixiang0","download_url":"https://codeload.github.com/lixiang0/WEB_KG/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baidu","baike","knowledge-graph","neo4j","nlp","spider","wiki"],"created_at":"2024-09-24T13:19:38.462Z","updated_at":"2025-04-12T23:38:52.602Z","avatar_url":"https://github.com/lixiang0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 开源web知识图谱项目\n\n- 爬取百度百科中文页面\n- 解析三元组和网页内容\n- 构建中文知识图谱\n- 构建百科bot（构建中）\n\n##### update 20200720\n\nWindows上的部署参考[如何在Windows上部署](https://github.com/lixiang0/WEB_KG/issues/20)，感谢LMY-nlp0701！\n\n##### update 20191121\n\n- 迁移代码到爬虫框架scrapy\n- 优化了抽取部分代码\n- 数据持久化迁移到mongodb\n- 修复chatbot失效问题\n- 开放neo4j后台界面，可以查看知识图谱成型效果\n\n##### Tips\n\n- 如果是项目问题，请提issue。\n- 如果涉及到不方便公开的，请发邮件。\n- ChatBot请访问[链接](http://bot.rubenxiao.com/)\n- 成型的百科知识图谱访问[链接](http://kg.rubenxiao.com/)，用户名：neo4j,密码：123。效果如下：\n![](imgs/kg6.png)\n\n### 环境\n\n- python 3.6\n- re:url正则匹配\n- scrapy:网页爬虫和网页解析\n- neo4j:知识图谱图数据库,安装可以参考[链接](http://blog.rubenxiao.com/posts/install-neo4j.html)\n- pip install neo4j-driver：neo4j python驱动\n- pip install pymongodb：mongodb的python支持\n- mongodb数据库：安装参考[链接](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/)\n\n\n### 代码执行：\n\n```\ncd WEB_KG/baike\nscrapy crawl baike\n```\n\n执行界面(按ctrl+c停止)：\n![](./imgs/kg5.png)\n\n### 知识图谱效果图\n\n![](./imgs/kg.png)\n\n### mongodb存储的网页内容\n\n![](./imgs/kg3.png)\n\n### mongodb存储的三元组\n\n![](./imgs/kg4.png)\n\n### neo4j后台界面\n\n![](./imgs/kg2.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixiang0%2Fweb_kg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flixiang0%2Fweb_kg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixiang0%2Fweb_kg/lists"}