Fix model a little

This commit is contained in:
s426135 2020-03-22 12:14:52 +01:00
parent fa155b7a7e
commit 3bb3c26b5d
7 changed files with 579163 additions and 579158 deletions

Binary file not shown.

Binary file not shown.

View File

@ -47,6 +47,8 @@ def main():
#in_file = "dev-0/in.tsv"
out_file = "test-A/out.tsv"
#out_file = "dev-0/out.tsv"
print (f"in {in_file}")
print (f"out {out_file}")
with open(in_file) as in_f, open(out_file, 'w') as out_f:
for line in in_f:
hyp = calc_post_prob(line, paranormal_class_logprob, sceptic_class_logprob, word_logprobs)

View File

@ -10,6 +10,7 @@ def calc_class_logprob(expected_path):
sceptic_classcount=0
with open(expected_path) as f:
for line in f:
line = line.rstrip('\n').replace(' ','')
if 'P' in line:
paranolal_classcount +=1
elif 'S' in line:
@ -70,6 +71,8 @@ def main():
#expected = './dev-0/expected.tsv'
in_f = './train/in.tsv'
#in_f = './dev-0/in.tsv'
print (f"expected {expected}")
print (f"in {in_f}")
paranormal_class_lgprob, skeptic_class_logprob = calc_class_logprob(expected)
wordcounts =calc_word_count(in_f,expected)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

289579
train/expected.tsv_no Normal file

File diff suppressed because it is too large Load Diff