def classifications(text)
      score = {}
      word_hash = Hasher.word_hash(text, @enable_stemmer,
                                   tokenizer: @tokenizer, token_filters: @token_filters)
      if word_hash.empty?
        category_keys.each do |category|
          score[category.to_s] = Float::INFINITY
        end
        return score
      end
      category_keys.each do |category|
        score[category.to_s] = 0
        total = (@backend.category_word_count(category) || 1).to_f
        word_hash.each do |word, _count|
          s = @backend.word_in_category?(category, word) ? @backend.category_word_frequency(category, word) : 0.1
          score[category.to_s] += Math.log(s / total)
        end
        # now add prior probability for the category
        s = @backend.category_has_trainings?(category) ? @backend.category_training_count(category) : 0.1
        score[category.to_s] += Math.log(s / @backend.total_trainings.to_f)
      end
      score
    end
def classifications(text)
      score = {}
      word_hash = Hasher.word_hash(text, @enable_stemmer,
                                   tokenizer: @tokenizer, token_filters: @token_filters)
      if word_hash.empty?
        category_keys.each do |category|
          score[category.to_s] = Float::INFINITY
        end
        return score
      end
      category_keys.each do |category|
        score[category.to_s] = 0
        total = (@backend.category_word_count(category) || 1).to_f
        word_hash.each do |word, _count|
          s = @backend.word_in_category?(category, word) ? @backend.category_word_frequency(category, word) : 0.1
          score[category.to_s] += Math.log(s / total)
        end
        # now add prior probability for the category
        s = @backend.category_has_trainings?(category) ? @backend.category_training_count(category) : 0.1
        score[category.to_s] += Math.log(s / @backend.total_trainings.to_f)
      end
      score
    end
Returns the scores in each category the provided +text+. E.g.,
    b.classifications "I hate bad words and you"
    =>  {"Uninteresting"=>-12.6997928013932, "Interesting"=>-18.4206807439524}
 The largest of these scores (the one closest to 0) is the one picked out by #classify