NAME
AI::CRM114 - Wrapper for the statistical data classifier CRM114
SYNOPSIS
use
AI::CRM114;
my
$crm
= AI::CRM114->new(
cmd
=>
'/path/to/crm'
);
# Learn new text
$crm
->learn([
'osb'
],
'spam.css'
,
'MAKE MONEY FAST'
);
# Classify some text
my
$class
=
$crm
->classify([
'osb'
], [
'a.css'
,
'b.css'
],
$text
);
DESCRIPTION
The CRM114 Discriminator, is a collection of tools to classify data, e.g. for use in spam filters. This module is a simple wrapper around the command line executable. Feedback is very welcome, the interface is unstable. Use with caution.
METHODS
- AI::CRM114->new(%options)
-
Creates a new instance of this class. The following options are available:
- $crm->learn(\@flags, $file, $text)
-
Learn that the text belongs to the file using the specified flags. Permissable flags are specified in the
QUICKREF.txt
file that comes with CRM114. Examples includewinnow
,microgroom
, andosbf
. - classify(\@flags, \@files, $text)
-
Attempt to correlate the text to one of the files using the specified flags. Permissable flags are specified in the
QUICKREF.txt
file that comes with CRM114. Examples includeunique
,fscm
, andsvm
.In scalar context, returns the path of the best matching file. In list context, returns a list containing the path of the best file, and the probability and pR values as reported in
(:stats:)
.
SEE ALSO
AUTHOR / COPYRIGHT / LICENSE
Copyright (c) 2009 Bjoern Hoehrmann <bjoern
@hoehrmann
.de>.
This module is licensed under the same terms as Perl itself.