Hello I hope you can help me :), How can I recognize the numerical entities in RASA-nlu? Let’s say I want to capture the user’s phone number. How do I detect the numerical value?
Please, take a look at Entity Extraction.
Here is an overview what you need to do to recognize a phone number:
- Add training data to
nlu.md
. Let’s assume you have an intententer_phone_number
. You need to add some example data. You should mark every phone number you use in your training data. Here is an example:
## intent:enter_phone_number
- my cell phone is [0160 1234567](phone_number)
- my phone number is [0161 9876543](phone_number)
- you can reach me under [0151 1234567](phone_number)
- call me under [0167 8765432](phone_number)
- Add the
phone_number
entity to your domain file. You also need to add new intents. - Use the
pipeline: supervised_embeddings
in your config file. - Train your model using
rasa train nlu
. - Test it on the command line via
rasa shell nlu
If your phone number follow a certain pattern, you can also add a regex to your training data, such as
## regex:phone_number
- [0-9]{4}\\s[0-9]{7}
hi, I followed your guiding, but I meet a problem,: I use DietExtractor, and when I pass a phone number , it split my phone number to multi entitys.
Inconsistent BILOU tagging found, B- tag, L- tag pair encloses multiple entity classes.i.e. [B-a, I-b, L-a] instead of [B-a, I-a, L-a]. Assuming B- class is correct. 2020-09-21 12:31:52 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O]. Assuming last tag is L- instead of I-.
2020-09-21 12:31:52 DEBUG rasa.core.processor - Received user message ‘我的电话是13645647756’ with intent ‘{‘name’: ‘contact’, ‘confidence’: 0.9891341924667358}’
and entities '[{‘entity’: ‘contact’, ‘start’: 5, ‘end’: 12, 'value ‘: ‘1364564’, ‘extractor’: ‘DIETClassifier’}, {‘entity’: ‘contact’, ‘start’: 14, ‘end’: 16, ‘value’: ‘56’, ‘extractor’: ‘DIETClassifier’}]’
how could I sovle this problem
@rejae What pipeline are you using? What is your Rasa version?