challenging-america-word-ga.../Untitled-1.ipynb
2023-03-29 11:28:42 +02:00

1.1 KiB

import random
import re
with open('test-A/in.tsv', 'r') as f_in:
    with open('test-A/out.tsv', 'w') as f_out:
        for line in f_in:
            v = random.choice(re.split(" |\n|\t", line)[50:])
            f_out.write(f'{v}:0.9 :0.1\n')