class_docstr: Swap prefix and keep the same POS tags.
class_docstr_tok: ["Swap","prefix","and","keep","the","same","POS","tags","."]
docstr: Get all possible candidates from WordNet.
  
  :return: a dict used as inverted index, {remain: prefix},
docstr_tok: ["Get","all","possible","candidates","from","WordNet",".",":","return",":","a","dict","used","as","inverted","index",",","{","remain",":","prefix","}",","]
code: def get_remain_prefix_dict(self):
      r"""
      Get all possible candidates from WordNet.
  
      :return: a dict used as inverted index, {remain: prefix},
      """
      dicts = {
          "NN": [
              i
              for i in self.processor.get_all_lemmas(pos="n")
              if "_" not in i
          ],
          "VB": [
              i
              for i in self.processor.get_all_lemmas(pos="v")
              if "_" not in i
          ],
          "JJ": [
              i
              for i in self.processor.get_all_lemmas(pos="a")
              if "_" not in i
          ],
          "RB": [
              i
              for i in self.processor.get_all_lemmas(pos="r")
              if "_" not in i
          ],
      }
      remain_prefix_dict = {}
      prefix_counter = Counter()
      for k, v in dicts.items():
          for w in v:
              segs, _ = self.morpheme_analyzer.viterbi_segment(w)
  
              if len(segs) > 1:
                  prefix_counter.update({segs[0]: 1})
                  remain = "".join(segs[1:])
                  remain_prefix_dict.setdefault(remain, set())
                  remain_prefix_dict[remain].add((k, segs[0]))
      return remain_prefix_dict
  
file_path: textflint/textflint/generation/transformation/POS/prefix_swap.py
imports: from collections import Counter
  from ....input.component.sample import POSSample
  from ...transformation import WordSubstitute
  from ....common.utils.load import load_morfessor_model
  from ....common.utils.install import download_if_needed
  from ....common.settings import MORPHEME_ANALYZER
label_desc: Use image node_id 3 for calling the SwapPrefix obj's underlying member method code with example usage: obj.get_remain_prefix_dict() and returns: remain_prefix_dict