rasa/core/interpreter.py
def extract_intent_and_entities(user_input: Text) -> object:
        """Parse the user input using regexes to extract intent & entities."""

        prefixes = re.escape(RegexInterpreter.allowed_prefixes())
        # the regex matches "slot{"a": 1}"
        m = re.search('^[' + prefixes + ']?([^{@]+)(@[0-9.]+)?([{].+)?',
                      user_input)
        if m is not None:
            event_name = m.group(1).strip()
            confidence = RegexInterpreter._parse_confidence(m.group(2))
            entities = RegexInterpreter._parse_parameters(m.group(3),
                                                          m.start(3),
                                                          m.end(3),
                                                          user_input)

            return event_name, confidence, entities
        else:
            logger.warning("Failed to parse intent end entities from "
                           "'{}'. ".format(user_input))
            return None, 0.0, []
Parse the user input using regexes to extract intent & entities.
Parse the user input using regexes to extract intent & entities.
Parse the user input using regexes to extract intent & entities .
def extract_intent_and_entities(user_input: Text) -> object:
        prefixes = re.escape(RegexInterpreter.allowed_prefixes())
        m = re.search('^[' + prefixes + ']?([^{@]+)(@[0-9.]+)?([{].+)?',
                      user_input)
        if m is not None:
            event_name = m.group(1).strip()
            confidence = RegexInterpreter._parse_confidence(m.group(2))
            entities = RegexInterpreter._parse_parameters(m.group(3),
                                                          m.start(3),
                                                          m.end(3),
                                                          user_input)
            return event_name, confidence, entities
        else:
            logger.warning("Failed to parse intent end entities from "
                           "'{}'. ".format(user_input))
            return None, 0.0, []
def extract_intent_and_entities ( user_input : Text ) -> object : prefixes = re . escape ( RegexInterpreter . allowed_prefixes ( ) ) m = re . search ( '^[' + prefixes + ']?([^{@]+)(@[0-9.]+)?([{].+)?' , user_input ) if m is not None : event_name = m . group ( 1 ) . strip ( ) confidence = RegexInterpreter . _parse_confidence ( m . group ( 2 ) ) entities = RegexInterpreter . _parse_parameters ( m . group ( 3 ) , m . start ( 3 ) , m . end ( 3 ) , user_input ) return event_name , confidence , entities else : logger . warning ( "Failed to parse intent end entities from " "'{}'. " . format ( user_input ) ) return None , 0.0 , [ ]
Parse the user input using regexes to extract intent & entities.
Parse the user input using regexes to extract intent & entities .
"""Parse the user input using regexes to extract intent & entities.""" # the regex matches "slot{"a": 1}"
user_input
Text