agent_19.py 342 B

12345678
  1. def get_chosen_strings(self, v_idx, n_idx):
  2. v_idx_np = to_np(v_idx)
  3. n_idx_np = to_np(n_idx)
  4. res_str = []
  5. for i in range(n_idx_np.shape[0]):
  6. v, n = self.verb_map[v_idx_np[i]], self.noun_map[n_idx_np[i]]
  7. res_str.append(self.word_vocab[v] + " " + self.word_vocab[n])
  8. return res_str