方法一
stack安装
wget -qO- https://get.haskellstack.org/ | sh
pcre安装
- 下载安装包
- 安装
tar -zxvf pcre-8.32.tar.gz
./configure
make
make install
如果安装失败,提示下面错误:
regex-pcre > >=0.9.0 is required but it could not be found. 需要安装pkg-config。
sudo apt-get install pkg-config
duckling安装
- 编译和运行服务
stack build
stack exec duckling-example-exe
- 测试
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&text=tomorrow at eight'
方法二
ubuntu安装docker
运行镜像
docker run -p 8000:8000 rasa/duckling