version 1
This commit is contained in:
parent
b775a221e6
commit
03ad423d14
137314
dev-0/out.tsv
Normal file
137314
dev-0/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
156606
dev-1/out.tsv
Normal file
156606
dev-1/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
29
main.py
Normal file
29
main.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import random
|
||||||
|
|
||||||
|
man = ['em', 'ił']
|
||||||
|
woman = ['am', 'ła']
|
||||||
|
predictions = []
|
||||||
|
|
||||||
|
directory = 'dev-1'
|
||||||
|
with open(f'{directory}/in.tsv') as f:
|
||||||
|
data = f.readlines()
|
||||||
|
|
||||||
|
for text in data:
|
||||||
|
words = text.split()
|
||||||
|
result = 0
|
||||||
|
|
||||||
|
for word in words:
|
||||||
|
if word[-2:] in man:
|
||||||
|
result += 1
|
||||||
|
elif word[-2:] in woman:
|
||||||
|
result -= 1
|
||||||
|
|
||||||
|
if result == 0:
|
||||||
|
result = random.random() - 0.5
|
||||||
|
|
||||||
|
predictions.append('0\n' if result < 0 else '1\n')
|
||||||
|
|
||||||
|
with open(f'{directory}/out.tsv', 'w') as f:
|
||||||
|
f.writelines(predictions)
|
||||||
|
|
||||||
|
|
134618
test-A/out.tsv
Normal file
134618
test-A/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
3601424
train/out.tsv
Normal file
3601424
train/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user