你的 FallbackClassifier 需要一个 IntentClassifier,它还需要一个 Featurizer,而 Featurizer 需要一个 Tokenizer。
因此,使您的 FallbackClassifier 工作的最简单方法是从您在CLI上运行时获取config.yml文件。复制粘贴 config.yml 代码并从"pipeline"的属性中删除所有 "#" 注释行。rasa init
因此,您的管道代码应如下所示:
language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
- name: FallbackClassifier
threshold: 0.7
ambiguity_threshold: 0.1
现在你的 FallbackClassifier 应该像一个魅力一样工作!