Naive bayes for text directories