Treex::Block::Read::BaseTextReader - abstract ancestor for document readers
This class serves as an common ancestor for document readers,
that have parameter
from with a space or comma separated list of filenames to be loaded and load the documents from plain text files.
It is designed to implement the Treex::Core::DocumentReader interface.
In derived classes you need to define the
and you can use
If you want to split one file to more documents. The default is 0 which means, don't split.
Merge the content of all files (specified in
from attribute) into one stream.
Useful in combination with
lines_per_doc to get equally-sized documents even from non-equally-sized files.
What is the encoding of the input files.
utf8 (the default),
Returns a content of each file (specified in
from attribute) as a text string.
Helper method - you can use this instead of
next_document_text if you don't want to load the whole text into memory (but do e.g.
Copyright Â© 2011 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.