readabilite: increase penalty for high link density
parent
94097f481a
commit
b5b355aa6e
|
@ -125,7 +125,7 @@ def score_node(node):
|
||||||
|
|
||||||
if wc != 0:
|
if wc != 0:
|
||||||
wca = count_words(' '.join([x.text_content() for x in node.findall('.//a')]))
|
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
|
return score
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue