444501
This commit is contained in:
parent
b775a221e6
commit
609ff2f6f1
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
35
run.py
Normal file
35
run.py
Normal file
@ -0,0 +1,35 @@
|
||||
m = ['żona', 'żony', 'żonie', 'żoną', 'zona', 'zony', 'zonie', 'mecz', 'komputer', 'serwer',
|
||||
'ziomek', 'ziom', 'ziomków', 'ziomkow', 'kumpel', 'kolega', 'kolegą', 'kolegi'
|
||||
'lagi', 'gram', 'gra', 'gry', 'diablo', 'wowa', 'tibia', 'tibie', 'samochód', 'samochod', 'auto', 'felga', 'felgi',
|
||||
'bmw', 'audi', 'passat', 'informatyka', 'informatykę', 'polibuda', 'polibudzie', 'politechnika', 'politechnice',
|
||||
'piwo', 'laska', 'laseczka', 'laseczki', 'dziewczynie', 'siema', 'elo', 'yo', 'spadam', 'windows',
|
||||
'linux', 'sterowniki', 'silka', 'siłka', 'wyciskam', 'klate', 'paliwo', 'paliwa', 'lv', 'eq',
|
||||
]
|
||||
|
||||
|
||||
f = ['mąż', 'okres', 'ciąża', 'kocham', 'chłopak', 'torebka', 'torebke', 'podpaska', 'podpaski',
|
||||
'ciąża', 'ciąży', 'ciaza', 'ciazy', 'sukienka',
|
||||
]
|
||||
|
||||
|
||||
def calculate(p_in, p_out):
|
||||
results = []
|
||||
with open(p_in, encoding='utf-8') as file:
|
||||
for line in file.readlines():
|
||||
words = line.split()
|
||||
m_score = len([w for w in words if w in m])
|
||||
f_score = len([w for w in words if w in f])
|
||||
|
||||
if m_score > f_score:
|
||||
results.append('1')
|
||||
else:
|
||||
results.append('0')
|
||||
|
||||
with open(p_out, 'w') as file:
|
||||
for r in results:
|
||||
file.write(r + '\n')
|
||||
|
||||
|
||||
calculate('dev-0/in.tsv', 'dev-0/out.tsv')
|
||||
calculate('dev-1/in.tsv', 'dev-1/out.tsv')
|
||||
calculate('test-A/in.tsv', 'test-A/out.tsv')
|
134618
test-A/out.tsv
Normal file
134618
test-A/out.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user