Permalink
Browse files

Fixed a <= 5.10 bug

Fixed changes file
Fixed version number in dist.ini
  • Loading branch information...
1 parent 9adb080 commit d244fec63a319539d5f639bf71a4029e2b76159b @logie17 committed Apr 5, 2012
Showing with 6 additions and 3 deletions.
  1. +4 −1 Changes
  2. +1 −1 dist.ini
  3. +1 −1 lib/Data/Classifier/NaiveBayes.pm
View
@@ -1,4 +1,7 @@
-Revision history for Catalyst::Model::Lucy
+Revision history for Data-Classifier-NaiveBayes
0.001 02 April 2012
- initial release
+
+0.002 02 April 2012
+ - Fixed some minor documentation errors.
View
@@ -3,7 +3,7 @@ author = Data-Classifier-NaiveBayes <logie@cpan.org>
license = Perl_5
copyright_holder = Logan Bell
copyright_year = 2012
-version = 0.002
+version = 0.001
abstract = Naive Bayes Classifier
[@Basic]
@@ -103,7 +103,7 @@ sub _word_weighted_average {
# count the number of times this word has appeared in all
# categories
- my $totals = sum map { $self->_word_count($word, $_) } keys $self->categories;
+ my $totals = sum map { $self->_word_count($word, $_) } keys %{$self->categories};
# the final weighted average
return ($weight * $assumed_prob + $totals * $basic_prob) / ($weight + $totals);

0 comments on commit d244fec

Please sign in to comment.