You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2010/01/31 03:15:27 UTC
svn commit: r904953 -
/spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores
Author: dos
Date: Sun Jan 31 02:15:26 2010
New Revision: 904953
URL: http://svn.apache.org/viewvc?rev=904953&view=rev
Log:
fix typo that limited epoch num config to 1 digit; more verbose/useful file I/O debugging
Modified:
spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores
Modified: spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores?rev=904953&r1=904952&r2=904953&view=diff
==============================================================================
--- spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores (original)
+++ spamassassin/trunk/rulesrc/sandbox/dos/new-rule-score-gen/extract-new-scores Sun Jan 31 02:15:26 2010
@@ -38,16 +38,15 @@
$scoreset = $1 if /^\s*SCORESET=(\d)\s*$/;
$ham_pref = $1 if /^\s*HAM_PREFERENCE=([\d.-]+)/;
$threshold = $1 if /^\s*THRESHOLD=([\d.-]+)/;
- $epochs = $1 if /^\s*EPOCHS=(\d)\s*$/;
+ $epochs = $1 if /^\s*EPOCHS=(\d+)\s*$/;
$note = "-$1" if /^\s*NOTE=(.+)$/;
-
-
}
close CONFIG;
print "Removing scores for base release rules from newly generated scores\n";
-open(ORIG, "../rules/50_scores.cf") or die "Cannot open original score file: $!";
+open(ORIG, "../rules/50_scores.cf") or
+ die "Cannot open original score file (../rules/50_scores.cf): $!";
while(<ORIG>) {
if (/^score\s+(\S+)/) {
$original_rules{$1} = undef;
@@ -55,9 +54,12 @@
}
close ORIG;
+print "extract-new-scores using gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores\n";
-open(ORIG, "gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores") or die "Cannot open original scores file: $!";
-open(NEW, ">gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores-new") or die "Cannot open scores-new file: $!";
+open(ORIG, "gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores") or
+ die "Cannot open gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores: $!";
+open(NEW, ">gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores-new") or
+ die "Cannot open gen-set$scoreset-$ham_pref-$threshold-$epochs-ga$note/scores-new: $!";
while (<ORIG>) {
if (/^score\s+(\S+)/) {
next if exists $original_rules{$1};