Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
732 views
in Technique[技术] by (71.8m points)

Lookup table not working after training the model in rasa

I am new to rasa. I am training a model to recognize certain entities using lookup tables. I have multiple entities in the single sentence and I am trying to extract them.

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

When I train the model and try using the api, It doesn't recognize cases from the states in the lookup table and as a result can't assign it to slot filter_state.

Can anyone advise me as to what am I doing wrong here for making the lookup table work!

question from:https://stackoverflow.com/questions/65622756/lookup-table-not-working-after-training-the-model-in-rasa

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Could you, please, post on the Rasa forum and include more details of your setup? In particular, what version of Rasa Open Source are you using? Is the above your complete NLU data? (I think that you need at least 2 intents for an intent classifier to train.) I also recommend that you test the system using rasa interactive --debug and share e.g. a screenshot, this will help everyone see the exact input message and how it gets processed by Rasa. I'm sure we'll trace the issue down to its roots :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...