From b5b355aa6e76fa2b104919c023b7eb0978fba3a4 Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 21 Aug 2020 23:55:04 +0200 Subject: [PATCH] readabilite: increase penalty for high link density --- morss/readabilite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/readabilite.py b/morss/readabilite.py index ba4ae9b..5f45231 100644 --- a/morss/readabilite.py +++ b/morss/readabilite.py @@ -125,7 +125,7 @@ def score_node(node): if wc != 0: wca = count_words(' '.join([x.text_content() for x in node.findall('.//a')])) - score = score * ( 1 - float(wca)/wc ) + score = score * ( 1 - 2 * float(wca)/wc ) return score