Fixed problem with KeyError

This commit is contained in:
Bartusiak 2020-03-31 14:41:37 +02:00
parent c6dff78d16
commit 5d7f903e18
3 changed files with 1058174 additions and 124638 deletions

View File

@ -10,7 +10,6 @@ paranomal_class_logprob, skeptic_class_logprob, word_logprobs = pickle_loaded
#Niektórych słów nie bezie w zbiorze treningowym dev-0 i dev-A
for i in word_logprobs.keys():
for token, tokens in word_logprobs[i].items():
if token in word_logprobs['skeptic'] and word_logprobs['paranormal']:
try:
if (word_logprobs['skeptic'][token] > word_logprobs['paranormal'][token]):
write_file_test.write("S\n")
@ -19,4 +18,5 @@ for i in word_logprobs.keys():
write_file_test.write("P\n")
write_file_dev.write("P\n")
except KeyError:
print(token + " not avaible")
write_file_dev.write("N\n")
write_file_test.write("N\n")

591396
dev-0/out.tsv

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff