All Projects → Decalogue → Chat

Decalogue / Chat

Licence: mit
基于自然语言理解与机器学习的聊天机器人,支持多用户并发及自定义多轮对话

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Chat

Clause
🏇 聊天机器人,自然语言理解,语义理解
Stars: ✭ 323 (-37.4%)
Mutual labels:  chatbot, natural-language-processing, natural-language-understanding, nlu
Botlibre
An open platform for artificial intelligence, chat bots, virtual agents, social media automation, and live chat automation.
Stars: ✭ 412 (-20.16%)
Mutual labels:  chatbot, natural-language-processing, natural-language-understanding, nlu
Insuranceqa Corpus Zh
🚁 保险行业语料库,聊天机器人
Stars: ✭ 821 (+59.11%)
Mutual labels:  chatbot, question-answering, natural-language-processing, natural-language-understanding
Chatbot
Русскоязычный чатбот
Stars: ✭ 106 (-79.46%)
Mutual labels:  chatbot, question-answering, natural-language-processing, natural-language-understanding
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (-88.37%)
Mutual labels:  question-answering, natural-language-processing, natural-language-understanding
Reddit Detective
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more
Stars: ✭ 129 (-75%)
Mutual labels:  graph, database, neo4j
Botsharp
The Open Source AI Chatbot Platform Builder in 100% C# Running in .NET Core with Machine Learning algorithm.
Stars: ✭ 1,103 (+113.76%)
Mutual labels:  chatbot, natural-language-processing, nlu
Nlp.js
An NLP library for building bots, with entity extraction, sentiment analysis, automatic language identify, and so more
Stars: ✭ 4,670 (+805.04%)
Mutual labels:  chatbot, natural-language-processing, nlu
Gluon Nlp
NLP made easy
Stars: ✭ 2,344 (+354.26%)
Mutual labels:  natural-language-processing, natural-language-understanding, nlu
Botfuel Dialog
Botfuel SDK to build highly conversational chatbots
Stars: ✭ 96 (-81.4%)
Mutual labels:  chatbot, natural-language-processing, nlu
Rasa
💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Stars: ✭ 13,219 (+2461.82%)
Mutual labels:  chatbot, natural-language-processing, nlu
Neo4j
Graphs for Everyone
Stars: ✭ 9,582 (+1756.98%)
Mutual labels:  graph, database, neo4j
Tableqa
AI Tool for querying natural language on tabular data.
Stars: ✭ 109 (-78.88%)
Mutual labels:  question-answering, database, qa
Oie Resources
A curated list of Open Information Extraction (OIE) resources: papers, code, data, etc.
Stars: ✭ 283 (-45.16%)
Mutual labels:  natural-language-processing, natural-language-understanding, nlu
Articutapi
API of Articut 中文斷詞 (兼具語意詞性標記):「斷詞」又稱「分詞」,是中文資訊處理的基礎。Articut 不用機器學習,不需資料模型,只用現代白話中文語法規則,即能達到 SIGHAN 2005 F1-measure 94% 以上,Recall 96% 以上的成績。
Stars: ✭ 252 (-51.16%)
Mutual labels:  natural-language-processing, natural-language-understanding, nlu
Slacker
Slack Bot Framework
Stars: ✭ 495 (-4.07%)
Mutual labels:  chatbot, context, chat
Awesome Hungarian Nlp
A curated list of NLP resources for Hungarian
Stars: ✭ 121 (-76.55%)
Mutual labels:  natural-language-processing, natural-language-understanding, nlu
Dialogflow Ruby Client
Ruby SDK for Dialogflow
Stars: ✭ 148 (-71.32%)
Mutual labels:  natural-language-processing, natural-language-understanding, nlu
chatbot
kbqa task-oriented qa seq2seq ir neo4j jena seq2seq tf chatbot chat
Stars: ✭ 32 (-93.8%)
Mutual labels:  qa, neo4j, chatbot
Nlu sim
all kinds of baseline models for sentence similarity 句子对语义相似度模型
Stars: ✭ 286 (-44.57%)
Mutual labels:  question-answering, nlu, qa

Chat

Chatbot based on natural language understanding and machine learning.

基于自然语言理解与机器学习的聊天机器人

Documentation Status PyPI Version

chat

这就是 Chat

  • Chat 是一个基于自然语言理解与机器学习的语义理解库。
  • Chat 提供丰富的语义分析工具与语义知识图的构建工具,非常适合从0开始迅速搭建自己的聊天机器人,也能够减少工程师在实际开发当中的重复工作。
  • Chat 非常易于修改和扩展,可以方便地个性化定制。
  • Chat 支持多用户并发及自定义的多轮对话场景。

如果您有如下需求,欢迎选择 Chat:

  • 想从0开始迅速搭建自己的聊天机器人
  • 想了解自然语言处理与机器学习算法在问答中的应用
  • 想智能化生活工作,提升效率
  • 对知识图谱以及 KBQA 感兴趣,想从0开始构建自己的知识图谱

Chat适用的Python版本是:Python 3.3-3.6

Installation 安装

pip install --upgrade chat

Tutorial 快速开始

Step 1 在终端中启动数据库

(推荐)方式1:直接使用 chat/tests/nlu.db 这个已经初始化的数据库

使用方法:对于安装版的 neo4j 手选 nlu.db 所在路径进行连接;对于免安装版本的将 nlu.db 放到 neo4j/data/databases/ 目录下并修改 neo4j/conf/neo4j.conf 文件中

# The name of the database to mount
dbms.active_database=nlu.db

已经包含了3个用户及其知识库配置,具体的用户信息可直接查看数据库 User 或者 chat/tests/test_user.txt

说明:chat/tests/ 目录下的示例知识库:

chat.xls 基础问答(命令+闲聊)
chat_bank.xls 银行业务(里面有一个详细的自定义多轮对话示例以及两个单节点场景示例)
chat_hospital.xls 医院事务(业务问答)

方式2:需自定义数据库,将其密码设为'train'

若要修改密码:可在 chat/conf/self.conf 中修改 [neo4j] 选项 password)

neo4j start

Step 2 初始化语义知识库

2.1 启动语义服务器并保持 (详见 chat/tests/test_server.py,可命令行运行 python test_server.py)

启动前请将 chat/conf/self.conf 中 [path] 下的 log(问答日志) 和 do_not_know(回答不了的问题日志) 修改为自己的路径

from chat import server

server.start()

2.2 导入测试知识库(若 Step 1 中使用 chat/tests/nlu.db 则直接进入 Step 3) (详见 chat/tests/test_graph.py,可命令行运行 python test_graph.py)

from chat.graph import Database

# 初始化实例的时候若指定 userid 参数则会被导入 userid 对应用户,若不指定则导入通用用户
kb = Database(password='train')
kb.reset(filename='chat.xls')

Step 3 开始聊天

(推荐)方式1:启动语义客户端(详见 chat/tests/test_client.py,可命令行运行 python test_client.py)

可同时独立运行多个客户端,各个客户端的场景对话不会相互影响。

推荐使用已经提供的 test_client_bank.py 和 test_client_hospital.py 测试

from chat import client

# userid 和 key 可在已有的3个测试用户中选或者自己添加
client.start(userid="您的 userid", key="您的 key")

方式2:使用 chat.qa 子模块

from chat.qa import Robot
from chat.config import getConfig

robot = Robot(password=getConfig("neo4j", "password"))
result = robot.search(question="您的自定义问题", userid="您的 userid", key="您的 key")
answer = result['content']
print(answer)

Chat 的设计原则

  • 用户友好:用户的使用体验始终是我们考虑的首要和中心内容。Chat 遵循减少认知困难的最佳实践:Chat 提供一致而简洁的 API, 能够极大减少一般应用下用户的工作量,同时,Chat 提供清晰和具有实践意义的 Bug 反馈。
  • 模块性:完全独立可配置的模块可以用最少的代价自由组合在一起,您可以使用它们来构建自己的模块。
  • 易扩展性:添加新模块超级容易,只需要仿照现有的模块编写新的类或函数即可。创建新模块的便利性使得 Chat 更适合于快速开发。
  • 知识图谱:基于图数据库的知识图表达提供了更快的搜索速度与智能。

您可以在 Read the docs 中阅读官方中文文档。

如果您阅读在线中文文档时有什么问题,您可以在 Github 上下载这个项目,然后去 /docs/build/html/index.html 阅读离线中文文档。

非常感谢各位 Github 小伙伴的贡献

代码贡献

建议贡献

TimLoveFreedom 具体内容:分享支持

zheyang0715 具体内容:chat.semantic.synonym_cut 句尾标点符号过滤

zhengxijiang 具体内容:chat.server 场景并发中 robot 实例化

文档贡献

Mirza Zulfan 具体内容:设计 chat LOGO

如果想了解更多,也欢迎扫二维码加我微信分享交流。

Rain

Copyright © 2017 Decalogue. All Rights Reserved.

关于作者:Decalogue

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].