Simple text classifier using Bayes rules