【小沐学NLP】Python实现聊天机器人(ChatterBot,代码示例)

38 篇文章 8 订阅
🍺NLP开发系列相关文章编写如下🍺:
1🎈【小沐学NLP】Python实现词云图🎈
2🎈【小沐学NLP】Python实现图片文字识别🎈
3🎈【小沐学NLP】Python实现中文、英文分词🎈
4🎈【小沐学NLP】Python实现聊天机器人(ELIZA))🎈
5🎈【小沐学NLP】Python实现聊天机器人(ALICE)🎈
6🎈【小沐学NLP】Python实现聊天机器人(微软Azure)🎈
7🎈【小沐学NLP】Python实现聊天机器人(微软小冰)🎈
8🎈【小沐学NLP】Python实现聊天机器人(钉钉机器人)🎈
9🎈【小沐学NLP】Python实现聊天机器人(微信机器人)🎈
10🎈【小沐学NLP】Python实现聊天机器人(Selenium、七嘴八舌)🎈
11🎈【小沐学NLP】Python实现聊天机器人(ChatterBot,代码示例)🎈
12🎈【小沐学NLP】Python实现聊天机器人(ChatterBot,集成前端页面)🎈
13🎈【小沐学NLP】Python实现聊天机器人(ChatterBot,集成web服务)🎈

1、简介

官方地址:
https://github.com/gunthercox/ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots.

在这里插入图片描述

ChatterBot是Python中基于机器学习的对话对话引擎,可以根据已知对话的集合生成响应。ChatterBot与语言无关的设计允许它被训练成说任何语言。
在这里插入图片描述

未经训练的聊天机器人实例开始时不知道如何进行通信。每次用户输入语句时,库都会保存他们输入的文本以及语句所响应的文本。随着 ChatterBot 接收到更多输入,它可以回复的响应数以及每个响应相对于输入语句的准确性也会增加。程序通过搜索与输入匹配的最接近匹配的已知语句来选择最接近的匹配响应,然后根据机器人与之通信的人员发出每个响应的频率返回对该语句最可能的响应。

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
之前chatbot基于大量规则库,不好维护。
主流架构为“NLU自然语言理解+DM对话管理+NLG自然语言生成”。
主要目标是意图识别与实体识别; NLU负责基础自然语言处理,DM负责对话状态维护、数据库查询等;NLG负责生成交互的自然语言。

An example of typical input would be something like this:

user: Good morning! How are you doing?
bot: I am doing very well, thank you for asking.
user: You're welcome.
bot: Do you like hats?

Process flow diagram:
在这里插入图片描述

2、下载和安装

在这里插入图片描述

pip install chatterbot  # 聊天机器人
pip install chatterbot-corpus  # 语料库
pip install spacy  # 自然语言处理

开始安装chatterbot1.0.5库的时候还比较顺利,最后自动安装spacy-2.1.9.tar.gz (30.7 MB)的时候总是报错。
在这里插入图片描述
于是手动安装spacy库(pip install spacy),但手动单独安装的spacy是最新的版本3.4.3。
在这里插入图片描述
在这里插入图片描述
仍然安装失败,不想折腾了,这是因为清华源的chatterbot版本太老,因此弃用之。
于是直接在github下载源码进行安装(https://github.com/gunthercox/ChatterBot)。
会发现ChatterBot的源码版本为:ChatterBot==1.1.0a7

cd C:\Users\tomcat\Desktop\ChatterBot-master
python setup.py build
python setup.py install

初步安装成功如下:
在这里插入图片描述
先运行一段代码试试:

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious')

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

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

# Get a response to an input statement
chatbot.get_response("Hello, how are you today?")

报错如下:
ModuleNotFoundError: No module named ‘spacy’
在这里插入图片描述
安装spacy库,如下:

pip install spacy

在这里插入图片描述
再运行上面chatterbot测试的代码试试。结果报错如下:
在这里插入图片描述
报错 OSError: [E941] Can’t find model ‘en’?
回答:方法如下:
这是因为自然语言学习包NLP安装的spacy包需要调用一个英语模块,但是系统中没有找到缘故。

python -m spacy download en

下载https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz
or
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz

python -m spacy download en_core_web_sm
pip install en_core_web_sm-3.2.0.tar.gz
pip install en_core_web_md-3.2.0.tar.gz
#or
pip install en_core_web_sm-2.3.1.tar.gz

在这里插入图片描述

安装完成后,在site-packages包里找到**en_core_web_sm-2.3.**1,复制改文件到项目的目录下,并更改文件名为 ‘en’。
步骤一:将如下文件夹“en_core_web_sm-2.3.1”复制到chatterbot项目文件夹中。
在这里插入图片描述
步骤二:将“en_core_web_sm-2.3.1”改名为“en”。
在这里插入图片描述
步骤三:将当前工作文件夹切换到chatterbot文件夹。然后执行测试代码如下:
在这里插入图片描述
如果能成功运行,则需要最后一步:为en_core_web_sm模块创建spacy的用户快捷模式,以管理员身份在命令行中运行:

python -m spacy link en_core_web_sm en

PS:上述指令将会在spacy/data目录下创建模型的快捷方式。第一个参数是模型名词(模型已经通过pip安装),或模型存放目录。第二个参数是你想使用的内部名词。设置–force标记将会强制覆盖已存在的连接。

3、入门示例

3.1 基本使用

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('XiaoMu')

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

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

# Get a response to an input statement
res = chatbot.get_response("Hello, how are you today?")
print(res)
res = chatbot.get_response("what is your name?")
print(res)
res = chatbot.get_response("My name is Xiao Mu.")
print(res)

在这里插入图片描述

from chatterbot import ChatBot  
from chatterbot.trainers import ChatterBotCorpusTrainer
chatbot = ChatBot("myBot")
trainer = ChatterBotCorpusTrainer(chatbot)
lineCounter = 1 
# 开始对话  
while True:  
    print(chatbot.get_response(input("(" + str(lineCounter) + ") user:")))  
    lineCounter += 1

在这里插入图片描述

3.2 训练数据

from chatterbot.trainers import ChatterBotCorpusTrainer

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

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

# Train based on english greetings corpus
trainer.train("chatterbot.corpus.english.greetings")

# Train based on the english conversations corpus
trainer.train("chatterbot.corpus.english.conversations")

在这里插入图片描述

3.3 轮询测试

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Xiao Mu')

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

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

# Train based on english greetings corpus
trainer.train("chatterbot.corpus.english.greetings")

# Train based on the english conversations corpus
trainer.train("chatterbot.corpus.english.conversations")

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

lineCounter = 1
# 开始对话
while True:
    print(chatbot.get_response(input("(" + str(lineCounter) + ") user:")))
    lineCounter += 1

在这里插入图片描述

3.4 使用自定义集合

from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer

chatbot = ChatBot('Xiao Mu')

conversation = [
    "Hello",
    "Hi there!",
    "How are you doing?",
    "I'm doing great.",
    "That is good to hear",
    "Thank you.",
    "You're welcome."
]

trainer = ListTrainer(chatbot)
trainer.train(conversation)

response = chatbot.get_response("Good morning!")
print(response)

在这里插入图片描述

3.5 转换单位

  • convert_units.py
from chatterbot import ChatBot

bot = ChatBot(
    'Unit Converter',
    logic_adapters=[
        'chatterbot.logic.UnitConversion',
    ]
)

questions = [
    'How many meters are in a kilometer?',
    'How many meters are in one inch?',
    '0 celsius to fahrenheit',
    'one hour is how many minutes ?'
]

# Prints the convertion given the specific question
for question in questions:
    response = bot.get_response(question)
    print(question + ' -  Response: ' + response.text)

在这里插入图片描述

3.6 默认回答

  • default_response_example.py:
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer


# Create a new instance of a ChatBot
bot = ChatBot(
    'XiaoMu Bot',
    storage_adapter='chatterbot.storage.SQLStorageAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch',
            'default_response': 'I am sorry, but I do not understand.',
            'maximum_similarity_threshold': 0.90
        }
    ]
)

trainer = ListTrainer(bot)

# Train the chat bot with a few responses
trainer.train([
    'How can I help you?',
    'I want to create a chat bot',
    'Have you read the documentation?',
    'No, I have not',
    'This should help get you started: http://chatterbot.rtfd.org/en/latest/quickstart.html'
])

# Get a response for some unexpected input
response = bot.get_response('How do I make an omelette?')
print(response)

response = bot.get_response('How can I help you?')
print(response)

response = bot.get_response('No, I have not?')
print(response)

在这里插入图片描述

3.7 数学和时间

  • math_and_time.py:
from chatterbot import ChatBot

bot = ChatBot(
    'Math & Time Bot',
    logic_adapters=[
        'chatterbot.logic.MathematicalEvaluation',
        'chatterbot.logic.TimeLogicAdapter'
    ]
)

# Print an example of getting one math based response
response = bot.get_response('What is 4 + 9?')
print(response)

response = bot.get_response('What is 11 * 12 + 4 ?')
print(response)

# Print an example of getting one time based response
response = bot.get_response('What time is it?')
print(response)

response = bot.get_response('it is time to go to sleep?')
print(response)

在这里插入图片描述

3.8 内存数据库

  • memory_sql_example.py:
from chatterbot import ChatBot

# Uncomment the following lines to enable verbose logging
import logging
logging.basicConfig(level=logging.INFO)

# Create a new instance of a ChatBot
bot = ChatBot(
    'SQLMemoryTerminal',
    storage_adapter='chatterbot.storage.SQLStorageAdapter',
    database_uri=None,
    logic_adapters=[
        'chatterbot.logic.MathematicalEvaluation',
        'chatterbot.logic.TimeLogicAdapter',
        'chatterbot.logic.BestMatch'
    ]
)

# Get a few responses from the bot
bot.get_response('What time is it?')
bot.get_response('What is 7 plus 7?')

在这里插入图片描述

3.9 具体响应示例

  • specific_response_example.py:
from chatterbot import ChatBot

# Create a new instance of a ChatBot
bot = ChatBot(
    'Exact Response Example Bot',
    storage_adapter='chatterbot.storage.SQLStorageAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch'
        },
        {
            'import_path': 'chatterbot.logic.SpecificResponseAdapter',
            'input_text': 'Help me!',
            'output_text': 'Ok, here is a link: http://chatterbot.rtfd.org'
        }
    ]
)

# Get a response given the specific input
response = bot.get_response('Help me!')
print(response)
response = bot.get_response('Hello!')
print(response)
response = bot.get_response('World!')
print(response)

在这里插入图片描述

3.10 标记数据集示例

  • tagged_dataset_example.py:
from chatterbot import ChatBot
from chatterbot.conversation import Statement


chatbot = ChatBot(
    'Example Bot',
    # This database will be a temporary in-memory database
    database_uri=None
)

label_a_statements = [
    Statement(text='Hello', tags=['label_a']),
    Statement(text='Hi', tags=['label_a']),
    Statement(text='How are you?', tags=['label_a'])
]

label_b_statements = [
    Statement(text='I like dogs.', tags=['label_b']),
    Statement(text='I like cats.', tags=['label_b']),
    Statement(text='I like animals.', tags=['label_b'])
]

chatbot.storage.create_many(
    label_a_statements + label_b_statements
)

# Return a response from "label_a_statements"
response_from_label_a = chatbot.get_response(
    'How are you?',
    additional_response_selection_parameters={
        'tags': ['label_a']
    }
)

# Return a response from "label_b_statements"
response_from_label_b = chatbot.get_response(
    'How are you?',
    additional_response_selection_parameters={
        'tags': ['label_b']
    }
)

print('Response from label_a collection:', response_from_label_a.text)
print('Response from label_b collection:', response_from_label_b.text)

在这里插入图片描述

3.11 终端示例

  • terminal_example.py:
from chatterbot import ChatBot


# Uncomment the following lines to enable verbose logging
# import logging
# logging.basicConfig(level=logging.INFO)

# Create a new instance of a ChatBot
bot = ChatBot(
    'Terminal',
    storage_adapter='chatterbot.storage.SQLStorageAdapter',
    logic_adapters=[
        'chatterbot.logic.MathematicalEvaluation',
        'chatterbot.logic.TimeLogicAdapter',
        'chatterbot.logic.BestMatch'
    ],
    database_uri='sqlite:///database.sqlite3'
)

print('Type something to begin...')

# The following loop will execute each time the user enters input
while True:
    try:
        user_input = input()
        bot_response = bot.get_response(user_input)
        print(bot_response)

    # Press ctrl-c or ctrl-d on the keyboard to exit
    except (KeyboardInterrupt, EOFError, SystemExit):
        break

在这里插入图片描述

3.12 训练语料库示例

  • training_example_chatterbot_corpus.py:
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
import logging

'''
This is an example showing how to train a chat bot using the
ChatterBot Corpus of conversation dialog.
'''

# Enable info level logging
# logging.basicConfig(level=logging.INFO)

chatbot = ChatBot('XiaoMu Bot')

# Start by training our bot with the ChatterBot corpus data
trainer = ChatterBotCorpusTrainer(chatbot)

trainer.train(
    # 'chatterbot.corpus.english',
    'chatterbot.corpus.chinese'
)

# Now let's get a response to a greeting
response = chatbot.get_response('How are you doing today?')
print(response)
response = chatbot.get_response('Hello?')
print(response)
response = chatbot.get_response('why can you not eat?')
print(response)
response = chatbot.get_response('怎么称呼你')
print(response)
response = chatbot.get_response('你什么时候走?')
print(response)
response = chatbot.get_response('为什么不能你吃?')
print(response)

在这里插入图片描述
网友整理的语料库地址:
https://github.com/codemayq/chinese_chatbot_corpus
https://github.com/candlewill/Dialog_Corpus

3.13 训练列表数据示例

  • training_example_list_data.py:
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer


'''
This is an example showing how to train a chat bot using the
ChatterBot ListTrainer.
'''

chatbot = ChatBot('XiaoMu Bot')

# Start by training our bot with the ChatterBot corpus data
trainer = ListTrainer(chatbot)

trainer.train([
    'Hello, how are you?',
    'I am doing well.',
    'That is good to hear.',
    'Thank you'
])

# You can train with a second list of data to add response variations

trainer.train([
    'Hello, how are you?',
    'I am great.',
    'That is awesome.',
    'Thanks'
])

# Now let's get a response to a greeting
response = chatbot.get_response('How are you doing today?')
print(response)
response = chatbot.get_response('Hello, how are you?')
print(response)
response = chatbot.get_response('Hello, how are you?')
print(response)

在这里插入图片描述

3.14 训练自定义数据示例

from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer

## 加载语料库
file = open(r"C:\Users\tomcat\Desktop\xiaohuangji50w_nofenci.conv",
            'r', encoding='utf-8')
corpus = []
print('开始加载语料!')
while 1:
    try:
        line = file.readline()
        if not line:
            break
        if line == 'E\n':
            continue
        corpus.append(line.split('M ')[1].strip('\n'))
    except:
        pass
file.close()
print('语料加载完毕!')

## 新建机器人
chatbot = ChatBot("XiaoMu bot")
trainer = ListTrainer(chatbot)

## 训练语料库
print('开始训练!')
trainer.train(corpus[:10000])
print('训练完毕!')

## 轮询测试
while True:
    print(chatbot.get_response(input("Me:")))

在这里插入图片描述

3.15 基于tkinter的示例

  • tkinter_gui.py:
from chatterbot import ChatBot
import tkinter as tk
try:
    import ttk as ttk
    import ScrolledText
except ImportError:
    import tkinter.ttk as ttk
    import tkinter.scrolledtext as ScrolledText
import time


class TkinterGUIExample(tk.Tk):

    def __init__(self, *args, **kwargs):
        """
        Create & set window variables.
        """
        tk.Tk.__init__(self, *args, **kwargs)

        self.chatbot = ChatBot(
            "GUI Bot",
            storage_adapter="chatterbot.storage.SQLStorageAdapter",
            logic_adapters=[
                "chatterbot.logic.BestMatch"
            ],
            database_uri="sqlite:///database.sqlite3"
        )

        self.title("Chatterbot")

        self.initialize()

    def initialize(self):
        """
        Set window layout.
        """
        self.grid()

        self.respond = ttk.Button(self, text='Get Response', command=self.get_response)
        self.respond.grid(column=0, row=0, sticky='nesw', padx=3, pady=3)

        self.usr_input = ttk.Entry(self, state='normal')
        self.usr_input.grid(column=1, row=0, sticky='nesw', padx=3, pady=3)

        self.conversation_lbl = ttk.Label(self, anchor=tk.E, text='Conversation:')
        self.conversation_lbl.grid(column=0, row=1, sticky='nesw', padx=3, pady=3)

        self.conversation = ScrolledText.ScrolledText(self, state='disabled')
        self.conversation.grid(column=0, row=2, columnspan=2, sticky='nesw', padx=3, pady=3)

    def get_response(self):
        """
        Get a response from the chatbot and display it.
        """
        user_input = self.usr_input.get()
        self.usr_input.delete(0, tk.END)

        response = self.chatbot.get_response(user_input)

        self.conversation['state'] = 'normal'
        self.conversation.insert(
            tk.END, "Human: " + user_input + "\n" + "ChatBot: " + str(response.text) + "\n"
        )
        self.conversation['state'] = 'disabled'

        time.sleep(0.5)


gui_example = TkinterGUIExample()
gui_example.mainloop()

在这里插入图片描述

在这里插入图片描述

3.16 基于flask的示例

  • app.py:
from flask import Flask, render_template, request
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

app = Flask(__name__)

english_bot = ChatBot("Chatterbot", storage_adapter="chatterbot.storage.SQLStorageAdapter")
trainer = ChatterBotCorpusTrainer(english_bot)
trainer.train("chatterbot.corpus.english")

@app.route("/")
def home():
    return render_template("index.html")

@app.route("/get")
def get_bot_response():
    userText = request.args.get('msg')
    return str(english_bot.get_response(userText))

if __name__ == "__main__":
    app.run()

运行结果如下:

  • chatterbot+flask+jquery,版本v1.0
    在这里插入图片描述

  • chatterbot+flask+chatui,版本v5.0
    在这里插入图片描述


结语

如果您觉得该方法或代码有一点点用处,可以给作者点个赞,或打赏杯咖啡;╮( ̄▽ ̄)╭
如果您感觉方法或代码不咋地//(ㄒoㄒ)//,就在评论处留言,作者继续改进;o_O???
如果您需要相关功能的代码定制化开发,可以留言私信作者;(✿◡‿◡)
感谢各位大佬童鞋们的支持!( ´ ▽´ )ノ ( ´ ▽´)っ!!!
在这里插入图片描述

### 回答1: Python聊天机器人作为一种人工智能技术应用,已在很多领域得到广泛应用,比如智能客服、智能家居、智能助手等。本人毕业设计中实现了一个基于Python语言的聊天机器人,主要功能包括问答功能,闲聊功能和推荐功能。 问答功能是实现机器人学习用户提出的问题并给出相应的答案,采用的是自然语言处理技术和机器学习算法进行模型训练,并建立相应数据库存储问题和答案。闲聊功能是模拟人与机器人之间的自由对话,通过专门的聊天语料库进行构建。推荐功能是基于用户的兴趣爱好,为用户推荐相关内容或产品,这部分的数据采集需要采用爬虫技术,从多个网站上获取信息。 实现聊天机器人的主要工具和技术包括Python语言、自然语言处理算法、机器学习算法、爬虫技术等。Python语言在人工智能领域中具有良好的应用和开发环境,可以通过调用各类开源库进行相应处理和计算,大大便利了开发人员的工作。 除此之外,该聊天机器人实现需要结合大量的文本语料,可以与各类的第三方应用进行集成,引入更多的数据源和知识库。 附:部分代码(仅供参考) 问答部分: ``` import jieba import re import csv class Question(): def __init__(self): self.qa_list = [] def init(self): file_path = 'XXX.csv' with open(file_path, 'r', encoding='utf-8') as csvfile: reader = csv.reader(csvfile) for row in reader: self.qa_list.append(row) # 根据问题找答案 def match_question(self, question): print('question:',question) for qa_pair in self.qa_list: match_keyword_num = 0 question_words = list(jieba.cut(question)) for word in question_words: if word in qa_pair[0]: match_keyword_num += 1 if match_keyword_num > 0: return qa_pair[1] return None ``` 闲聊部分: ``` import re from chatterbot import ChatBot from chatterbot.trainers import ListTrainer chatbot = ChatBot('my bot') conversation = [ "Hello", "Hi there!", "How are you doing?", "I'm doing great.", "That is good to hear", "Thank you.", "You're welcome.", "What is your name?", "My name is Bot", "Are you a robot?", "Yes, I am a robot, but I'm not just any robot.", "How can I help you?", "I am looking for information about chatbots", "Chatbots are a form of artificial intelligence that can communicate with users through text messages or voice commands.", "Thank you for the information.", "You're welcome." ] trainer = ListTrainer(chatbot) trainer.train(conversation) ``` 推荐部分: ``` import scrapy from scrapy.selector import Selector class AmazonSpider(scrapy.Spider): name = "amazon_spider" base_url = 'https://www.amazon.cn' start_urls = [ "https://www.amazon.cn/gp/bestsellers/books/ref=zg_bs_nav_0" ] def parse(self, response): selector = Selector(response) all_divs = selector.xpath('//div[@class="a-section a-spacing-none aok-relative"]') for div in all_divs: book_name = div.xpath('.//h2/a/text()').extract_first().strip() author_name = div.xpath('.//span[contains(@class, "a-size-small")]/text()').extract_first() print('book_name:',book_name) print('author_name:',author_name) ``` ### 回答2: Python聊天机器人是一款智能化的机器人,它是由Python语言编写的软件程序,可以模拟人类进行自然交流。它主要通过使用Python的人工智能技术,实现语言理解和分类,从而能够处理来自用户的自然语言,作出响应和回答。 一个Python聊天机器人程序的主要功能应该包括自然语言处理、语义理解、回答生成和交互界面设计。在此基础上,它还可以利用人工智能技术,分析用户的情感、喜好和需求,进一步提升和优化交互体验。 下面是一个基于Python聊天机器人程序的代码示例: ``` import random def greeting(): response = ["你好!", "你好啊!", "你好呀!", "你好,很高兴见到你"] return random.choice(response) def farewall(): response = ["再见!", "拜拜!", "下次见!", "祝你一天好心情!"] return random.choice(response) def robot_response(user_input): if "你好" in user_input: return greeting() elif "再见" in user_input: return farewall() else: return "我不太明白你在说什么,请再说一遍" print("请开始和我聊天吧。") while True: user_input = input("我:") response = robot_response(user_input) print("机器人:" + response) ``` 该程序可以根据用户输入,在控制台上作出相应的回答。其具体实现采用了Python的条件语句和随机数生成函数等基本功能。通过这个小例子,可以比较直观地了解Python聊天机器人的工作原理和基本特性。 总之,Python聊天机器人是一项富有挑战性和创新性的毕业设计,对于有志于从事人工智能方向的学生来说,它具有一定的实践意义和参考价值。
评论 32
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值