The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DTA::CAB::Analyzer::DocClassify - DocClassify::Mapper wrapper

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DTA::CAB::Analyzer::DocClassify;
 
 ##========================================================================
 ## Constructors etc.
 
 $obj = CLASS_OR_OBJ->new(%args);
 $dc = $dc->clear();
 
 ##========================================================================
 ## Methods: Generic
 
 $bool = $dc->mapOk();
 
 ##========================================================================
 ## Methods: I/O: Input: all
 
 $bool = $dc->ensureLoaded();
 
 ##========================================================================
 ## Methods: I/O: Input: Map
 
 $dc = $dc->loadMap($map_file);
 
 ##========================================================================
 ## Methods: Persistence: Perl
 
 @keys = $class_or_obj->noSaveKeys();
 $loadedObj = $CLASS_OR_OBJ->loadPerlRef($ref);
 
 ##========================================================================
 ## Methods: Analysis: Generic
 
 $bool = $anl->canAnalyze();
 
 ##========================================================================
 ## Methods: Analysis: v1.x: API
 
 $doc = $anl->analyzeDocument($doc,\%opts);
 

DESCRIPTION

Globals

Variable: @ISA

(undocumented)

Constructors etc.

new
 $obj = CLASS_OR_OBJ->new(%args);

object structure:

    (
     ##-- Filename Options
     mapFile => $filename,     ##-- binary source file for 'map' (default: none) : REQUIRED
     ##-- Analysis Options
     label            => $label, ##-- document destination key (default='classified')
     analyzeClearBody => $bool,  ##-- if true, document analysis routine will wipe $doc->{body} (default=false)
     ##-- Analysis Objects
     map            => $map,   ##-- a DocClassify::Mapper object
    )
clear
 $dc = $dc->clear();

(undocumented)

Methods: Generic

mapOk
 $bool = $dc->mapOk();
  • should return false iff map is undefined or "empty"

  • default version checks for non-empty 'map'

Methods: I/O: Input: all

ensureLoaded
 $bool = $dc->ensureLoaded();

ensures model data is loaded from default files (if available)

Methods: I/O: Input: Map

loadMap
 $dc = $dc->loadMap($map_file);

(undocumented)

Methods: Persistence: Perl

noSaveKeys
 @keys = $class_or_obj->noSaveKeys();

returns list of keys not to be saved

loadPerlRef
 $loadedObj = $CLASS_OR_OBJ->loadPerlRef($ref);

implicitly calls $obj->clear()

Methods: Analysis: Generic

canAnalyze
 $bool = $anl->canAnalyze();

returns true if analyzer can perform its function (e.g. data is loaded & non-empty)

Methods: Analysis: v1.x: API

analyzeDocument
 $doc = $anl->analyzeDocument($doc,\%opts);
  • analyze a DTA::CAB::Document $doc

  • top-level API routine

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2011-2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

dta-cab-analyze.perl(1), DTA::CAB::Analyzer(3pm), DTA::CAB::Chain(3pm), DTA::CAB(3pm), perl(1), ...