most_common_from_train

This commit is contained in:
kubapok 2021-11-08 14:12:12 +01:00
parent 8abd7178b4
commit b4b1807c63
3 changed files with 101856 additions and 101845 deletions

101584
dev-0/out.tsv

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
import pandas as pd
r_out = pd.read_csv('../train/expected.tsv', names = ('class',))
most_common = r_out['class'].value_counts().idxmax()
for dataset in 'dev-0', 'test-A':
with open(f'../{dataset}/out.tsv', 'w') as f_out, open(f'../{dataset}/in.tsv', 'r') as f_in:
for line_in in f_in:
f_out.write(most_common + '\n')

File diff suppressed because it is too large Load Diff