paranormal-or-skeptic/stupidsolution.py
2020-03-29 15:13:38 +02:00

20 lines
504 B
Python

import csv
def makeoutput(infile, outfile):
counter = 0
with open(infile) as tsvfile:
reader = csv.reader(tsvfile, delimiter='\t')
for row in reader:
counter+=1
with open(outfile, 'wt') as tsvfile:
tsv_writer = csv.writer(tsvfile, delimiter='\t')
for i in range(counter):
tsv_writer.writerow('S')
makeoutput("test-A/in.tsv", "test-A/out.tsv")
makeoutput("train/in.tsv", "train/out.tsv")
makeoutput("dev-0/in.tsv", "dev-0/out.tsv")