From 596646c2726e3d43495f4a4ea3fca44921414bc7 Mon Sep 17 00:00:00 2001 From: Andrew Champion Date: Fri, 11 May 2018 12:29:26 -0700 Subject: [PATCH] Correct sentence position scoring --- textteaser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textteaser/parser.py b/textteaser/parser.py index 0c8f16d..dca8faf 100644 --- a/textteaser/parser.py +++ b/textteaser/parser.py @@ -25,7 +25,7 @@ def getSentenceLengthScore(self, sentence): # Jagadeesh, J., Pingali, P., & Varma, V. (2005). Sentence Extraction Based Single Document Summarization. International Institute of Information Technology, Hyderabad, India, 5. def getSentencePositionScore(self, i, sentenceCount): - normalized = i / (sentenceCount * 1.0) + normalized = (i + 1) / (sentenceCount * 1.0) if normalized > 0 and normalized <= 0.1: return 0.17