GaoQ1 / rasa_nlu_gq

turn natural language into structured data(支持中文,自定义了N种模型,支持不同的场景和任务)
Apache License 2.0
303 stars 97 forks source link

请问本项目使用的Rasa版本? #36

Closed vba34520 closed 4 years ago

vba34520 commented 4 years ago

首先感谢大佬在Rasa上的研究,解决了不少问题,万分感谢!

本人在阅读rasa对话系统踩坑记(二)时,安装了该库

pip install rasa-nlu-gao

使用配置config.yml训练

language: "zh"

 pipeline:
   - name: "tokenizer_jieba"

   - name: "intent_featurizer_count_vectors"
     token_pattern: '(?u)\b\w+\b'
   - name: "intent_classifier_tensorflow_embedding"

   - name: "ner_bilstm_crf"
     lr: 0.001
     char_dim: 100
     lstm_dim: 100
     batches_per_epoch: 10
     seg_dim: 20
     num_segs: 4
     batch_size: 200
     tag_schema: "iobes"
     model_type: "bilstm" # 模型支持两种idcnn膨胀卷积模型或bilstm双向lstm模型
     clip: 5
     optimizer: "adam"
     dropout_keep: 0.5
     steps_check: 100

报错

  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 1, column 1
did not find expected key
  in "<unicode string>", line 3, column 2

本人才疏学浅无从下手,请问本项目使用的Rasa版本?期待您的回复!

vba34520 commented 4 years ago

报错是因为配置的pipeline前多了俩空格

我改为这样可以跑了

language: zh
pipeline:
- name: JiebaTokenizer
- name: CountVectorsFeaturizer
  token_pattern: '(?u)\b\w+\b'
- name: EmbeddingIntentClassifier
- name: rasa_nlu_gao.extractors.bilstm_crf_entity_extractor.BilstmCRFEntityExtractor
  lr: 0.001
  char_dim: 100
  lstm_dim: 100
  batches_per_epoch: 10
  seg_dim: 20
  num_segs: 4
  batch_size: 200
  tag_schema: iobes
  model_type: bilstm
  clip: 5
  optimizer: adam
  dropout_keep: 0.5
  steps_check: 100

我的Rasa版本pip list | grep rasa

rasa                              1.1.8
rasa-nlu                          0.12.2
rasa-nlu-gao                      1.0.3
rasa-sdk                          1.1.1
rasa-x                            0.24.1
GaoQ1 commented 4 years ago

rasa是基于1.1.3

vba34520 commented 4 years ago

rasa是基于1.1.3

十分感谢!