# File lib/classifier/bayes.rb, line 41 def untrain(category, text) category = category.prepare_category_name text.word_hash.each do |word, count| if @total_words >= 0 orig = @categories[category][word] @categories[category][word] ||= 0 @categories[category][word] -= count if @categories[category][word] <= 0 @categories[category].delete(word) count = orig end @total_words -= count end end end