Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25163/src/gui
Modified Files:
wxMsgCmdProc.cpp
Log Message:
1. renamed dspam.cpp to DspamFilter.cpp
2. moved built in heuristic headers-based spam filter to HeadersFilter
3. added SpamFilter::Train() and implemented it for dspam
4. renamed SpamFilter::ReclassifyAsSpam() to Reclassify(), added
DECLARE_SPAM_FILTER() macro and changed CheckIfSpam() to return a
string explaining why the message was deemed to be a spam
Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -b -u -2 -r1.57 -r1.58
--- wxMsgCmdProc.cpp 8 Jul 2004 15:23:12 -0000 1.57
+++ wxMsgCmdProc.cpp 10 Jul 2004 20:26:45 -0000 1.58
@@ -1001,5 +1001,5 @@
}
- SpamFilter::ReclassifyAsSpam(*msg, isSpam);
+ SpamFilter::Reclassify(*msg, isSpam);
}
@@ -1043,16 +1043,18 @@
}
- float prob = 1.;
String str(_("The message with subject \"%s\" from \"%s\"\n"));
- if ( SpamFilter::CheckIfSpam(*msg, &prob) )
+
+ wxArrayString params;
+ String result;
+ if ( SpamFilter::CheckIfSpam(*msg, params, &result) )
{
- wxLogWarning(str + _("seems to be a spam (probability: %0.3f)"),
+ wxLogWarning(str + _("seems to be a spam (%s)."),
msg->Subject().c_str(),
msg->From().c_str(),
- prob);
+ result.c_str());
}
else // !spam
{
- wxLogMessage(str + _("doesn't seem to be a spam"),
+ wxLogMessage(str + _("doesn't seem to be a spam."),
msg->Subject().c_str(),
msg->From().c_str());
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates