NAME

DTA::CAB::Format::ExpandList - Datum I/O: expansion list for use with DDC

SYNOPSIS

 use DTA::CAB::Format::ExpandList;
 
 ##========================================================================
 ## Methods: Constructors etc.
 
 $fmt = CLASS_OR_OBJ->new(%args)
 
 ##========================================================================
 ## Methods: Output
 
 $type = $fmt->mimeType();
 $ext = $fmt->defaultExtension();
 $fmt = $fmt->putToken($tok);
 

DESCRIPTION

DTA::CAB::Format::ExpandList is a DTA::CAB::Format subclass intended for use in a CAB HTTP server as a CAB-class term expander for the DDC corpus query engine. 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:

 ORIG_TEXT   EQUIVALENT(s)...

Where EQUIVALENT(s) is a list of TAB-separated equivalent forms as determined by the analysis phase.

Methods: Constructors etc.

new
  $fmt = CLASS_OR_OBJECT->new(%args);

Recognized %args:

 ##---- Input
 doc => $doc,                    ##-- buffered input document
 
 ##---- Output
 level    => $formatLevel,       ##-- output formatting level
                                 ##   0: TAB-separated (default)
                                 ##   1: sorted, NEWLINE-separated
                                 ##   2: sorted, NEWLINE+TAB-separated
 keys      => \@expandKeys,      ##-- keys to include (default: [qw(text xlit eqpho eqrw eqlemma eqtagh gn-syn gn-isa gn-asi)])
 
 ##---- Common
 utf8  => $bool,                 ##-- default: 1

Methods: Output

mimeType
 $type = $fmt->mimeType();

Default returns text/plain.

defaultExtension
 $ext = $fmt->defaultExtension();

Deturns default filename extension for this format. Override returns '.xl'.

putToken
 $fmt = $fmt->putToken($tok);

Appends $tok to output buffer.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

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.

SEE ALSO

dta-cab-analyze.perl(1), dta-cab-convert.perl(1), DTA::CAB::Format::TT(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), ddc_opt(5), ddc_proto(5), perl(1), ...