AI-Categorizer
view release on metacpan or search on metacpan
lib/AI/Categorizer/Document.pm view on Meta::CPAN
words.
=back
The default value is C<stem>, which seems to produce the best results
in most cases I've tried. I'm not aware of any studies comparing the
C<no_stem> behavior to the C<stem> behavior in the general case.
This parameter has no effect if there are no stopwords being used, or
if stemming is not being used. In the latter case, the list of
stopwords will always be matched as-is against the document words.
Note that if the C<stem> option is used, the data structure passed as
the C<stopwords> parameter will be modified in-place to contain the
stemmed versions of the stopwords supplied.
=back
=item read( path =E<gt> $path )
An alternative constructor method which reads a file on disk and
returns a document with that file's contents.
=item parse( content =E<gt> $content )
=item name()
Returns this document's C<name> property as specified when the
document was created.
=item features()
Returns the Feature Vector associated with this document.
=item categories()
In a list context, returns a list of Category objects to which this
document belongs. In a scalar context, returns the number of such
categories.
=item create_feature_vector()
Creates this document's Feature Vector by parsing its content. You
won't call this method directly, it's called by C<new()>.
=back
=head1 AUTHOR
Ken Williams <ken@mathforum.org>
=head1 COPYRIGHT
This distribution is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. These terms apply to
every file in the distribution - if you have questions, please contact
the author.
=cut
( run in 0.565 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )