NAME
DiaColloDB::Document::Storable - diachronic collocation db, source document, Storable
SYNOPSIS
##========================================================================
## PRELIMINARIES
use DiaColloDB::Document::Storable;
##========================================================================
## Constructors etc.
$doc = CLASS_OR_OBJECT->new(%args);
##========================================================================
## API: I/O: parse
$bool = $doc->fromFile($filename_or_fh, %opts);
DESCRIPTION
DiaColloDB::Document::Storable provides a DiaColloDB::Document-compliant API for parsing corpus files using the perl Storable module directly on the DiaColloDB::Document structure.
Globals & Constants
- Variable: @ISA
-
DiaColloDB::Document::Storable inherits from DiaColloDB::Document and supports the DiaColloDB::Document API.
Constructors etc.
- new
-
$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.
API: I/O: parse
- fromFile
-
$bool = $doc->fromFile($filename_or_fh, %opts);
parse document from $filename_or_fh. Override just wraps
Storable::retrieve()
orStorable::retrieve_fd()
as appropriate. %opts: clobbers %$doc.
AUTHOR
Bryan Jurish <moocow@cpan.org>
COPYRIGHT AND LICENSE
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.