DiaColloDB::Document - diachronic collocation db, source document (base class)
##======================================================================== ## PRELIMINARIES use DiaColloDB::Document; ##======================================================================== ## Constructors etc. $doc = CLASS_OR_OBJECT->new(%args); ##======================================================================== ## API: I/O $bool = $doc->fromFile($filename_or_fh); $label = $doc->label();
DiaColloDB::Document provides an abstract base-class for corpus documents from which a DiaColloDB database can be created. Support for alternative corpus formats can be be added by implementing a DiaColloDB::Document subclass for each required format.
DiaColloDB::Document inherits from DiaColloDB::Logger.
$doc = CLASS_OR_OBJECT->new(%args);
%args, object structure:
label => $label, ##-- document label (e.g. filename; optional) 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);
parse tokens from $filename_or_fh
$label = $doc->label();
return a string label for $doc; default just returns "$doc".
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2015 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.
dcdb-create.per(1), dcdb-query.perl(1), dcdb-info.perl(1), dcdb-export.perl(1), dcdb-dump.perl(1), 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.