49#include <lal/io/treebank_feature.hpp>
70 {
m_what_fs[
static_cast<std::size_t
>(fs) ] =
true; }
76 {
m_what_fs[
static_cast<std::size_t
>(fs) ] =
false; }
136 {
return m_what_fs[
static_cast<std::size_t
>(fs) ]; }
The processor base class.
Definition: process_treebank_base.hpp:61
bool has_feature(const treebank_feature &fs) const noexcept
Is a given feature to be calculated?
Definition: process_treebank_base.hpp:135
void set_output_header(bool h) noexcept
Output a hedaer for the treebank result file.
Definition: process_treebank_base.hpp:111
void set_verbosity(int k) noexcept
Sets the level of verbosity of the process methods.
Definition: process_treebank_base.hpp:104
std::array< std::string, __treebank_feature_size > m_column_names
String for each column.
Definition: process_treebank_base.hpp:140
void set_check_before_process(bool v) noexcept
Should the treebank file or collection be checked for errors prior to processing?
Definition: process_treebank_base.hpp:81
char m_separator
Character used as separator.
Definition: process_treebank_base.hpp:147
void initialise_column_names() noexcept
Initialises column names m_column_names.
Definition: process_treebank_base.hpp:161
void set_separator(char c) noexcept
Sets the separator character.
Definition: process_treebank_base.hpp:94
bool m_check_before_process
Process the treebank file or collection prior to processing.
Definition: process_treebank_base.hpp:145
void set_column_name(const treebank_feature &tf, const std::string &name) noexcept
Sets a custom name for the column corresponding to a given feature.
Definition: process_treebank_base.hpp:122
std::array< bool, __treebank_feature_size > m_what_fs
The list of features to be computed.
Definition: process_treebank_base.hpp:142
void remove_feature(const treebank_feature &fs) noexcept
Removes a feature from the processor.
Definition: process_treebank_base.hpp:75
void clear_features() noexcept
Clear the features in the processor.
Definition: process_treebank_base.hpp:85
bool m_output_header
Output a header for each file.
Definition: process_treebank_base.hpp:149
void add_feature(const treebank_feature &fs) noexcept
Adds a feature to the processor.
Definition: process_treebank_base.hpp:69
int m_be_verbose
The verbosity of the processor.
Definition: process_treebank_base.hpp:157
constexpr std::size_t __treebank_feature_size
The total number of features available.
Definition: treebank_feature.hpp:521
constexpr std::string_view treebank_feature_index_to_string(std::size_t idx) noexcept
Returns the treebank feature corresponding to the index as a string.
Definition: treebank_feature.hpp:623
treebank_feature
The features that can be computed in automatic processing of treebanks.
Definition: treebank_feature.hpp:68
Main namespace of the library.
Definition: basic_types.hpp:50