From eef1965dcc0281ff5a0cf7bba05b6b79f79efaa0 Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 26 Aug 2014 00:18:28 +0200 Subject: [PATCH] reduce cutoff weight for prettier descriptions? --- mlpccg/DeckList.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mlpccg/DeckList.py b/mlpccg/DeckList.py index 0e0cba1..415c91d 100644 --- a/mlpccg/DeckList.py +++ b/mlpccg/DeckList.py @@ -35,13 +35,12 @@ class DeckList: aspects_sorted = sorted(aspects.iteritems(), reverse=True, key=operator.itemgetter(1)) aspects_sum = float(sum([aspect[1] for aspect in aspects_sorted])) aspects_filtered = [] - cutoff = 0.66 + cutoff = 0.5 amount = 0.0 for aspect, value in aspects_sorted: amount += value / aspects_sum - if amount < cutoff: - aspects_filtered += [aspect] - else: + aspects_filtered += [aspect] + if amount >= cutoff: break return (mane, aspects_filtered) -- 2.20.1