Skip to content

Commit

Permalink
Consistent ordering of keyword & score
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeCowton committed Jul 7, 2022
1 parent 4f82feb commit 16698b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yake/yake.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def extract_keywords(self, text):
todedup = sorted([cc for cc in dc.candidates.values() if cc.isValid()], key=lambda c: c.H)

if self.dedupLim >= 1.:
return ([ (cand.H, cand.unique_kw) for cand in todedup])[:self.top]
return ([ (cand.unique_kw, cand.H) for cand in todedup])[:self.top]

for cand in todedup:
toadd = True
Expand Down

0 comments on commit 16698b9

Please sign in to comment.