Class SpamAnalyzer

SpamAnalyzer class

Class which allows applications to detect spam e-mails with self-learning Bayesian filter.

public class SpamAnalyzer

Constructors

NameDescription
SpamAnalyzer()Initialize a new instance of the SpamAnalyzer class.
SpamAnalyzer(Stream)Initialize a new instance of the SpamAnalyzer class.
SpamAnalyzer(string)Initialize a new instance of the SpamAnalyzer class.

Methods

NameDescription
LoadDatabase(Stream)Loads Bayesian database from stream.
LoadDatabase(string)Loads Bayesian database from file.
Reset()Clears all statistics (Bayesian database).
SaveDatabase(Stream)Saves the Bayesian database to stream.
SaveDatabase(string)Saves the Bayesian database to file.
Test(MailMessage)Analyses the message and returns the probability of the message being spam.
TrainFilter(MailMessage, bool)Learns from the specified message as from spam or non-spam source.
TrainFilter(MailMessage[], MailMessage[])Learns from the specified messages as from spam or non-spam source.
TrainFilter(string, bool)Learns from the specified string as from spam or non-spam source.

See Also