Hello all, I am having a hard time getting numeric input to resolve to the proper intent.
I have a regex entity and intent for a strictly five-digit ‘zipcode’, and I have a separate intent for a single-digit ‘1’ (with or without a corresponding regex entity). (see code below)
Rasa resolves any digit to intent inform_zipcode
, even a single digit which does not get tagged with the zipcode entity.
I thought perhaps DIETClassifier’s entity extraction was confusing things, but when I run with entity_recognition: false
then rasa shell nlu
STILL classifies any number as an inform_zipcode
.
Any help appreciated. Below are the changes to a clean rasa init
(also added RegexEntityExtractor or config.yml
.
- regex: zipcode
examples: |
- ^\d{5}$
- ^((zero|oh|o|one|two|three|four|five|six|seven|eight|nine)\b ?){5}$
- regex: digit
examples: |
- ^\d{1}$
- intent: inform_zipcode
examples: |
- [08023](zipcode)
- [11122](zipcode)
- [98324](zipcode)
- [90301](zipcode)
- [23567](zipcode)
- [87123](zipcode)
- [08029](zipcode)
- [41404](zipcode)
- My zipcode is [91801](zipcode).
- [08044](zipcode) is my zip
- My zip code is [08022](zipcode).
- my zip is [91030](zipcode).
- intent: one
examples: |
- [1](digit)
- one