From 755dff9714face6787b91386e4c7f547307f42b1 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 18 Feb 2012 15:23:10 -0500 Subject: [PATCH] Copyvios: auto-fail very small articles (< 20 chain links) --- earwigbot/wiki/copyright.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/earwigbot/wiki/copyright.py b/earwigbot/wiki/copyright.py index 58fdcfb..0108dab 100644 --- a/earwigbot/wiki/copyright.py +++ b/earwigbot/wiki/copyright.py @@ -241,6 +241,10 @@ class CopyrightMixin(object): article_chain = _MarkovChain(clean) last_query = time() + if article_chain.size() < 20: # Auto-fail very small articles + return _CopyvioCheckResult(False, best_confidence, best_match, + num_queries, article_chain, best_chains) + while (chunks and best_confidence < min_confidence and (max_queries < 0 or num_queries < max_queries)): urls = search(chunks.pop(0))