Bladeren bron

Fix generating -0.0 as a confidence value.

tags/v0.2
Ben Kurtovic 10 jaren geleden
bovenliggende
commit
c2a5946874
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +2
    -2
      earwigbot/wiki/copyvios/workers.py

+ 2
- 2
earwigbot/wiki/copyvios/workers.py Bestand weergeven

@@ -288,8 +288,8 @@ class CopyvioWorkspace(object):
return (delta - 50) / delta

d_size = float(delta.size)
return max(conf_with_article_and_delta(self._article.size, d_size),
conf_with_delta(d_size), 0.0)
return abs(conf_with_article_and_delta(self._article.size, d_size),
conf_with_delta(d_size))

def _finish_early(self):
"""Finish handling links prematurely (if we've hit min_confidence)."""


Laden…
Annuleren
Opslaan