DTA::CAB::Format::XmlLing - Datum parser|formatter: XML: fast quick-and-dirty "flat" XML formatter using TEI att.linguistic features
##========================================================================
## PRELIMINARIES
use DTA::CAB::Format::XmlLing;
##========================================================================
## Constructors etc.
$fmt = CLASS_OR_OBJ->new(%args);
$xmlparser = $fmt->xmlparser();
##========================================================================
## Methods: Output: MIME & HTTP stuff
$short = $fmt->shortName();
$ext = $fmt->defaultExtension();
##========================================================================
## Methods: Output: quick and dirty
$fmt = $fmt->putDocument($doc);
DTA::CAB::Format::XmlLing inherits from DTA::CAB::Format::XmlTokWrapFast.
$fmt = CLASS_OR_OBJ->new(%args);
object structure: HASH ref
{
##-- input: new
doc => $doc, ##-- cached parsed DTA::CAB::Document
##-- input: inherited (but unused)
#xdoc => $xdoc, ##-- XML::LibXML::Document
#xprs => $xprs, ##-- override: XML::Parser parser
##-- output: inherited from DTA::CAB::Format
utf8 => $bool, ##-- always true
level => $level, ##-- output formatting level (default=0; unused)
}
$xmlparser = $fmt->xmlparser();
returns cached $fmt->{xprs} if available, otherwise caches & returns new XML::Parser
$short = $fmt->shortName();
returns "official" short name for this format; override returns "ltxml".
$ext = $fmt->defaultExtension();
returns default filename extension for this format (default='.lt.xml')
$fmt = $fmt->putDocument($doc);
quick and dirty output using TEI att.linguistic attributes only; see http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-att.linguistic.html.
An example file in the format accepted/generated by this module is:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<text>
<w lemma="wie" pos="PWAV" norm="wie">wie</w>
<w join="right" lemma="öde" pos="ADJD" norm="öde">oede</w>
<w join="left" lemma="!" pos="$." norm="!">!</w>
</s>
</text>
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2018-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-http-server.perl(1), dta-cab-http-client.perl(1), dta-cab-xmlrpc-server.perl(1), dta-cab-xmlrpc-client.perl(1), DTA::CAB::Server(3pm), DTA::CAB::Client(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), perl(1), ...