Skip to content

Commit

Permalink
Fixes piskvorky#1828 , Tests Added
Browse files Browse the repository at this point in the history
  • Loading branch information
sj29-innovate committed Jan 9, 2018
1 parent 77409dd commit f1f65e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gensim/test/test_BM25.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def test_max_match_with_itself(self):
def test_nonnegative_weights(self):
""" All the weights for a partiular document should be non negative """
weights = get_bm25_weights(common_texts)
self.assertTrue(min(weights) >= 0)
for doc_weights in weights:
for weight in doc_weights:
self.assertTrue(weight >=0 )

def test_same_match_with_same_document(self):
""" A document should always get the same weight when matched with a particular document """
Expand Down

0 comments on commit f1f65e2

Please sign in to comment.