class_docstr: Swap entities with other entities of the same category.
class_docstr_tok: ["Swap","entities","with","other","entities","of","the","same","category","."]
docstr: :param dict entity_res: dic of categories and their entities.
docstr_tok: [":","param","dict","entity_res",":","dic","of","categories","and","their","entities","."]
code: def __init__(self, entity_res=None, **kwargs):
      r"""
      :param dict entity_res: dic of categories and their entities.
      """
      super().__init__()
      entities_path = (
          entity_res
          if entity_res
          else download_if_needed(ENTITIES_PATH)
      )
      self.entities_dic = json_loader(entities_path)
  
file_path: textflint/textflint/generation/transformation/UT/swap_named_ent.py
imports: from ..transformation import Transformation
  from ....common.settings import ENTITIES_PATH, CORENLP_ENTITY_MAP
  from ....common.utils.load import json_loader
  from ....common.utils.list_op import trade_off_sub_words
  from ....common.utils.install import download_if_needed
label_desc: Use image node_id 1 to create a new SwapNamedEnt object from inherited base classes: Transformation with example: obj = SwapNamedEnt(entity_res)