Skip to content

Commit

Permalink
Adding more tests to keywords_test in `test_keep_largest_overlapped_k…
Browse files Browse the repository at this point in the history
…eywords`
  • Loading branch information
ahmednasserswe committed Aug 21, 2024
1 parent 85b938e commit 794e41b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/lib/model/test_yake_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def test_run_yake_real(self):
results = self.yake_model.run_yake(**self.yake_model.get_params(message))
self.assertEqual(results, {"keywords": [('love Meedan', 0.0013670273525686505)]})
def test_keep_largest_overlapped_keywords(self):
keywords_test = [('Alegre',0), ('AlegreAlegre', 0), ('Alegre Alegre', 0), ("Presto", 0)]
expected = [('AlegreAlegre', 0), ('Alegre Alegre', 0), ('Presto', 0)]
keywords_test = [('Alegre', 0),('Alegre', 0),('Timpani', 0), ('Presto Timpani', 0), ('AlegreAlegre', 0), ('Alegre Alegre', 0), ("Presto", 0)]
expected = [('Presto Timpani', 0), ('AlegreAlegre', 0), ('Alegre Alegre', 0)]
self.assertEqual(self.yake_model.keep_largest_overlapped_keywords(keywords_test), expected)
def test_get_params_with_defaults(self):
message = schemas.parse_message({
Expand Down

0 comments on commit 794e41b

Please sign in to comment.