DTA::CAB::Analyzer::RewriteSub - sub-analysis (LTS, Morph) of rewrite targets
use DTA::CAB::Analyzer::RewriteSub; ##======================================================================== ## Methods $obj = CLASS_OR_OBJ->new(chain=>\@analyzers, %args); @keys = $anl->typeKeys(); \@analyzers = $ach->chain(); $bool = $ach->ensureLoaded(); $bool = $ach->canAnalyze(); $doc = $anl->analyzeTypes($doc,\%types,\%opts);
DTA::CAB::Analyzer::RewriteSub provides a DTA::CAB::Analyzer implementation for post-processing of rewrite analyses as generated by a DTA::CAB::Analyzer::Rewrite analyzer in a DTA::CAB::Chain::DTA analysis chain.
$obj = CLASS_OR_OBJ->new(chain=>\@analyzers, %args);
%$obj, %args (see also DTA::CAB::Chain):
chain => [$a1, ..., $aN], ##-- sub-analysis chain (e.g. chain=>[$lts,$morph]) rwLabel => $label, ##-- label of source 'rewrite' object (default='rw')
@keys = $anl->typeKeys();
Returns list of type-wise keys to be expanded for this analyzer by expandTypes(). Override returns $anl->{rwLabel}.
\@analyzers = $ach->chain(); \@analyzers = $ach->chain(\%opts)
Get selected analyzer chain. NEW: just return $ach->{chain}, since analyzers may still be disabled here (argh).
$bool = $ach->ensureLoaded();
Returns true if any chain member loads successfully (or if the chain is empty).
$bool = $ach->canAnalyze(); $bool = $ach->canAnalyze(\%opts)
Returns true if analyzer can perform its function (e.g. data is loaded & non-empty) Override returns true if ANY analyzers in the chain do to.
$doc = $anl->analyzeTypes($doc,\%types,\%opts);
Perform type-wise analysis of all (text) types in %types (= %{$doc->{types}}). Override extracts rewrite targets, builds pseudo-type hash, calls sub-chain analyzeTypes(), & re-expands.
Bryan Jurish <moocow@cpan.org>
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.
dta-cab-analyze.perl(1), DTA::CAB::Analyzer::Rewrite(3pm), DTA::CAB::Analyzer(3pm), DTA::CAB::Chain(3pm), DTA::CAB::Chain::DTA(3pm), DTA::CAB(3pm), perl(1), ...
To install DTA::CAB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DTA::CAB
CPAN shell
perl -MCPAN -e shell install DTA::CAB
For more information on module installation, please visit the detailed CPAN module installation guide.