Rasa nlu 教程不起作用

Rasa nlu tutorial doesn't work

Rasa NLU 版本 (0.11.3):

使用的后端/管道(spacy_sklearn):

操作系统(osx):

问题:我尝试按照教程进行操作:https://rasahq.github.io/rasa_nlu/tutorial.html?highlight=project#

  1. 已安装 spaCy + sklearn
  2. 已创建config_spacy.json
  3. 已下载示例文件和训练 我已经测试了问候和再见的意图,它们是有效的 但是当我用命令测试时:

    curl -X POST localhost:5000/parse -d '{"q":"I am looking for Mexican food"}' | python -m json.tool

它returns:

{
  "intent": {
    "name": "None",
    "confidence": 1.0
  },
  "entities": [],
  "text": "yes"
}

配置文件的内容(如果使用且相关):

{
  "project": null,
  "fixed_model_name": null,
  "config": "config.json",
  "data": null,
  "emulate": null,
  "language": "en",
  "log_file": null,
  "log_level": "INFO",
  "mitie_file": "data/total_word_feature_extractor.dat",
  "spacy_model_name": null,
  "num_threads": 1,
  "max_training_processes": 1,
  "path": "/rasa_nlu/projects",
  "port": 5000,
  "token": null,
  "cors_origins": [],
  "max_number_of_ngrams": 7,
  "pipeline": [],
  "response_log": "/rasa_nlu/logs",
  "storage": null,
  "aws_endpoint_url": null,
  "duckling_dimensions": null,
  "duckling_http_url": null,
  "ner_crf": {
    "BILOU_flag": true,
    "features": [
      [
        "low",
        "title",
        "upper",
        "pos",
        "pos2"
      ],
      [
        "bias",
        "low",
        "word3",
        "word2",
        "upper",
        "title",
        "digit",
        "pos",
        "pos2",
        "pattern"
      ],
      [
        "low",
        "title",
        "upper",
        "pos",
        "pos2"
      ]
    ],
    "max_iterations": 50,
    "L1_c": 1,
    "L2_c": 0.001
  },
  "intent_classifier_sklearn": {
    "C": [
      1,
      2,
      5,
      10,
      20,
      100
    ],
    "kernel": "linear"
  }
}

状态:

{
  "available_projects": {
    "default": {
      "status": "ready",
      "available_models": [
        "fallback"
      ]
    }
  }
}

在您的配置文件中,管道设置为 [],但需要正确配置。管道配置选项的文档可以在 here. The available options are discussed here.

中找到

管道可以是 pre-configured 管道,例如:mitiespacy_sklearn关键字。它也可以是自定义管道,例如:["nlp_spacy"、"ner_crf"、"ner_synonyms"]。我建议将您的管道设置为:

pipeline: "space_sklearn"

更新您的配置文件并重新启动服务器。如果服务器在控制台 window 中仍然 运行,请按 Ctrl + c 停止它。然后re-enter你用来启动它的命令。