python - NLTK 语料库部署 Chatterbot Heroku

标签 python nltk corpus

我的第一个 Telegram 聊天机器人(使用 Chatterbot 库完成)有问题。

我的项目由以下人员组成:

  • 配置文件
  • 要求(txt 文件)
  • telegramtoken(txt 文件)
  • 运行时(txt 文件)
  • nltk(txt 文件)
  • 机器人用户(csv 文件)
  • magghybot(py 文件)
  • Maggy(py 文件)
  • 对话(名为 lang 的文件夹中的 yml 文件)
  • math_words(名为 lang 的文件夹中的 json 文件)

我在 Heroku 上部署了我的项目,但出现了这个问题:

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 275 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing requirements with pip
remote: 
remote: -----> Downloading NLTK corpora…
remote:  !     'nltk.txt' not found, not downloading any corpora
remote:  !     Learn more: https://devcenter.heroku.com/articles/python-nltk
remote: -----> Discovering process types
remote:        Procfile declares types -> worker
remote: 
remote: -----> Compressing...
remote:        Done: 47.3M
remote: -----> Launching...
remote:        Released v5
remote:        https://magghy.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy.... done.
To https://git.heroku.com/magghy.git
   2cdd74d..254cbad  master -> master

我不知道要插入什么 NLTK 语料库。聊天机器人必须引用的我的语料库位于名为“conversations”(yml 文件)和“math_words”(json 文件)的文件中。

我该如何继续?

最佳答案

在构建包中使用此链接而不是 Heroku/python:

https://github.com/heroku/heroku-buildpack-python.git

例如:

Example buildpack configuration

关于python - NLTK 语料库部署 Chatterbot Heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46806912/

相关文章:

python - 如何确定 numpy.datetime64 中的时间单位?

python - 获取多列的唯一值作为 Pandas 中的新数据框

python - 尝试导入 NLTK 模块时导入错误

javascript - TF-IDF语料库是否可以使用色散

r - 语料库参数上的 DocumentTermMatrix 错误

python | cv2.imshow() 加载数组作为 BGR?

python - 不使用 shell-True 提取帧数

文本结果前面的 NLTK 字母 'u'?

python - "NotImplementedError: Use label() to access a node label"

python-2.7 - 在 python 2.7.3 中使用 Wordnet API 时出现属性错误