notice

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

Version: 2.x

rasa.shared.nlu.training_data.formats.markdown_nlg

NLGMarkdownReader Objects

class NLGMarkdownReader(MarkdownReader)

Reads markdown training data with NLG stories and creates 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.