Changeset 1884


Ignore:
Timestamp:
2001-01-31T14:14:41+13:00 (23 years ago)
Author:
paynter
Message:

Added some documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/BasClas.pm

    r1839 r1884  
    22#
    33# BasClas.pm -- base class for all classifiers
     4#
    45# A component of the Greenstone digital library software
    56# from the New Zealand Digital Library Project at the
     
    2627package BasClas;
    2728
     29# How a classifier works. 
     30#
     31# For each classifier requested in the collect.cfg file, buildcol.pl creates
     32# a new classifier object (a subclass of BasClas).  Later, it passes each
     33# document object to each classifier in turn for classification.
     34#
     35# Four primary functions are used:
     36#
     37# 1. "new" is called before the documents are processed to set up the
     38#    classifier.
     39#
     40# 2. "init" is called after buildcol.pl has created the indexes etc but
     41#    before the documents are classified in order that the classifier might
     42#    set any variables it requires, etc.
     43#
     44# 3. "classify" is called once for each document object.  The classifier
     45#    "classifies" each document and updates its local data accordingly.
     46#
     47# 4. "get_classify_info" is called after every document has been
     48#    classified.  It collates the information about the documents and
     49#    stores a reference to the classifier so that Greenstone can later
     50#    display it.
     51
    2852use parsargv;
    29 
    3053
    3154sub print_general_usage {
    3255    my ($plugin_name) = @_;
    33     print STDERR "\n  usage: plugin $plugin_name [options]\n\n";
     56    print STDERR "
     57  usage: plugin $plugin_name [options]
     58
     59";
    3460}
    3561
    3662# print_usage should be overridden for any sub-classes
    3763sub print_usage {
    38     print STDERR "\nThis classifier has no classifier-specific options\n\n";
     64    print STDERR "
     65This classifier has no classifier-specific options
    3966
     67";
    4068}
    4169
Note: See TracChangeset for help on using the changeset viewer.