No Regex Entity Extraction

Hello all,

i’m new to rasa and i’m stuck with entities extraction using RegexEntityExtractor. But i have the same Problem with Ducklings too. My Bot is working so far. But the Entity “trackingid” isn’t recognized/filled.

I hope somebody can show me the right way.

Configuration: 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 confidence_threshold: 0.7
  • name: RegexEntityExtractor case_sensitive: False use_lookup_tables: False use_regexes: True “use_word_boundaries”: True
  • 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

domain.yml entities:

  • trackingid

slots: trackingid: type: any influence_conversation: false

nlu.yml

  • regex: trackingid examples: |

    • \d{10,12}
  • intent: trackingidok examples: |

    • [1234567890] (trackingid)
    • my tracking id is [1234567890] (trackingid)
    • my shipment has the number [1234567890] (trackingid)
    • i have the [1234567890] (trackingid)
    • that is [1234567890] (trackingid)

Hey @DrEvil75, welcome to the forum :slight_smile:

it looks like your intent examples have spaces in the entity annotations. This prevents any entity extractor in your NLU pipeline (DIETClassifier or RegexEntityExtractor) to learn to extract the entity. Try to remove the spaces, like this:

that is [1234567890] (trackingid) -> that is [1234567890](trackingid)

In my case, everything works when I delete the spaces. Let me know how it goes for you.

Hello SamS,

OMG arrrrrrrrrrrr. Yes, yo’re absolutely right. Viewed 1000 times, not seen. Now it’s working. Thank you! Mirko

1 Like