【对话系统】之ChatterBot

快速搭建

1
$ pip install chatterbot
1
2
3
4
5
6
7
8
9
10
11
12
from chatterbot import ChatBot

chatbot = ChatBot(
'Ron Obvious',
trainer='chatterbot.trainers.ChatterBotCorpusTrainer'
)

# Train based on the english corpus
chatbot.train("chatterbot.corpus.chinese")

# Get a response to an input statement
chatbot.get_response("你是谁")

后台算法

https://chatterbot.readthedocs.io/en/stable/faq.html#what-kinds-of-machine-learning-does-chatterbot-use

基于搜索和分类

  • 搜索
  • 分类
    • 利用朴素贝叶斯 判断是否 an input statement meets a particular set of criteria that warrant a response

      说的好模糊