The classifier is a Naive Bayes classifier. To break it down, Naive in the phrase Naive Bayes means that we are assuming that all the input features are independent. To understand how the classifier works, an additional component needs to be introduced first: the term frequency-inverse frequency (TF-IF) pair of statistics.
Naive Bayes
TF-IDF
TF-IDF, per its namesake, is comprised of two statistics: term frequency (TF) and inverse document frequency (IDF).
The central thesis to TF is that if a word (called a term) occurs many times in a document, it means that the document revolves more around that word. It makes sense; look at your emails. The keywords typically revolve around a central topic. But TF is a lot more simplistic...