rem: ".  $Revision: 1.1 $  $Header: /tmp/bonefish/open-beos/current/src/apps/bin/spamfilter.cpp,v 1.1 2004/11/12 02:55:04 nwhitehorn Exp $");
add: ".  $Revision: 1.2 $  $Header: /tmp/bonefish/open-beos/current/src/apps/bin/spamfilter.cpp,v 1.2 2004/12/07 01:14:05 nwhitehorn Exp $");
context: ostream& PrintUsage (ostream& OutputStream){  struct property_info *PropInfoPntr;  OutputStream << "\nAGMSBayesianSpamServer - A Spam Database Server\n";  OutputStream << "Copyright © 2002 by Alexander G. M. Smith.  ";  OutputStream << "Released to the public domain.\n\n";  WrapTextToStream (OutputStream, "Compiled on " __DATE__ " at " __TIME__".  $Revision: 1.1 $  $Header: /tmp/bonefish/open-beos/current/src/apps/bin/spamfilter.cpp,v 1.1 2004/11/12 02:55:04 nwhitehorn Exp $");  OutputStream << "\n""This is a program for classifying e-mail messages as spam (junk mail which\n""you don't want to read) and regular genuine messages.  It can learn what's\n""spam and what's genuine.  You just give it a bunch of spam messages and a\n""bunch of non-spam ones.  It uses them to make a list of the words from the\n""messages with the probability that each word is from a spam message or from\n""a genuine message.  Later on, it can use those probabilities to classify\n""new messages as spam or not spam.  If the classifier stops working well\n""(because the spammers have changed their writing style and vocabulary, or\n""your regular correspondants are writing like spammers), you can use this\n""program to update the list of words to identify the new messages\n""correctly.\n""\n""The original idea was from Paul Graham's algorithm, which has an excellent\n""writeup at: http://www.paulgraham.com/spam.html\n""\n""Gary Robinson came up with the improved algorithm, which you can read about at:\n""http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html\n""\n""Then he, Tim Peters and the SpamBayes mailing list developed the Chi-Squared\n""test, see http://mail.python.org/pipermail/spambayes/2002-October/001036.html\n""for one of the earlier messages leading from the central limit theorem to\n""the current chi-squared scoring method.\n""\n""Thanks go to Isaac Yonemoto for providing a better icon, which we can\n""unfortunately no longer use, since the Hormel company wants people to\n""avoid associating their meat product with junk e-mail.\n""\n""Usage: Specify the operation as the first argument followed by more\n""information as appropriate.  The program's configuration will affect the\n""actual operation (things like the name of the database file to use, or\n""whether it should allow non-email messages to be added).  In command line\n""mode it will do the operation and exit.  In GUI/server mode a command line\n""invocation will just send the command to the running server.  You can also\n""use BeOS scripting (see the \"Hey\" command which you can get from\n""http://www.bebits.com/app/2042 ) to control the Spam server.  And finally,\n""there's also a GUI interface which shows up if you start it without any\n""command line arguments.\n""\n""Commands:\n""\n""Quit\n""Stop the program.  Useful if it's running as a server.\n""\n";  /* Go through all our scripting commands and add a description of each one to  the usage text. */  for (PropInfoPntr = g_ScriptingPropertyList + 0;  PropInfoPntr->name != 0;  PropInfoPntr++)  {    switch (PropInfoPntr->commands[0])    {      case B_GET_PROPERTY:        OutputStream << "Get " << PropInfoPntr->name << endl;        break;      case B_SET_PROPERTY:        OutputStream << "Set " << PropInfoPntr->name << " NewValue" << endl;        break;      case B_COUNT_PROPERTIES:        OutputStream << "Count " << PropInfoPntr->name << endl;        break;      case B_CREATE_PROPERTY:        OutputStream << "Create " << PropInfoPntr->name << endl;        break;      case B_DELETE_PROPERTY:        OutputStream << "Delete " << PropInfoPntr->name << endl;        break;      case B_EXECUTE_PROPERTY:        OutputStream << PropInfoPntr->name << endl;        break;      default:        OutputStream << "Buggy Command: " << PropInfoPntr->name << endl;        break;    }    WrapTextToStream (OutputStream, PropInfoPntr->usage);    OutputStream << endl;  }  return OutputStream;}