Treex::Block::Write::BaseTextWriter
version 2.20210102
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.
to
encoding
The output encoding, utf8 by default.
utf8
Before creating a class derived from BaseTextWriter, please see the instructions in Treex::Block::Write::BaseWriter.
BaseTextWriter
There is a possibility to override the following two methods in addition to those described in Treex::Block::Write::BaseWriter:
<$self-
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)!
process_document
super
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)!
Ondřej Dušek <odusek@ufal.mff.cuni.cz>
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.
To install Treex::Core, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Core
CPAN shell
perl -MCPAN -e shell install Treex::Core
For more information on module installation, please visit the detailed CPAN module installation guide.