我是新来的。我正在训练一个使用查找表来识别某些实体的模型。我在一个句子中有多个实体,我正在试图提取它们。
nlu.yml
version: "2.0"
nlu:
- intent: intent_1
examples : |
- how many deaths were there last year in [Ohio](Filter-State)?
- death count of [Florida](Filter-State) this year
- death count of [Texas](Filter-State) this year
- what's the death count for this quarter in [CA](Filter-State)?
- lookup: Filter-State
examples: |
- Alabama
- AL
- Alaska
- AK
- Arizona
- AZ
- Arkansas
- AR
- California
- CA
- Colorado
- CO
- Connecticut
- CT
- Delaware
- DE
- District of Columbia
- DC
- Florida
- FL
- Georgia
- GA
config.yml
language: en
pipeline:
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: "char_wb"
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 150
random_seed: 1
- name: FallbackClassifier
threshold: 0.7
- name: DucklingEntityExtractor
url: http://duckling.rasa.com:8000
dimensions:
- email
- time
- name: EntitySynonymMapper
policies:
- name: AugmentedMemoizationPolicy
max_history: 4
- name: TEDPolicy
max_history: 4
epochs: 100
- name: RulePolicy
core_fallback_threshold: 0.4
core_fallback_action_name: "action_default_fallback"
enable_fallback_prediction: True
当我训练模型并尝试使用api时,它无法从查找表中的状态识别案例,因此无法将其分配给时隙filter_state。
有人能告诉我,我在这里做错了什么使查找表工作!
发布于 2021-03-31 11:17:23
我刚接触过Rasa并在寻找另一个问题,但我昨晚偶然遇到并解决了这个问题。
要使查找表工作,需要在管道中添加"RegexEntityExtractor“,并可能删除RegexFeaturizer。您还需要在RegexEntityExtractor配置中启用查找表。
config.yml
pipeline:
- name: WhitespaceTokenizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: RegexEntityExtractor
case_sensitive: False
use_lookup_tables: True
use_regexes: True
...
发布于 2021-01-08 00:45:10
你能在Rasa论坛上贴上更多关于你的设置的细节吗?特别是,您使用的是什么版本的Rasa开放源码?以上是您完整的NLU数据吗?(我认为你至少需要两个意图才能训练意图分类器。)我还建议您使用rasa interactive --debug
测试系统,并共享屏幕截图,这将帮助每个人查看准确的输入消息以及Rasa如何处理该消息。我相信我们会找到这个问题的根源:-)
https://stackoverflow.com/questions/65622756
复制