Search code examples
pythonmachine-learningrasa-nlurasa-corerasa

RASA slot extraction NLU data


Hi I am trying to fill a form using RASA and currently I have a slot named email so my question is that what is the best way to insert pattern for the expecting answer for slot mapping. I saw inside action.py the slot mapping functions like, self.from_intent, self.from_entity, self.from_text so I need to write the pattern for email like:

my email is [[email protected]](email) 
email address is [[email protected]](email)
[[email protected]](email) this is my email  

So how can I achieve more accuracy and reuseability for my model, by listing all the pattern inside the nlu file under a intent name and providing that intent in self.from_intent or using self.from_entity. Is there any other better methods? am using RASA 1.8


Solution

  • You should use a pretrained entity extractor like DucklingHTTPExtractor for emails. This will be far more accurate than trying to add all the patterns yourself. In a pipeline this would look like:

    pipeline:
       ...<other components>
        - DucklingHTTPExtractor
          dimensions: ["email"]
    
    

    Make sure to start the Duckling server for this to work:

    docker run -p 8000:8000 rasa/duckling