def wrap_with_passage_texts(cand_triples, passages):
  """Add passage text to the records."""
  cand_list_ids = [x[0] for x in cand_triples]
  cand_texts = passage_texts(cand_list_ids, passages)
  passage_infos = []
  for i in range(len(cand_list_ids)):
    cid = cand_list_ids[i]
    cl = cand_triples[i][1]
    ctext = cand_texts[i]
    cscore = cand_triples[i][2]
    passage_infos.append(PassageInfo(cid, ctext, cl, cscore))
  return passage_infos
Add passage text to the records.
language/multivec/preprocessing/create_training_data.py