notice

This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.0.x).

Version: Master/Unreleased

rasa.shared.nlu.training_data.synonyms_parser

add_synonyms_from_entities

add_synonyms_from_entities(plain_text: Text, entities: List[Dict], existing_synonyms: Dict[Text, Any]) -> None

Adds synonyms found in intent examples.

Arguments:

  • plain_text - Plain (with removed special symbols) user utterance.
  • entities - Entities that were extracted from the original user utterance.
  • existing_synonyms - The dict with existing synonyms mappings that will be extended.

add_synonym

add_synonym(synonym_value: Text, synonym_name: Text, existing_synonyms: Dict[Text, Any]) -> None

Adds a new synonym mapping to the provided list of synonyms.

Arguments:

  • synonym_value - Value of the synonym.
  • synonym_name - Name of the synonym.
  • existing_synonyms - Dictionary will synonym mappings that will be extended.