bigram v3

This commit is contained in:
Adam Wojdyla 2023-04-10 16:39:49 +02:00
parent bfb17aba53
commit b2c65961d8
3 changed files with 7416 additions and 432034 deletions

3
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.o
.DS_Store
.token
solution.py
solution_bigram.py
solution.ipynb
.vscode
in.tsv

View File

@ -1,11 +0,0 @@
import sys
file = sys.argv[1]
with open(file, encoding='utf-8') as f1, open('out.tsv', 'w', encoding='utf-8') as f2:
for line in f1:
line = line.split('\t')
if line[-1][0].isupper():
f2.write('the:0.9 :0.1\n')
else:
f2.write('the:0.4 a:0.4 :0.2\n')

File diff suppressed because it is too large Load Diff