Introduction - If you have any usage issues, please Google them yourself
The code above does a couple things. First it takes in two lists of strings (SetA being Spam and SetB being Ham). These lists would be individual words from the messages (although you can do phrases, word pairs, etc.).