notice

This is documentation for Rasa Open Source Documentation v2.0.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.1.x).

Version: 2.0.x

rasa.shared.core.training_data.story_reader.markdown_story_reader

MarkdownStoryReader Objects

class MarkdownStoryReader(StoryReader)

Class that reads the core training data in a Markdown format

read_from_file

| read_from_file(filename: Union[Text, Path]) -> List[StoryStep]

Given a md file reads the contained stories.

parse_e2e_message

| @staticmethod
| parse_e2e_message(line: Text, is_used_for_training: bool = True) -> 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 docs on NLU training data.

is_stories_file

| @staticmethod
| is_stories_file(file_path: Union[Text, Path]) -> bool

Check if file contains Core training data or rule data in Markdown format.

Arguments:

  • file_path - Path of the file to check.

Returns:

True in case the file is a Core Markdown training data or rule data file, False otherwise.

is_test_stories_file

| @staticmethod
| is_test_stories_file(file_path: Union[Text, Path]) -> bool

Checks if a file contains test stories.

Arguments:

  • file_path - Path of the file which should be checked.

Returns:

True if it's a file containing test stories, otherwise False.