From dc702de28708bffca16a21a9e3dcd3d812214c72 Mon Sep 17 00:00:00 2001 From: samyak jain Date: Mon, 8 Jan 2018 19:19:04 +0530 Subject: [PATCH] Fixes #1828 --- gensim/summarization/bm25.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/summarization/bm25.py b/gensim/summarization/bm25.py index b287cdd48d..6cf7e8a043 100644 --- a/gensim/summarization/bm25.py +++ b/gensim/summarization/bm25.py @@ -85,7 +85,7 @@ def initialize(self): """Calculates frequencies of terms in documents and in corpus. Also computes inverse document frequencies.""" for document in self.corpus: frequencies = {} - doc_length.append(len(document)) + (self.doc_length).append(len(document)) for word in document: if word not in frequencies: frequencies[word] = 0