class_docstr: Word Swap by swaping words that have multiple POS tags in WordNet.
docstr: get all possible multi-pos words with pos tags same as treebank_tag.
  
  :return: a list
code: def get_candidates_from_wordnet(self):
      r"""
      get all possible multi-pos words with pos tags same as treebank_tag.
  
      :return: a list
      """
      noun = set(
          [
              i
              for i in self.processor.get_all_lemmas(pos="n")
              if "_" not in i
          ]
      )
      verb = set(
          [
              i
              for i in self.processor.get_all_lemmas(pos="v")
              if "_" not in i
          ]
      )
      adj = set(
          [
              i
              for i in self.processor.get_all_lemmas(pos="a")
              if "_" not in i
          ]
      )
      adv = set(
          [
              i
              for i in self.processor.get_all_lemmas(pos="r")
              if "_" not in i
          ]
      )
  
      candidates = []
      if self.treebank_tag == "NN":
          candidates = list(noun & (verb | adj | adv))
      elif self.treebank_tag == "VB":
          candidates = list(verb & (noun | adj | adv))
      elif self.treebank_tag == "JJ":
          candidates = list(adj & (verb | noun | adv))
      elif self.treebank_tag == "RB":
          candidates = list(adv & (verb | adj | noun))
      return candidates
  
file_path: textflint/textflint/generation/transformation/POS/multi_pos_swap.py
imports: from ....input.component.sample import POSSample
  from ...transformation import WordSubstitute
label_desc: Use image node_id 4 for calling the SwapMultiPOS obj's underlying member method code with example usage: obj.get_candidates_from_wordnet() and returns: candidates