lib/classifier/bayes.rb in luisparravicini-classifier-1.3.8 vs lib/classifier/bayes.rb in luisparravicini-classifier-1.3.9
- old
+ new
@@ -129,8 +129,17 @@
def add_category(category)
@categories[prepare_category_name(category)] = Hash.new
end
alias append_category add_category
+
+ def marshal_dump
+ [@categories, @total_words, @options ]
+ end
+
+ def marshal_load(data)
+ @categories, @total_words, @options = data
+ end
+
end
end