方法一
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