Rasa nlu教程没有工作

时间:2018-02-20 09:40:40

标签: rasa-nlu

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":"我正在寻找墨西哥食物"}' | python -m json.tool

  4. 它返回:

    {
      "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"
          ]
        }
      }
    }
    

1 个答案:

答案 0 :(得分:2)

在配置文件中,管道设置为[],但需要正确配置。可以找到管道配置选项的文档here。讨论了可用的选项here

管道可以是预配置的管道,例如: mitie spacy_sklearn 关键字。它也可以是一个自定义管道,如: [" nlp_spacy"," ner_crf"," ner_synonyms"] 。我建议您将管道设置为:

pipeline: "space_sklearn"

更新配置文件并重新启动服务器。如果服务器仍在控制台窗口中运行,请按Ctrl + c将其停止。然后重新输入用于启动它的命令。