You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/09/15 20:53:23 UTC

svn commit: r575957 - /spamassassin/trunk/masses/rule-dev/seek-phrases-in-log

Author: jm
Date: Sat Sep 15 11:53:23 2007
New Revision: 575957

URL: http://svn.apache.org/viewvc?rev=575957&view=rev
Log:
really avoid the already-processed patterns

Modified:
    spamassassin/trunk/masses/rule-dev/seek-phrases-in-log

Modified: spamassassin/trunk/masses/rule-dev/seek-phrases-in-log
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-dev/seek-phrases-in-log?rev=575957&r1=575956&r2=575957&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-dev/seek-phrases-in-log (original)
+++ spamassassin/trunk/masses/rule-dev/seek-phrases-in-log Sat Sep 15 11:53:23 2007
@@ -288,7 +288,8 @@
     foreach my $pat (@pats) {
       my $subsumed = 0;
       foreach my $done (@done_pats) {
-        if ($pat =~ /${done}/) { $subsumed=1; last; }
+        if ($pat eq $done || $pat =~ /\Q${done}\E/) { $subsumed=1; last; }
+	push @done_pats, $pat;
       }
       if (!$subsumed) { push @pats_new, $pat; }
     }
@@ -296,8 +297,6 @@
 
     # if we have no non-subsumed pats at this stage, skip this set
     next unless @pats;
-
-    push @done_pats, @pats;
 
     if (defined($hitratethresholds[0]) &&
         ($ngram_count{$id}*100) / $msg_count_spam < $hitratethresholds[0])