NAME

AI::Classifier::Japanese - the combination wrapper of Algorithm::NaiveBayes and Text::MeCab.

SYNOPSIS

use AI::Classifier::Japanese;

# Create new instance
my $classifier = AI::Classifier::Japanese->new();

# Add training text
$classifier->add_training_text("たのしい.楽しい!", 'positive');
$classifier->add_training_text("つらい.辛い!", 'negative');

# Train
$classifier->train;

# Test
my $result_ref = $classifier->predict("たのしい");
print $result_ref->{'positive'}; # => Confidence value

DESCRIPTION

AI::Classifier::Japanese is a Japanese-text category classifier module using Naive Bayes and MeCab. This module is based on Algorithm::NaiveBayes. Only noun, verb and adjective are currently supported.

METHODS

LICENSE

Copyright (C) Shinichi Goto.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Shinichi Goto <shingtgt @ GMAIL COM>