Re: patch to add classifying threshold
Jason Rennie <[email protected]> Fri, 30 Apr 2004 08:06:54 -0400
| Newsgroups | gmane.mail.ifile.general |
|---|---|
| Message-ID | <[email protected]> |
I made the patch and released 1.3.4. www.nongnu.org/ifile isn't reflecting the update yet. For the time being, you can get it from http://www.ai.mit.edu/~jrennie/tmp/ifile-1.3.4.tar.gz Jason On Thu, Apr 29, 2004 at 10:11:55AM +0200, 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 > [email protected] > http://mail.nongnu.org/mailman/listinfo/ifile-discuss