I'm trying to use Rasa to detect entities such as phone numbers or contract ID. It seems natural to use regular expressions to define precisely those entities, and Rasa does have something called "Regular Expression Features" which allows us to define regular expressions.
Except I don't understand how to use them. In the Rasa-NLU tutorial, there are regexes (like "zipcode"
), but I don't see how they are linked to entities ("location"
).
Does anyone have a clue about how regexes work with Rasa ?
Entities are structured pieces of information inside a user message. For entity extraction to work, you need to either specify training data to train an ML model or you need to define regular expressions to extract entities using the RegexEntityExtractor based on a character pattern.
Rasa is a tool to build custom AI chatbots using Python and natural language understanding (NLU). Rasa provides a framework for developing AI chatbots that uses natural language understanding (NLU).
Lookup Tables in RASA 3. x. The lookup table can be defined as a list of words used to generate a particular pattern; it is written in the nlu. yml file.
rasa train will store the trained model in the directory defined by --out , models/ by default. The name of the model by default is <timestamp>. tar.
The regexes you define are not linked to any entity or intent explicitly. What a regex does is add a new feature to your input, e.g. an extra vector element which can be 1 or 0 depending on whether the regex matched. When you train, the model now has this extra information about each of your examples, and can choose itself when to pay attention to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With