NAME
DTA::CAB::Analyzer::Lemmatizer - lemma extractor for TAGH analyses or bare text
SYNOPSIS
##========================================================================
## PRELIMINARIES
use DTA::CAB::Analyzer::Lemmatizer;
##========================================================================
## Methods
$obj = $CLASS_OR_OBJ->new(%args);
@keys = $anl->typeKeys();
$bool = $anl->doAnalyze(\%opts, $name);
\@toks = $anl->_analyzeGuts(\@toks,\%opts);
$doc = $anl->analyzeTypes($doc,\%types,\%opts);
$doc = $anl->analyzeOther($which, $doc,\%opts);
DESCRIPTION
Globals
- Variable: $GET_MORPH
-
\@morph_analyses = "$GET_MORPH"->();
Code string; available vars: $tok, $lz
- Variable: $GET_DMOOT_MORPH
-
\@morph_analyses = "$GET_DMOOT_MORPH"->();
code string; available vars: $tok, $lz
- Variable: $GET_TEXT
-
$text = "$GET_TEXT"->();
Get text for analysis $_. Available vars: $tok, $tokm (array of analyses), $ma (current analysis), $lz (analyzer obj).
- Variable: $GET_MOOT_ANALYSES
-
\@morph_analyses = "$GET_DMOOT_MORPH"->();
code string; available vars: $tok, $lz
- Variable: $GET_MOOT_TEXT
-
$txt = "$GET_MOOT_TEXT"->();
code string: get text for analysis $_. available vars: $tok, $tokm (array of analyses), $ma (current analysis), $lz (analyzer obj),
Methods
- new
-
$obj = CLASS_OR_OBJ->new(%args);
object structure, %args:
analyzeGet => $code, ##-- pseudo-accessor: @morph_analyses = "$code"-E<gt>(\@toks) analyzeWhich => $which, ##-- e.g. 'Types','Tokens','Sentences','Local': default=Types ## + the underlying analysis is always performed by the analyzeTypes() method! (default='Types') analyzeLabel => $label, ##-- ouput label (default='lemma')
- typeKeys
-
@keys = $anl->typeKeys();
Returns list of type-wise keys to be expanded for this analyzer by expandTypes() Override returns @{$lt->{typeKeys}}.
- doAnalyze
-
$bool = $anl->doAnalyze(\%opts, $name);
Override: only allow analyzeSentences().
- _analyzeGuts
-
\@toks = $anl->_analyzeGuts(\@toks,\%opts);
guts: analyze all tokens in \@toks
- analyzeTypes
-
$doc = $anl->analyzeTypes($doc,\%types,\%opts);
perform type-wise analysis of all (text) types in $doc->{types}
- analyzeOther
-
$doc = $anl->analyzeOther($which, $doc,\%opts);
analyze all tokens in $doc
- analyzeTokens
-
wrapper for analyzeOther()
- analyzeSentences
-
wrapper for analyzeOther()
- analyzeLocal
-
wrapper for analyzeOther()
- analyzeClean
-
wrapper for analyzeOther()
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), ...