[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ifile-discuss] patch to add classifying threshold
From: |
Paolo |
Subject: |
[Ifile-discuss] patch to add classifying threshold |
Date: |
Thu, 29 Apr 2004 10:11:55 +0200 |
User-agent: |
Mutt/1.3.28i |
Hi all,
seems that ifile dev has stopped a while ago... anyone still using it?
well, for those interested, I've submitted a patch to add an 'in-between'
response, ie, from patch description:
"this patch adds a -T x (--threshold) option, such that when you classify
and have at least 2 classes - eg spam,ham - for the top 2 ratings,
if x>0 you get:
ifile -T 20 -q msg
Reading message from standard input...
spam -78,04470873
ham -79,89371347
diff[spam,ham](%) 1,17
and get an 'in between' response for the -q -c mode, if
R=(rating0-rating1)/(rating0+rating1), R*1000 < x:
[note the added comment for this ^^^ in patch browser]
ifile -q -c -T 20 msg
spam,ham
ie 20 means 2% threshold."
So eg you'd use a procmail(1) rules snippet like:
...
:0w
CLASS=| [filterchain] | ifile $IFOPTS -q -c -T 20
:0:
* CLASS ?? spam
spam
:0:
* CLASS ?? ham
ham
:0:
* CLASS ?? spam,ham
maybe-spam
:0:
* CLASS ?? ham,spam
maybe-ham
:0:
class-errors
hope this is useful to somebody (as it is 4 me).
-- paolo
GPG/PGP id:0x21426690 kfp:EDFB 0103 A8D8 4180 8AB5 D59E 9771 0F28 2142 6690
- [Ifile-discuss] patch to add classifying threshold,
Paolo <=