DTA::CAB::Format::Text - Datum parser: verbose human-readable text
use DTA::CAB::Format::Text; ##======================================================================== ## Constructors etc. $fmt = DTA::CAB::Format::Text->new(%args); ##======================================================================== ## Methods: Input $doc = $fmt->parseTextString(); ##======================================================================== ## Methods: Output $fmt = $fmt->putToken($tok);
Human-readable wrapper for DTA::CAB::Format::TT.
DTA::CAB::Format::Text inherits from DTA::CAB::Format via DTA::CAB::Format::TT.
This module registers the filename regex:
/\.(?i:txt|text)$/
with DTA::CAB::Format.
$fmt = CLASS_OR_OBJ->new(%args);
Constructor. Inherited from DTA::CAB::Format::TT.
%args, %$fmt:
##---- Input doc => $doc, ##-- buffered input document ## ##---- Output #level => $formatLevel, ##-- output formatting level: n/a outbuf => $stringBuffer, ##-- buffered output ## ##---- Common encoding => $encoding, ##-- default: 'UTF-8'
$fmt = $fmt->parseTextString($str);
Guts for document parsing: parse string $str into local document buffer $fmt->{doc}.
$fmt = $fmt->parseTTString($str);
Alias for parseTextString().
$fmt = $fmt->putToken($tok);
Override: append formatted token $tok to output buffer.
An example file in the format accepted/generated by this module is:
%% $s:lang=de wie +[exlex] wie +[errid] ec +[lang] de +[xlit] l1=1 lx=1 l1s=wie +[hasmorph] 1 +[morph/safe] 1 +[moot/word] wie +[moot/tag] PWAV +[moot/lemma] wie oede +[xlit] l1=1 lx=1 l1s=oede +[morph/safe] 0 +[moot/word] öde +[moot/tag] ADJD +[moot/lemma] öde ! +[exlex] ! +[errid] ec +[xlit] l1=1 lx=1 l1s=! +[morph/safe] 1 +[moot/word] ! +[moot/tag] $. +[moot/lemma] !
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2009-2019 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.24.1 or, at your option, any later version of Perl 5 you may have available.
To install DTA::CAB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DTA::CAB
CPAN shell
perl -MCPAN -e shell install DTA::CAB
For more information on module installation, please visit the detailed CPAN module installation guide.