GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AI::CATEGORIZER::CATEGORY (3)

.ds Aq ’

NAME

AI::Categorizer::Category - A named category of documents

CONTENTS

SYNOPSIS



  my $category = AI::Categorizer::Category->by_name("sports");
  my $name = $category->name;
 
  my @docs = $category->documents;
  my $num_docs = $category->documents;
  my $features = $category->features;
 
  $category->add_document($doc);
  if ($category->contains_document($doc)) { ...



DESCRIPTION

This simple class represents a named category which may contain zero or more documents. Each category is a singleton by name, so two Category objects with the same name should not be created at once.

METHODS

new() Creates a new Category object and returns it. Accepts the following parameters:
name The name of this category
documents A reference to an array of Document objects that should belong to this category.
by_name(name => $string) Returns the Category object with the given name, or creates one if no such object exists.
documents() Returns a list of the Document objects in this category in a list context, or the number of such objects in a scalar context.
features() Returns a FeatureVector object representing the sum of all the FeatureVectors of the Documents in this Category.
add_document($document) Informs the Category that the given Document belongs to it.
contains_document($document) Returns true if the given document belongs to this category, or false otherwise.

AUTHOR

Ken Williams, ken@mathforum.org

COPYRIGHT

Copyright 2000-2003 Ken Williams. All rights reserved.

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

SEE ALSO

AI::Categorizer(3), Storable(3)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 AI::CATEGORIZER::CATEGORY (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.