DTA::CAB::Format::CSV - Datum I/O: concise minimal-output human-readable text
use DTA::CAB::Format::CSV;
##========================================================================
## Methods: Constructors etc.
$fmt = CLASS_OR_OBJ->new(%args)
##========================================================================
## Methods: Input
$fmt = $fmt->parseCsvString($string);
##========================================================================
## Methods: Output
$type = $fmt->mimeType();
$ext = $fmt->defaultExtension();
$fmt = $fmt->putToken($tok);
DTA::CAB::Format::CSV is a DTA::CAB::Format subclass for representing the minimal "interesting" results of a DTA::CAB::Chain::DTA canonicalization in a (more or less) human- and machine-friendly TAB-separated format. As for DTA::CAB::Format::TT (from which this class inherits), each token is represented by a single line and sentence boundaries are represented by blank lines. Token lines have the format:
OLD_TEXT XLIT_TEXT NEW_TEXT POS_TAG LEMMA ?DETAILS
$fmt = CLASS_OR_OBJECT->new(%args);
Recognized %args:
##---- Input
doc => $doc, ##-- buffered input document
##---- Output
level => $formatLevel, ##-- output formatting level:
## 0: text, xlit, canon, tag, lemma
## 1: text, xlit, canon, tag, lemma, details
#outbuf => $stringBuffer, ##-- buffered output
##---- Common
utf8 => $bool, ##-- default: 1
$fmt = $fmt->parseCsvString($string);
Hack which converts a CSV string to a TT string and passes it to DTA::CAB::Format::TT::parseTTString().
$type = $fmt->mimeType();
Default returns text/plain.
$ext = $fmt->defaultExtension();
Deturns default filename extension for this format. Override returns '.csv'.
$fmt = $fmt->putToken($tok);
Appends $tok to output buffer.
An example file in the format accepted/generated by this module is:
%% $s:lang=de
wie wie wie PWAV wie
oede oede öde ADJD öde
! ! ! $. !
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2011-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.
dta-cab-analyze.perl(1), dta-cab-convert.perl(1), DTA::CAB::Format::TT(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), perl(1), ...
Hey! The above document had some coding errors, which are explained below:
Non-ASCII character seen before =encoding in 'öde'. Assuming UTF-8