NAME

Treex::Block::Write::BaseTextWriter

VERSION

version 0.08157

DESCRIPTION

This is a base class for all text-based output formats, which adds printing to standard output by default and the possibility to select the output file character encoding (defaulting to UTF-8).

Also, if multiple documents are read and only one output file given in the to parameter, all input documents will be appended to a single file.

PARAMETERS

encoding

The output encoding, utf8 by default.

DERIVED CLASSES

Before creating a class derived from BaseTextWriter, please see the instructions in Treex::Block::Write::BaseWriter.

There is a possibility to override the following two methods in addition to those described in Treex::Block::Write::BaseWriter:

<$self-print_header($document)>>

Print a document header. Called before the standard process_document is launched. Will not be called if process_document is overridden (and super not called)!

<$self-print_footer($document)>>

Print a document footer. Called after the standard process_document is launched. Will not be called if process_document is overridden (and super not called)!

AUTHOR

Ondřej Dušek <odusek@ufal.mff.cuni.cz>

COPYRIGHT AND LICENSE

Copyright © 2011-2012 by Institute of Formal and Applied Linguistics, Charles University in Prague

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.