NAME

dta-cab-analyze.perl - Command-line analysis interface for DTA::CAB

SYNOPSIS

 dta-cab-analyze.perl [OPTIONS...] DOCUMENT_FILE(s)...

 General Options
  -help                           ##-- show short usage summary
  -version                        ##-- show version & exit
  -verbose LEVEL                  ##-- alias for -log-level=LEVEL
  -begin CODE                     ##-- evaluate CODE early in script
  -onload CODE                    ##-- evaluate CODE after loading analyzer(s)
  -module MODULE                  ##-- alias for -begin="use MODULE;"
  -end CODE                       ##-- evaluade CODE late in script

 Parallelization Options
  -jobs NJOBS                     ##-- fork() off up to NJOBS parallel jobs (default=0: don't fork() at all)
  -job-queue QPATH                ##-- use QPATH as job-queue socket (default: temporary)
  -keep , -nokeep                 ##-- do/don't keep temporary queue files (default: don't)

 Analysis Options
  -config PLFILE                  ##-- load analyzer config file PLFILE
  -analysis-class  CLASS          ##-- set analyzer class (if -config is not specified)
  -analysis-option OPT=VALUE      ##-- set analysis option
  -profile , -noprofile           ##-- do/don't report profiling information (default: do)

 I/O Options
  -list                           ##-- arguments are list-files, not filenames
  -words                          ##-- arguments are word text, not filenames
  -input-class CLASS              ##-- select input parser class (default: Text)
  -input-option OPT=VALUE         ##-- set input parser option

  -output-class CLASS             ##-- select output formatter class (default: Text)
  -output-option OPT=VALUE        ##-- set output formatter option
  -output-level LEVEL             ##-- override output formatter level (default: 1)
  -output-format TEMPLATE         ##-- set output format (default=STDOUT)

  -format-class CLASS             ##-- alias for -input-class=CLASS -output-class=CLASS
  -format-option OPT=VALUE        ##-- alias for -input-option OPT=VALUE -output-option OPT=VALUE

 Block-wise Processing Options
  -block SIZE[{k,M,G,T}][@EOB]    ##-- pseudo-streaming block-wise analysis (not for all formats)
  -noblock                        ##-- disable block-wise processing
  -log-block-info LEVEL           ##-- log block-info at LEVEL (default=INFO)
  -log-block-trace LEVEL          ##-- log block-trace at LEVEL (default=none)
  -log-block-profile LEVEL        ##-- log block-profile at LEVEL (default=none)

 Logging Options                  ##-- see Log::Log4perl(3pm)
  -log-level LEVEL                ##-- set minimum log level (default=TRACE)
  -log-stderr , -nolog-stderr     ##-- do/don't log to stderr (default=true)
  -log-syslog , -nolog-syslog     ##-- do/don't log to syslog (default=false)
  -log-file LOGFILE               ##-- log directly to FILE (default=none)
  -log-rotate , -nolog-rotate     ##-- do/don't auto-rotate log files (default=true)
  -log-config L4PFILE             ##-- log4perl config file (overrides -log-stderr, etc.)
  -log-watch  , -nowatch          ##-- do/don't watch log4perl config file (default=false)
  -log-option OPT=VALUE           ##-- set any logging option (e.g. -log-option twlevel=trace)

DESCRIPTION

dta-cab-analyze.perl is a command-line utility for analyzing documents with the DTA::CAB analysis suite, without the need to set up and/or connect to an independent server.

OPTIONS AND ARGUMENTS

General Options

-help

Display a short help message and exit.

-man

Display a longer help message and exit.

-version

Display program and module version information and exit.

-verbose

Set default log level (trace|debug|info|warn|error|fatal).

Parallelization Options

-jobs NJOBS

Fork() off up to NJOBS parallel jobs. If NJOBS=0 (default), doesn't fork() at all.

-job-queue QPATH

Use QPATH as job-queue socket. Default is to use a temporary file.

-keep , -nokeep

Do/don't keep temporary queue files after program termination (default: don't)

Analysis Options

-config PLFILE

Required.

Load analyzer configuration from PLFILE, which should be a perl source file parseable by DTA::CAB::Persistent::loadFile() as a DTA::CAB::Analyzer object. Prototypically, this file will just look like:

 our $obj = DTA::CAB->new( opt1=>$val1, ... );
-analysis-option OPT=VALUE

Set an arbitrary analysis option OPT to VALUE. May be multiply specified.

-profile , -noprofile

Do/don't report profiling information (default: do)

I/O Options

-list

Arguments are list files (1 input per line), not filenames. List-file arguments can actually contain a subset of command-line options in addition to input filenames. Not compatible with the -words option.

-words

Arguments are word text, not filenames. Not compatible with the -list option.

-block SIZE[{k,M,G,T}][@EOB]

Do pseudo-streaming block-wise analysis. Currently only supported for 'TT' and 'TJ' formats. SIZE is the minimum size in bytes for non-final analysis blocks, and may have an optional SI suffix 'k', 'M', 'G', or 'T'. EOB indicates the desired block-boundary type; either 's' to force all block-boundaries to be sentence boundaries, or 't' ('w') for token (word) boundaries. Default=128k@w.

-input-class CLASS

Select input parser class (default: Text).

-input-option OPT=VALUE

Set arbitrary input parser options. May be multiply specified.

-output-class CLASS

Select output formatter class (default: Text)

-output-option OPT=VALUE

Set arbitrary output formatter option. May be multiply specified.

-output-level LEVEL

Override output formatter level (default: 1)

-output-format FORMAT

Set output format (default='-' (STDOUT)), a printf-style format which may contain the following %-escapes:

 %f  : INFILE           : current input file
 %b  : basename(INFILE) : basename of current input file
 %d  : dirname(INFILE)  : directory of current input file
 %x  : extension(INFILE): extension of current input file
 %F  :                  : alias for %d/%b

ACKNOWLEDGEMENTS

Perl by Larry Wall.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2019 by Bryan Jurish. All rights reserved.

This program 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-convert.perl(1), dta-cab-cachegen.perl(1), dta-cab-xmlrpc-server.perl(1), dta-cab-xmlrpc-client.perl(1), DTA::CAB(3pm), perl(1), ...