DTA::CAB::Analyzer::DmootSub - sub-analysis (Morph,toka) of dmoot targets
use DTA::CAB::Analyzer::DmootSub;
##========================================================================
## Methods: Constructors etc.
$obj = $CLASS_OR_OBJ->new(chain=>\@analyzers, %args);
##========================================================================
## Methods: I/O
\@analyzers = $ach->chain();
$bool = $ach->ensureLoaded();
##========================================================================
## Methods: Analysis
$bool = $anl->doAnalyze(\%opts, $name);
@keys = $anl->typeKeys();
$bool = $ach->canAnalyze();
$bool = $anl->enabled(\%opts);
DTA::CAB::Analyzer::DmootSub provides a DTA::CAB::Analyzer subclass for type-wise chained analysis of token-wise disambiguated input. Specifically, it was designed to invoke a morphological analyzer ('morph') on the output of a dynamic lexicon HMM ('dmoot'). This class inherits from DTA::CAB::Chain and implements the DTA::CAB::Analyzer API.
$obj = $CLASS_OR_OBJ->new(chain=>\@analyzers, %args);
%$obj, %args (see also DTA::CAB::Chain):
chain => [$a1, ..., $aN], ##-- sub-analysis chain (e.g. chain=>[$morph,$mlatin])
dmootLabel => $label, ##-- label of source dmoot object (default='dmoot')
standalone => $bool, ##-- if true, no sub-analysis or morph parsing will be done (default=false)
\@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). Hack: removes undefined chain-links before attempting to load sub-analyzers.
$bool = $anl->doAnalyze(\%opts, $name);
Override: only allow analyzeSentences().
$doc = $anl->analyzeSentences($doc,\%opts)
Post-processing for 'dmoot' object. Extracts dmoot targets, builds pseudo-type hash, calls sub-chain analyzeTypes(), & expands back into 'dmoot' sources.
@keys = $anl->typeKeys();
Returns list of type-wise keys to be expanded for this analyzer by expandTypes(). Override returns empty list.
$bool = $ach->canAnalyze();
$bool = $ach->canAnalyze(\%opts)
Returns true if analyzer can perform its function (e.g. data is loaded & non-empty). Override always returns 1 because of 'toka' hack.
$bool = $anl->enabled(\%opts);
Returns true if just $anl is enabled, even if no sub-analyzers are enabled.
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(3pm), DTA::CAB::Chain(3pm), DTA::CAB(3pm), perl(1), ...