A generic Redis-backed NaiveBayes implementation