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.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.