##========================================================================
## POD DOCUMENTATION, auto-generated by podextract.perl

##========================================================================
## NAME
=pod

=head1 NAME

DiaColloDB::Document - diachronic collocation db, source document (base class)

=cut

##========================================================================
## SYNOPSIS
=pod

=head1 SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DiaColloDB::Document;
 
 ##========================================================================
 ## Constructors etc.
 
 $doc = CLASS_OR_OBJECT->new(%args);
 
 ##========================================================================
 ## API: I/O
 
 $bool = $doc->fromFile($filename_or_fh);
 $label = $doc->label();
 

=cut

##========================================================================
## DESCRIPTION
=pod

=head1 DESCRIPTION

DiaColloDB::Document provides an abstract base-class for
corpus documents from which a L<DiaColloDB|DiaColloDB> database
can be created.  Support for alternative corpus formats can be be added
by implementing a DiaColloDB::Document subclass for each required format.

=cut

##----------------------------------------------------------------
## DESCRIPTION: DiaColloDB::Document: Globals & Constants
=pod

=head2 Globals & Constants

=over 4

=item Variable: @ISA

DiaColloDB::Document inherits from L<DiaColloDB::Logger|DiaColloDB::Logger>.

=back

=cut

##----------------------------------------------------------------
## DESCRIPTION: DiaColloDB::Document: Constructors etc.
=pod

=head2 Constructors etc.

=over 4

=item new

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

%args, object structure:

 label  => $label,   ##-- document label (e.g. filename; optional)
 date   =>$date,     ##-- year
 tokens =>\@tokens,  ##-- tokens, including undef for eos
 meta   =>\%meta,    ##-- document metadata (e.g. author, title, collection, ...)

Each token in @tokens is one of the following:

 undef              : EOS (default, for collocation profiling)
 a HASH-ref         : normal token: {w=>$word,p=>$pos,l=>$lemma,...}
 a string "#BREAK"  : block boundary / "break" of type BREAK, e.g. "#s": sentence-break, "#p": paragraph-break, ...

=back

=cut

##----------------------------------------------------------------
## DESCRIPTION: DiaColloDB::Document: API: I/O
=pod

=head2 API: I/O

=over 4

=item fromFile

 $bool = $doc->fromFile($filename_or_fh);

parse tokens from $filename_or_fh

=item label

 $label = $doc->label();

return a string label for $doc; default just returns "$doc".

=back

=cut

##========================================================================
## END POD DOCUMENTATION, auto-generated by podextract.perl
=pod

=head1 SUBCLASSES

The DiaColloDB distribution provides the following built-in DiaColloDB::Document subclasses:

=over 4

=item L<DiaColloDB::Document::DDCTabs|DiaColloDB::Document::DDCTabs>

Full support for DDC tab-dump files as produced by C<ddc_dump --full --tabs>;
see L<http://odo.dwds.de/~moocow/software/ddc/ddc_tabs.html>.

=item L<DiaColloDB::Document::JSON|DiaColloDB::Document::JSON>

Supports input files in L<JSON|http://www.json.org> format, assuming
the stored JSON data maps 1:1 onto the required
DiaColloDB::Document structure described above under L<new()|/new>.

=item L<DiaColloDB::Document::TCF|DiaColloDB::Document::TCF>

Basic handling for input files in
L<CLARIN-D TCF format|http://weblicht.sfs.uni-tuebingen.de/weblichtwiki/index.php/The_TCF_Format>
as used by L<WebLicht|http://weblicht.sfs.uni-tuebingen.de/>.

=item L<DiaColloDB::Document::TEI|DiaColloDB::Document::TEI>

Rudimentary handling for L<TEI-like|http://www.tei-c.org> XML input files,
which must at least include token boundaries encoded as C<E<lt>wE<gt>>
elements.

=back

=cut

##======================================================================
## Footer
##======================================================================
=pod

=head1 AUTHOR

Bryan Jurish E<lt>moocow@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2015-2016 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.14.2 or,
at your option, any later version of Perl 5 you may have available.

=head1 SEE ALSO

L<DiaColloDB::Document::DDCTabs(3pm)|DiaColloDB::Document::DDCTabs>,
L<DiaColloDB::Document::JSON(3pm)|DiaColloDB::Document::JSON>,
L<DiaColloDB::Document::TCF(3pm)|DiaColloDB::Document::TCF>,
L<DiaColloDB::Document::TEI(3pm)|DiaColloDB::Document::TEI>,
L<DiaColloDB::Corpus(3pm)|DiaColloDB::Corpus>,
L<DiaColloDB(3pm)|DiaColloDB>,
L<perl(1)|perl>,
...



=cut
