fixes to not infinity and not the same lines

This commit is contained in:
Wirus006 2023-03-29 12:31:19 +02:00
parent ebe71330aa
commit 6e70850572
3 changed files with 1084 additions and 1068 deletions

File diff suppressed because it is too large Load Diff

18
run.py
View File

@ -1,4 +1,20 @@
#!/usr/bin/python3
import sys
for line in sys.stdin:
print('the:0.6 a:0.3 :01')
spitted_line = line.split('\t')
left_context = spitted_line[6]
right_context = spitted_line[7]
left_context_words = left_context.split(' ')
right_context_words = right_context.split(' ')
# print(left_context_words)
# print()
# print(right_context_words)
if left_context_words[-1] == 'At' or left_context_words[-1] == 'at':
print('first:0.6 which:0.3 :01')
elif left_context_words[-1] == 'the':
print('it:0.5 a:0.4 :01')
elif left_context_words[-1] == 'a':
print('the:0.7 it:0.2 :01')
else:
print('the:0.6 a:0.3 :01')

File diff suppressed because it is too large Load Diff