challenging-america-word-ga.../run.py

11 lines
321 B
Python
Raw Permalink Normal View History

2023-03-29 11:24:58 +02:00
import regex as re
import sys
for line in sys.stdin:
line = re.split(r'\t',line)
last_word = re.split(r'\s',line[6])[-1]
if(last_word == 'united'):
print('states:0.8 a:0.1 :0.1')
elif (last_word != 'the'):
print('the:0.6 a:0.3 :0.1')
else:
print('and:0.6 a:0.3 :0.1')