commit dbabe168c3e776125d82aab8033ea790976a5a1a Author: aboelhamd Date: Sat Apr 20 13:42:11 2019 +0200 modify score-sentences script diff --git a/score-sentences.py b/score-sentences.py index 7c916f8..c73a384 100644 --- a/score-sentences.py +++ b/score-sentences.py @@ -13,3 +13,6 @@ model = kenlm.LanguageModel(sys.argv[1]) for sentence in targetfile: weightfile.write('%f\n' % (1.0/model.score(sentence))) + +targetfile.close() +weightfile.close()