utils_6.py 271 B

123456789
  1. def write_to_ner(cls, ner_data, save_file):
  2. """
  3. :param cls:
  4. :param ner_data:
  5. :param save_file:
  6. :return:
  7. """
  8. with open(save_file, 'w', encoding='utf-8') as f:
  9. f.writelines("\n".join(["\t".join(str(r) for r in row) for row in ner_data]))