- or download this
my $positive = {
word1 => 2,
...
word4 => 3,
word5 => 1,
};
- or download this
my $categorizer = Algorithm::NaiveBayes->new;
...
label => 'negative');
$categorizer->train;
- or download this
my $sentence1 = {
wordA => 2,
...
elsif ($probability->{'negative'} > 0.5) {
# sentence1 probably negative
}