Browse Source

WikiProjectTagger: Fix auto-assess when no current assessments.

tags/v0.3
Ben Kurtovic 8 years ago
parent
commit
cc574cec6d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      earwigbot/tasks/wikiproject_tagger.py

+ 2
- 2
earwigbot/tasks/wikiproject_tagger.py View File

@@ -350,8 +350,8 @@ class WikiProjectTagger(Task):
classes[value] += 1

values = tuple(classes.values())
if values:
best = max(values)
best = max(values)
if best:
confidence = float(best) / sum(values)
if confidence > 0.75:
rank = tuple(classes.keys())[values.index(best)]


Loading…
Cancel
Save