2021-06-15 Rasa对话机器人项目实例 (1)——环境搭建,项目初试

rasa对话系统实战(1)环境配置+初始

参考文档

(重要)rasa官方文档:
https://rasa.com/docs/rasa/installation
实例中文对话项目参考:
https://www.jianshu.com/p/063d7cd598d3
综合三个对话机器人的融合项目:
https://blog.csdn.net/qq_42189083/article/details/88076128
简单流程参考:
https://paper.yanxishe.com/columnDetail/17542
(重要)rasa简要知识点:
https://blog.csdn.net/ling620/article/details/99845885
MITIE词向量模型详细安装流程:
https://blog.csdn.net/liu765023051/article/details/83107254
Rasa_nlu_chi:入门教程
https://blog.csdn.net/sinat_36226553/article/details/110846622


rasa主要部分为NLU和core
Rasa NLU 用于聊天机器人中的意图识别和实体提取

“I am looking for a Mexican restaurant in the center of town”

返回结构化数据:

{
  "intent": "search_restaurant",
  "entities": {
    "cuisine" : "Mexican",
    "location" : "center"
  }
}

环境配置

环境:
python:3.6.4
pycharm: 2017(使用pycharm作为编译器)
VS: 2017

开始配置
在目录E:\1rasa\code下根据rasa官方文档配置环境。
省略文档中过程……

rasa init

或者

rasa init --no-prompt

(如果不用–no-prompt 就会 问很多关于配置的问题)

训练:

rasa train

训练成功的模型存在models文件夹下

only the parts of your model that have changed will be re-trained.

执行:

rasa shell

其他具体命令查看官方文档:https://rasa.com/docs/rasa/command-line-interface

Rasa X 交互界面

rasa interactive

This will first train a model and then start an interactive shell session. You can then correct your assistants predictions as you talk to it.

http://localhost:5005/visualization.html as soon as the session has started. This diagram can take some time to generate. To skip the visualization, run rasa interactive --skip-visualization.

http://192.168.0.105:5002/login

运行:

rasa run

测试

To evaluate a model on your test data, run:

rasa test
//or
rasa test core
//or
rasa test nlu

数据集分割 rasa data split
To create a train-test split of your NLU training data, run:

rasa data split nlu

前提配置 cmake boost安装
https://blog.csdn.net/caroline2222/article/details/88601373
在这里插入图片描述

MITIE安装

中文Rasa_NLU_Chi安装:

训练
1.采用> git clone https://github.com/crownpku/Rasa_NLU_Chi.git 将项目下载到本地;
2. 进入到Rasa_NLU_Chi文件中,打开终端,运行python setup.py install
3.下载训练好的MITIE模型total_word_feature_extractor_chi.dat,分享如下。
链接: https://pan.baidu.com/s/1kZJwLnteouC7e3dKam0PpQ 密码: mdhj
下载后放置位置为Rasa_NLU_Chi/data/total_word_feature_extractor_chi.dat
4.在Rasa_NLU_Chi文件 mkdir mitie, 然后进入到mitie文件下,在终端输入> git clone https://github.com/mit-nlp/MITIE.git 下载MITIE
然后进入到MITIE文件下,在终端输入python setup.py install
5.打开pycharm,打开Rasa_NLU_Chi工程,打开/rasa_nlu/train.py,在Edit Configurations中输入> -c …/sample_configs/config_jieba_mitie_sklearn.yml --data …/data/examples/rasa/demo-rasa_zh.json --path models
然后就可以调试train.py了
————————————————
原文链接:https://blog.csdn.net/Suan2014/article/details/84143330

问题:
1.git安装报错
2.cmake安装后要把路径添加到环境变量中
3.boost安装不成功(找不到bin文件夹。可以编译,无法运行)
4.VS未安装C环境,安装目录在C://(重新安装VS、更换路径)
我的安装路径
安装rasa core
https://blog.csdn.net/qq_42189083/article/details/88310407
https://blog.csdn.net/qq_42189083/article/details/88076128

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值