添加注释信息

This commit is contained in:
liu huanyong 2018-10-04 17:15:27 +08:00
parent acfbfbebde
commit 7e9d1186ab
3 changed files with 28 additions and 2 deletions

View File

@ -68,6 +68,9 @@ build_medicalgraph.py知识图谱入库脚本   
# 二、基于医疗知识图谱的自动问答
# 2.1 技术架构
![image](https://github.com/liuhuanyong/QABasedOnMedicalKnowledgeGraph/blob/master/img/qa_route.png)
# 2.2 脚本结构
@ -75,7 +78,7 @@ build_medicalgraph.py知识图谱入库脚本   
# zong
# 总结

23
chatbot_graph.py Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
# coding: utf-8
# File: chatbot_graph.py
# Author: lhy<lhy_in_blcu@126.com,https://huangyong.github.io>
# Date: 18-10-4
import os
from py2neo import Graph,Node
class ChatBotGraph:
def __init__(self):
self.g = Graph(
host="127.0.0.1", # neo4j 搭载服务器的ip地址ifconfig可获取到
http_port=7474, # neo4j 服务器监听的端口号
user="lhy", # 数据库user name如果没有更改过应该是neo4j
password="lhy123")
handler = ChatBotGraph()

BIN
img/qa_route.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB