54#include <lal/io/treebank_error.hpp>
55#include <lal/io/process_treebank_base.hpp>
141 assert(n_threads != 0);
190 const std::string& main_file,
191 const std::string& output_directory
272 const std::
string& treebank_collection_main_file,
273 const std::
string& output_directory,
274 std::
size_t num_threads = 1
279 auto err = tbcolproc.
init(treebank_collection_main_file, output_directory);
The processor base class.
Definition process_treebank_base.hpp:60
Automatic processing of treebank collections.
Definition treebank_collection_processor.hpp:128
void set_join_files(bool v) noexcept
Join the resulting files into a single file.
Definition treebank_collection_processor.hpp:136
treebank_error init(const std::string &main_file, const std::string &output_directory) noexcept
Initialise the processor with a new collection.
bool m_join_files
Join the files into a single file.
Definition treebank_collection_processor.hpp:230
void set_number_threads(size_t n_threads) noexcept
Set the number of threads.
Definition treebank_collection_processor.hpp:139
std::vector< std::tuple< treebank_error, std::string, std::string > > m_errors_from_processing
Set of errors resulting from processing the treebank collection.
Definition treebank_collection_processor.hpp:237
treebank_error join_all_files(const std::string &resname) const noexcept
Joins all resulting files into a single file.
const std::string & get_error_treebank_name(size_t i) const noexcept
Get the treebank's name for where the ith error happened.
Definition treebank_collection_processor.hpp:175
size_t get_num_errors() const noexcept
Returns the number of errors that arised during processing.
Definition treebank_collection_processor.hpp:149
std::vector< std::string > m_all_individual_treebank_names
The list of names of the treebanks.
Definition treebank_collection_processor.hpp:227
treebank_error process(const std::string &result_filename="") noexcept
Process the treebank collection.
std::string m_main_file
File containing the list of languages and their treebanks.
Definition treebank_collection_processor.hpp:252
const treebank_error & get_error_type(size_t i) const noexcept
Get the ith error.
Definition treebank_collection_processor.hpp:157
std::string m_out_dir
Output directory.
Definition treebank_collection_processor.hpp:250
const std::string & get_error_treebank_filename(size_t i) const noexcept
Get the treebank's file name where the ith error happened.
Definition treebank_collection_processor.hpp:166
size_t m_num_threads
Number of threads to use.
Definition treebank_collection_processor.hpp:233
Treebank error report class.
Definition treebank_error.hpp:64
@ no_error
No error occurred.
treebank_error process_treebank_collection(const std::string &treebank_collection_main_file, const std::string &output_directory, std::size_t num_threads=1) noexcept
Automatically process a treebank collection.
Definition treebank_collection_processor.hpp:271
Main namespace of the library.
Definition definitions.hpp:48