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.nlu.training_data.formats.markdown_nlg

NLGMarkdownReader Objects

class NLGMarkdownReader(TrainingDataReader)

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

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(TrainingDataWriter)

dumps

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

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