Rand distribs

This commit is contained in:
Jakub Kaczmarek 2023-03-29 11:30:41 +02:00
parent 3df67eafac
commit 91d85e28d6
2 changed files with 10531 additions and 10525 deletions

File diff suppressed because it is too large Load Diff

18
lm0.py
View File

@ -1,11 +1,17 @@
import sys
import random
distribs = [
'a:0.6 the:0.2 :0.2',
'the:0.7 a:0.2 :0.1',
'the:0.9 :0.1',
'in:0.3 of:0.2 to:0.15 and:0.15 a:0.05 the:0.05 be:0.05 :0.05',
'the:0.3 be:0.2 to:0.15 of:0.15 and:0.05 a:0.05 in:0.05 :0.05',
'of:0.3 in:0.2 to:0.15 and:0.15 a:0.05 the:0.05 be:0.05 :0.05'
]
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 :0.05')
i = random.randint(0, len(distribs) - 1)
print(distribs[i])