0

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

它返回:

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

1 回答 1

2

In your config file the pipeline is set to [] but needs to be configured properly. The documentation for the pipeline configuration option can be found here. The available options are discussed here.

The pipeline can either be a pre-configured pipeline like: mitie, spacy_sklearn, or keyword. It can also be a custom pipeline like: ["nlp_spacy", "ner_crf", "ner_synonyms"]. I would recommend setting your pipeline to:

pipeline: "space_sklearn"

Update your configuration file and restart the server. If the server is still running in a console window press Ctrl + c to stop it. Then re-enter the command you used to start it.

于 2018-02-20T15:04:01.047 回答