my brilliant solution
This commit is contained in:
commit
331a2ba38c
|
@ -0,0 +1,8 @@
|
|||
|
||||
*~
|
||||
*.swp
|
||||
*.bak
|
||||
*.pyc
|
||||
*.o
|
||||
.DS_Store
|
||||
.token
|
|
@ -0,0 +1,9 @@
|
|||
Challenging America word-gap prediction
|
||||
===================================
|
||||
|
||||
Guess a word in a gap.
|
||||
|
||||
Evaluation metric
|
||||
-----------------
|
||||
|
||||
LikelihoodHashed is the metric
|
|
@ -0,0 +1 @@
|
|||
--metric PerplexityHashed --precision 2 --in-header in-header.tsv --out-header out-header.tsv
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
FileId Year LeftContext RightContext
|
|
|
@ -0,0 +1 @@
|
|||
Word
|
|
|
@ -0,0 +1,15 @@
|
|||
import lzma
|
||||
with lzma.open('dev-0/in.tsv.xz', 'r') as file:
|
||||
for line in file:
|
||||
line = line.decode("utf-8")
|
||||
line = line.strip()
|
||||
if 'I\t' in line:
|
||||
print('am:0.9 :0.1')
|
||||
elif 'you\t' in line:
|
||||
print('are:0.9 :0.1')
|
||||
elif 'he\t' in line:
|
||||
print('is:0.9 :0.1')
|
||||
elif 'she\t' in line:
|
||||
print('is:0.9 :0.1')
|
||||
else:
|
||||
print('the:0.5 a:0.3 :0.2')
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in New Issue