(label, texts_after, new_path, no_label)
Save a text match data to a file.
Save a text match data to a file.
Save a text match data to a file .
def save_a_text_match_file(label, texts_after, new_path, no_label):
  """Save a text match data to a file."""
  logging.info("Saving processed file to: {}".format(new_path))
  with open(new_path, "w", encoding="utf-8") as out_f:
    for i, (one_line_l, one_line_r) in enumerate(zip(*texts_after)):
      if no_label:
        out_f.write(one_line_l + '\t' + one_line_r + "\n")
      else:
        out_f.write(label[i] + "\t" + one_line_l + '\t' + one_line_r + "\n")
def save_a_text_match_file ( label , texts_after , new_path , no_label ) : logging . info ( "Saving processed file to: {}" . format ( new_path ) ) with open ( new_path , "w" , encoding = "utf-8" ) as out_f : for i , ( one_line_l , one_line_r ) in enumerate ( zip ( * texts_after ) ) : if no_label : out_f . write ( one_line_l + '\t' + one_line_r + "\n" ) else : out_f . write ( label [ i ] + "\t" + one_line_l + '\t' + one_line_r + "\n" )