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.
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.