notice

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

Version: 2.2.x

rasa.shared.nlu.training_data.formats.markdown_nlg

NLGMarkdownReader Objects

class NLGMarkdownReader(MarkdownReader)

Reads markdown training data containing NLG stories and creates a TrainingData object.

__init__

| __init__(ignore_deprecation_warning: bool = False) -> None

Creates reader. See parent class docstring for more information.

reads

| reads(s: Text, **kwargs: Any) -> "TrainingData"

Read markdown string and create TrainingData object.

is_markdown_nlg_file

| @staticmethod
| is_markdown_nlg_file(filename: Union[Text, Path]) -> bool

Checks if given file contains NLG training data.

Arguments:

  • filename - Path to the training data file.

Returns:

True if file contains NLG training data, False otherwise.

NLGMarkdownWriter Objects

class NLGMarkdownWriter(MarkdownWriter)

Converts retrieval intent data to Markdown.

dumps

| dumps(training_data: "TrainingData") -> Text

Transforms the NlG part of TrainingData object into a markdown string.