Algorithm-Classifier-NaiveBayes
view release on metacpan or search on metacpan
lib/Algorithm/Classifier/NaiveBayes.pm view on Meta::CPAN
'class_counts' => {},
'token_counts' => {},
'class_totals' => {},
'tokens' => {},
'total_docs' => 0,
'lc_tokens' => defined( $args{'lc_tokens'} ) ? $args{'lc_tokens'} : 1,
'token_splitter' => defined( $args{'token_splitter'} ) ? $args{'token_splitter'} : '\s+',
'stop_regex' => $args{'stop_regex'},
},
};
bless $self, $pkg;
return $self;
} ## end sub new
=head2 tokenize
Tokenizes the specified string. This is used internally by train,
untrain, and classify, but may also be called directly to see how a
string will be broken up.
( run in 0.449 second using v1.01-cache-2.11-cpan-0b5f733616e )