We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Spam Filter

Hello there. Is there anyone that can explain me how the training and the detection of spam is created in the Aspose spam filter module? Thanks in advance.

Hi Keeble,

Thank you for writing to Aspose support team.

Aspose.Email for .NET and Java, both have the feature of analyzing and determining messages as spam/ham (non-spam) using the Bayesian Spam Analyzer. I would request you to please go through our documentation article, Working with Baysian Spam Analyzer, to get sample code alongwith the explanation of how this works. Please feel free to write to us in case you have any additional query/inquiry in this regard.

Hi Kashif,


I’ve implemented the sample code for java and it works fine but i was wondering if it’s possible to tell me how the train filter and test function works, to determine the probability of an word to be considered spam. I’ve used the java decompiler on the aspose email jar but you guys named a lot of classes upon the letters of the alphabet.

Best regards

Hi Keeble,

The technique is based on the Bayesian analyzers that learn from various sample messages (spam and ham). Offcourse, we first have to train them on a set of spam and ham messages from which the algorithm developers weighted coefficients for determining messages as spam and ham. Are you not able to run the sample code that we have provided over the given article? Please note that you will need a set of Spam and Ham messages to train the filter first. Once done, then testing is done with the trained filter’s result in the previous stage. Please let us know if we can be of any additional help to you in this regard.

PS: The classes in Aspose.Email Jar are obfuscated and their details are not available to users like this.