Naive Bayes classifier for text documents