PDL::Ngrams::ngutils - Basic N-Gram utilities for PDL: low-level utilities
use PDL; use PDL::Ngrams::ngutils; ##--------------------------------------------------------------------- ## ... stuff happens
Signature: (toks(NToks); indx boffsets(NBlocks); delims(NDelims); [o]dtoks(NDToks))
Add block-delimiters to a raw token vector
Splices the vector $delims into the vector $toks starting at each index listed in $boffsets, returning the result as $dtoks. Values in $boffsets should be in the range [0..N-1].
For consistency, it should be the case that:
$NDToks == $NToks + $NBlocks * $NDelims
ng_delimit does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.
Signature: (dtoks(NDToks); indx boffsets(NBlocks); int NDelims(); [o]toks(NToks))
Remove block-delimiters from a delimited token vector.
Removes chunks of length $delims from the vector $toks starting at each index listed in $boffsets, returning the result as $toks. Values in $boffsets should be in the range [0..N-1].
ng_undelimit does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.
Perl by Larry Wall.
PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others.
Probably many.
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2007, Bryan Jurish. All rights reserved.
This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself.
perl(1), PDL(3perl)
To install PDL::Ngrams, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDL::Ngrams
CPAN shell
perl -MCPAN -e shell install PDL::Ngrams
For more information on module installation, please visit the detailed CPAN module installation guide.