444501
This commit is contained in:
parent
dc23a5d26a
commit
cb3ad81655
5066
dev-0/out.tsv
5066
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
4990
dev-1/out.tsv
4990
dev-1/out.tsv
File diff suppressed because it is too large
Load Diff
10
run.py
10
run.py
@ -4,12 +4,14 @@ m = ['żona', 'żony', 'żonie', 'żoną', 'zona', 'zony', 'zonie', 'mecz', 'kom
|
||||
'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',
|
||||
'robota', 'cycki', 'sztanga', 'sztange', 'rychu', 'peja', 'czolg', 'czołg', 'korwin'
|
||||
'robota', 'cycki', 'sztanga', 'sztange', 'rychu', 'peja', 'czolg', 'czołg', 'korwin',
|
||||
'system', 'pc', 'pecet', 'wariat', 'wariacie', 'hd', 'hq', 'rozdzielczosc', 'rozdzielczość'
|
||||
]
|
||||
|
||||
|
||||
f = ['mąż', 'okres', 'ciąża', 'kocham', 'chłopak', 'torebka', 'torebke', 'podpaska', 'podpaski',
|
||||
'ciąża', 'ciąży', 'ciaza', 'ciazy', 'sukienka',
|
||||
'ciąża', 'ciąży', 'ciaza', 'ciazy', 'sukienka', 'obcasy', 'koleżanka', 'szminka', 'szminki',
|
||||
'ginekolog', 'ginekologa', 'porod', 'poród'
|
||||
]
|
||||
|
||||
|
||||
@ -17,8 +19,7 @@ def calculate(p_in, p_out):
|
||||
results = []
|
||||
with open(p_in, encoding='utf-8') as file:
|
||||
for line in file.readlines():
|
||||
line.replace('.', ' ')
|
||||
line.replace(',', ' ')
|
||||
line = line.replace('.', ' ').replace(',', ' ').lower()
|
||||
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])
|
||||
@ -32,7 +33,6 @@ def calculate(p_in, p_out):
|
||||
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')
|
||||
|
4090
test-A/out.tsv
4090
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user