(path, info, output)
| 28 | |
| 29 | |
| 30 | def write2file(path, info, output): |
| 31 | filereader = open(path, "w") |
| 32 | for sample_idx, sample in enumerate(output): |
| 33 | for word_idx, word in enumerate(sample): |
| 34 | filereader.writelines("{} 1 {:.2f} {:.2f} {}\n".format(info[sample_idx], word_idx * 1.0 / 100, |
| 35 | (word_idx + 1) * 1.0 / 100, word[0])) |