simple solution

This commit is contained in:
Jakub Adamski 2023-03-29 11:18:28 +02:00
parent 798d04eb15
commit 21ed054e66
4 changed files with 17960 additions and 0 deletions

3
.gitignore vendored
View File

@ -6,3 +6,6 @@
*.o
.DS_Store
.token
dev-0/in.tsv
test-A/in.tsv

10519
dev-0/out.tsv Normal file

File diff suppressed because it is too large Load Diff

24
simple.py Normal file
View File

@ -0,0 +1,24 @@
import random
most_popular_words = [
"be:0.5 and:0.2 of:0.1 :0.2",
"a:0.5 in:0.2 to:0.1 :0.2",
"have:0.5 too:0.2 it:0.1 :0.2",
"I:0.5 that:0.2 for:0.1 :0.2",
"you:0.5 he:0.2 with:0.1 :0.2",
"on:0.5 do:0.2 say:0.1 :0.2",
"this:0.5 they:0.2 at:0.1 :0.2",
"but:0.5 we:0.2 his:0.1 :0.2"
]
folder = "dev-0"
with open(folder + "/in.tsv", "r", encoding='utf-8') as in_file:
lines = in_file.readlines()
with open(folder + "/out.tsv", "w", encoding='utf-8') as out_file:
for line in lines:
out_file.write(random.choice(most_popular_words) + "\n")
# słowo:prawdopodobieństwo słowo:prawdopodobieństwo :prawdopodobieństwo-reszty słów
# "the:0.2 at:0.3 :0.1"

7414
test-A/out.tsv Normal file

File diff suppressed because it is too large Load Diff