ifile-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ifile-discuss] patch to add classifying threshold


From: xavier dutoit
Subject: Re: [Ifile-discuss] patch to add classifying threshold
Date: Thu, 29 Apr 2004 10:50:44 +0200
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Hi Paolo,

I did implement something roughly similar on my MDA, but outside of ifile (I take the first two lines of the standard output result and do the diff). Wasn't it possible to do that with procmail ?

Do you use more than two categories (spam, ham) ? In that case how do you deal this all the in-between categories (A, B, C, between A and B... between C and B), as all the possible combinations becomes quickly unmanagable, isn't it ?

BTW, I use fetchmail to take my emails from my accounts and I have a custom MDA (a shell script that uses ifile and writes the message into the proper Maildir with the proper name). It still beta and I'd like to add a few features. Anyone interested by a doc and the code ?

Xavier

P.S. The patch file Paolo mention is downloadable at
http://savannah.nongnu.org/patch/?func=detailitem&item_id=2990

Paolo wrote:

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 mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/ifile-discuss





reply via email to

[Prev in Thread] Current Thread [Next in Thread]