该文介绍了英雄联盟知识图谱的构建以及搭建一个简单的基于知识图谱的英雄联盟问答系统。需要提前安装好以下依赖:
py2neo版本:py2neo-2021.2.3
neo4j版本:neo4j-4.4.5
数据来源于:英雄联盟宇宙知识图谱 - 图谱 - 开放知识图谱 ,其里面获得的数据是英雄联盟宇宙网址:《英雄联盟》宇宙 。这里我们简单的去看一下一个地址:https://yz.lol.qq.com/v1/zh_cn/faction-browse/index.json ,请求后我们会返回以下结果:
{
"id": "faction-browse",
"name": "Faction Browse",
"locale": "zh_cn",
"subheadline": "Take a look at the different worlds in Runeterra",
"factions": [
{
"type": "faction",
"name": "以绪塔尔",
"slug": "ixtal",
"image": {
"title": "ixtal-splash",
"subtitle": "",
"description": "",
"uri": "https://game.gtimg.cn/images/lol/universe/v1/assets/blt9a01601bbdff5c4a-ixtal_splash.jpg",
"encoding": "image/jpeg",
"width": null,
"height": null,
"x": null,
"y": null,
"featured-champions": []
},
"echelon": 0,
"associated-champio