A Python version of mine of Simple Naive Bayes Classifier PHP