Changeset 1884
- Timestamp:
- 2001-01-31T14:14:41+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/BasClas.pm
r1839 r1884 2 2 # 3 3 # BasClas.pm -- base class for all classifiers 4 # 4 5 # A component of the Greenstone digital library software 5 6 # from the New Zealand Digital Library Project at the … … 26 27 package BasClas; 27 28 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 28 52 use parsargv; 29 30 53 31 54 sub print_general_usage { 32 55 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 "; 34 60 } 35 61 36 62 # print_usage should be overridden for any sub-classes 37 63 sub print_usage { 38 print STDERR "\nThis classifier has no classifier-specific options\n\n"; 64 print STDERR " 65 This classifier has no classifier-specific options 39 66 67 "; 40 68 } 41 69
Note:
See TracChangeset
for help on using the changeset viewer.