docs: def generate_phonetic_representation(self, word):
          """
          Returns a generated phonetic representation for a word.
  
          :param str word: a word to be phoneticized.
          :return: A list of phonemes representing the phoneticized word.
  
          This method is used for words for which there is no pronunication
          entry in the CMU dictionary. The function generates a
          pronunication for the word in the standard CMU format. This can then
          be converted to a compact phonetic representation using
          modify_phonetic_representation().
  
          """
          with NamedTemporaryFile() as temp_file:
              # Write the word to a temp file
              temp_file.write(word)
              #todo - clean up this messy t2p path
              t2pargs = [os.path.abspath(os.path.join(os.path.dirname(__file__),'t2p/t2p')),
                         '-transcribe', os.path.join(data_path, 'cmudict.0.7a.tree'),
                         temp_file.name]
              temp_file.seek(0)
              output, error = subprocess.Popen(
                  t2pargs, stdout=subprocess.PIPE,
                  stderr=subprocess.PIPE
              ).communicate()
              output = output.split()
              phonetic_representation = output[1:]
  
          return phonetic_representation