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

11 lines
285 B
Python

import sys
for line in sys.stdin:
ctx = line.split('\t')[6:]
if ctx[0].endswith('\n'):
print('The:0.7 A:0.2 :0.1')
elif ctx[0].endswith('.'):
print('The:0.9 :0.1')
else:
print('the:0.3 be:0.2 to:0.15 of:0.15 and:0.05 a:0.05 in:0.05 that:0.05')