class_docstr: Transforms an input by replacing its words with synonyms provided by a
  homophone dictionary.
docstr: Returns a list containing all possible words with 1 character
  replaced by a homophone.
docstr_tok: ["Returns","a","list","containing","all","possible","words","with","1","character","replaced","by","a","homophone","."]
code: def _get_replacement_words(self, word):
      """Returns a list containing all possible words with 1 character
      replaced by a homophone."""
      candidate_words = []
      for i in range(len(word)):
          character = word[i]
          character = pinyin.get(
              character, format="strip", delimiter=" "
          )
          if character in self.homophone_dict.values:
              for row in range(
                  self.homophone_dict.shape[0]
              ):  # df is the DataFrame
                  for col in range(0, 1):
                      if (
                          self.homophone_dict._get_value(row, col)
                          == character
                      ):
                          for j in range(1, 4):
                              repl_character = self.homophone_dict[
                                  col + j
                              ][row]
                              if repl_character is None:
                                  break
                              candidate_word = (
                                  word[:i]
                                  + repl_character
                                  + word[i + 1 :]
                              )
                              candidate_words.append(candidate_word)
          else:
              pass
      return candidate_words
  
file_path: TextAttack/textattack/transformations/word_swaps/chn_transformations/chinese_homophone_character_swap.py
imports: import os
  import pandas
  import pinyin
  from .None import WordSwap
label_desc: Use image node_id 2 for calling the ChineseHomophoneCharacterSwap obj's underlying member method code with example usage: obj._get_replacement_words(word) and returns: candidate_words