DiaColloDB::Profile::MultiDiff - diachronic collocation db, (co-)frequency profile diffs, by date
##======================================================================== ## PRELIMINARIES use DiaColloDB::Profile::MultiDiff; ##======================================================================== ## Constructors etc. $mpd = CLASS_OR_OBJECT->new(%args); ##======================================================================== ## I/O: JSON $obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts); ##======================================================================== ## I/O: Text undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles); ##======================================================================== ## I/O: HTML $bool = $mp->saveHtmlFile($filename_or_handle, %opts); ##======================================================================== ## Compilation @ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2); $mpd = $mpd->populate($mp1,$mp2); $class = $CLASS_OR_OBJECT->pclass(); $mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);
DiaColloDB::Profile::MultiDiff is the top-level class for representing diachronic collocate frequency comparison-profile data over multiple date-slices as arising from the comparison of two DiaColloDB::Profile::Multi objects. The API closely mirrors that of the DiaColloDB::Profile::Diff class used to represent slice-wise sub-profiles.
DiaColloDB::Profile::MultiDiff inherits from DiaColloDB::Profile::Multi.
$mpd = CLASS_OR_OBJECT->new(%args); $mpd = CLASS_OR_OBJECT->new($mp1,$mp2,%args);
%args, object structure:
profiles => \@profiles, ##-- ($profile, ...) : sub-diffs, with {label} key titles => \@titles, ##-- item group titles (default:undef: unknown) qinfo => \%qinfo, ##-- query info (optional; keys prefixed with 'a' or 'b'): see DiaColloDB::Profile::Multi populate => $bool, ##-- auto-populate() if $mp1 and $mp2 are specified? (default=1)
$obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts);
guts for loadJsonString(), loadJsonFile()
undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles);
print column title header for text output.
$bool = $mp->saveHtmlFile($filename_or_handle, %opts);
Save flat HTML table data with rows of the form
SCOREa SCOREb DIFF LABEL ITEM2... table => $bool, ##-- include <table>..</table> ? (default=1) body => $bool, ##-- include <html><body>..</html></body> ? (default=1) qinfo => $varname, ##-- include <script> for qinfo data? (default='qinfo') header => $bool, ##-- include header-row? (default=1) format => $fmt, ##-- printf score formatting (default="%.2f")
@ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2); \@ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2);
aligns subprofile-pairs from $mp1 and $mp2
subprofiles are aligned in stored order
arguments must be EITHER singletons (1 subprofile) OR of same size; this lets you compare e.g. a global profile with a sliced one by something like PDL's "implicit threading".
$mpd = $mpd->populate($mp1,$mp2);
populates multi-diff by subtracting $mp2 sub-profile scores from $mp1; uses $mpd->align() to align sub-profiles.
$class = $CLASS_OR_OBJECT->pclass();
subprofile class for psum().
$mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);
%opts: as for DiaColloDB::Profile::Multi::trim(), including 'global' option
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.