Which algorithm is commonly used to build a text classifier based on Bayes' theorem and the assumption of feature independence?