DiaColloDB::Corpus - diachronic collocation db, source corpous
##======================================================================== ## PRELIMINARIES use DiaColloDB::Corpus; ##======================================================================== ## Constructors etc. $corpus = CLASS_OR_OBJECT->new(%args); ##======================================================================== ## API: open/close $bool = $corpus->open(\@ARGV, %opts); $bool = $corpus->close(); ##======================================================================== ## API: iteration $nfiles = $corpus->size(); undef = $corpus->ibegin(); $bool = $corpus->iok(); $label = $corpus->ifile(); $doc_or_undef = $corpus->idocument(); $pos = $corpus->inext(); $pos = $corpus->icur();
DiaColloDB::Corpus inherits from DiaColloDB::Logger.
Default document subclass; default = 'DDCTabs'.
$corpus = CLASS_OR_OBJECT->new(%args);
%args, object structure:
files => \@files, ##-- source files dclass => $dclass, ##-- DiaColloDB::Document subclass for loading (default=$DCLASS_DEFAULT) dopts => \%opts, ##-- options for $dclass->fromFile() cur => $i, ##-- index of current file
$bool = $corpus->open(\@ARGV, %opts);
Open a corpus. %opts:
glob => $bool, ##-- whether to glob arguments list => $bool, ##-- whether arguments are file-lists
$bool = $corpus->close();
Close corpus.
$nfiles = $corpus->size();
Get number of files in corpus.
undef = $corpus->ibegin();
reset iterator
$bool = $corpus->iok();
true if iterator is valid
$label = $corpus->ifile(); $label = $corpus->ifile($pos);
gets current iterator label (1st form) or label for document at $pos (2nd form).
$doc_or_undef = $corpus->idocument(); $doc_or_undef = $corpus->idocument($pos);
gets current document (1st form), or document at $pos (2nd form).
$pos = $corpus->inext();
increment iterator
$pos = $corpus->icur();
returns current position
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2015-2020 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.14.2 or, at your option, any later version of Perl 5 you may have available.
DiaColloDB::Corpus::Compiled(3pm), DiaColloDB::Document(3pm), DiaColloDB(3pm), perl(1), ...
To install DiaColloDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DiaColloDB
CPAN shell
perl -MCPAN -e shell install DiaColloDB
For more information on module installation, please visit the detailed CPAN module installation guide.