DiaColloDB::Document::Storable - diachronic collocation db, source document, Storable
##======================================================================== ## PRELIMINARIES use DiaColloDB::Document::Storable; ##======================================================================== ## Constructors etc. $doc = CLASS_OR_OBJECT->new(%args); ##======================================================================== ## API: I/O: parse $bool = $doc->fromFile($filename_or_fh, %opts);
DiaColloDB::Document::Storable provides a DiaColloDB::Document-compliant API for parsing corpus files using the perl Storable module directly on the DiaColloDB::Document structure.
DiaColloDB::Document::Storable inherits from DiaColloDB::Document and supports the DiaColloDB::Document API.
$doc = CLASS_OR_OBJECT->new(%args);
%args, object structure:
##-- document data date =>$date, ##-- year tokens =>\@tokens, ##-- tokens, including undef for EOS meta =>\%meta, ##-- document metadata (e.g. author, title, collection, ...)
Each token in @tokens is a HASH-ref {w=>$word,p=>$pos,l=>$lemma,...}, or undef for EOS.
$bool = $doc->fromFile($filename_or_fh, %opts);
parse document from $filename_or_fh. Override just wraps Storable::retrieve() or Storable::retrieve_fd() as appropriate. %opts: clobbers %$doc.
Storable::retrieve()
Storable::retrieve_fd()
Bryan Jurish <moocow@cpan.org>
Copyright (C) 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::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.