rasa/core/training/dsl.py
def _parse_item(self, line: Text) -> Optional['Message']:
        """Parses an md list item line based on the current section type.

        Matches expressions of the form `<intent>:<example>. For the
        syntax of <example> see the Rasa NLU docs on training data:
        https://rasa.com/docs/nlu/dataformat/#markdown-format"""

        item_regex = re.compile(r'\s*(.+?):\s*(.*)')
        match = re.match(item_regex, line)
        if match:
            intent = match.group(1)
            self.current_title = intent
            message = match.group(2)
            example = self._parse_training_example(message)
            example.data["true_intent"] = intent
            return example

        raise ValueError("Encountered invalid end-to-end format for message "
                         "`{}`. Please visit the documentation page on "
                         "end-to-end evaluation at https://rasa.com/docs/core/"
                         "evaluation#end-to-end-evaluation-of-rasa-nlu-and-"
                         "core".format(line))
Parses an md list item line based on the current section type.

        Matches expressions of the form `<intent>:<example>. For the
        syntax of <example> see the Rasa NLU docs on training data:
        https://rasa.com/docs/nlu/dataformat/#markdown-format
Parses an md list item line based on the current section type.
Matches expressions of the form `:.
Parses an md list item line based on the current section type . Matches expressions of the form ` : .
def _parse_item(self, line: Text) -> Optional['Message']:
        item_regex = re.compile(r'\s*(.+?):\s*(.*)')
        match = re.match(item_regex, line)
        if match:
            intent = match.group(1)
            self.current_title = intent
            message = match.group(2)
            example = self._parse_training_example(message)
            example.data["true_intent"] = intent
            return example
        raise ValueError("Encountered invalid end-to-end format for message "
                         "`{}`. Please visit the documentation page on "
                         "end-to-end evaluation at https://rasa.com/docs/core/"
                         "evaluation#end-to-end-evaluation-of-rasa-nlu-and-"
                         "core".format(line))
def _parse_item ( self , line : Text ) -> Optional [ 'Message' ] : item_regex = re . compile ( r'\s*(.+?):\s*(.*)' ) match = re . match ( item_regex , line ) if match : intent = match . group ( 1 ) self . current_title = intent message = match . group ( 2 ) example = self . _parse_training_example ( message ) example . data [ "true_intent" ] = intent return example raise ValueError ( "Encountered invalid end-to-end format for message " "`{}`. Please visit the documentation page on " "end-to-end evaluation at https://rasa.com/docs/core/" "evaluation#end-to-end-evaluation-of-rasa-nlu-and-" "core" . format ( line ) )
Parses an md list item line based on the current section type.
Parses an md list item line based on the current section type .
"""Parses an md list item line based on the current section type.

        Matches expressions of the form `<intent>:<example>. For the
        syntax of <example> see the Rasa NLU docs on training data:
        https://rasa.com/docs/nlu/dataformat/#markdown-format"""
self
line
Text