original_docstring: Transforms the entity synonyms into a text->value dictionary
docstring: Transforms the entity synonyms into a text->value dictionary
docstring_tokens: Transforms the entity synonyms into a text - > value dictionary
code: def transform_entity_synonyms(
      synonyms, known_synonyms: Optional[Dict[Text, Any]] = None
  ) -> Dict[Text, Any]:
      """Transforms the entity synonyms into a text->value dictionary"""
      entity_synonyms = known_synonyms if known_synonyms else {}
      for s in synonyms:
          if "value" in s and "synonyms" in s:
              for synonym in s["synonyms"]:
                  entity_synonyms[synonym] = s["value"]
      return entity_synonyms
code_tokens: def transform_entity_synonyms ( synonyms , known_synonyms : Optional [ Dict [ Text , Any ] ] = None ) -> Dict [ Text , Any ] : entity_synonyms = known_synonyms if known_synonyms else { } for s in synonyms : if "value" in s and "synonyms" in s : for synonym in s [ "synonyms" ] : entity_synonyms [ synonym ] = s [ "value" ] return entity_synonyms
short_docstring: Transforms the entity synonyms into a text->value dictionary
short_docstring_tokens: Transforms the entity synonyms into a text - > value dictionary
comment: """Transforms the entity synonyms into a text->value dictionary"""