The processor base class.
More...
#include <process_treebank_base.hpp>
|
void | add_feature (const treebank_feature &fs) noexcept |
| Adds a feature to the processor.
|
|
void | remove_feature (const treebank_feature &fs) noexcept |
| Removes a feature from the processor.
|
|
void | set_check_before_process (bool v) noexcept |
| Should the treebank file or collection be checked for errors prior to processing?
|
|
void | clear_features () noexcept |
| Clear the features in the processor.
|
|
void | set_separator (char c) noexcept |
| Sets the separator character.
|
|
void | set_verbosity (int k) noexcept |
| Sets the level of verbosity of the process methods.
|
|
void | set_output_header (bool h) noexcept |
| Output a hedaer for the treebank result file.
|
|
bool | has_feature (const treebank_feature &fs) const noexcept |
| Is a given feature to be calculated?
|
|
|
std::array< bool, __treebank_feature_size > | m_what_fs |
| The list of features to be computed.
|
|
bool | m_check_before_process = true |
| Process the treebank file or collection prior to processing.
|
|
char | m_separator = '\t' |
| Character used as separator.
|
|
bool | m_output_header = true |
| Output a header for each file.
|
|
int | m_be_verbose = 0 |
| The verbosity of the processor.
|
|
The processor base class.
Users should refrain from using this class. This class acts as a base class for all processor classes, namely, the lal::io::treebank_processor and the lal::io::treebank_collection_processor.
◆ add_feature()
void lal::io::_process_treebank_base::add_feature |
( |
const treebank_feature & | fs | ) |
|
|
inlinenoexcept |
Adds a feature to the processor.
- Parameters
-
◆ has_feature()
bool lal::io::_process_treebank_base::has_feature |
( |
const treebank_feature & | fs | ) |
const |
|
inlinenoexcept |
Is a given feature to be calculated?
- Parameters
-
fs | The feature being queried. |
- Returns
- True or False depending on whether the feature was added or removed.
◆ remove_feature()
void lal::io::_process_treebank_base::remove_feature |
( |
const treebank_feature & | fs | ) |
|
|
inlinenoexcept |
Removes a feature from the processor.
- Parameters
-
◆ set_output_header()
void lal::io::_process_treebank_base::set_output_header |
( |
bool | h | ) |
|
|
inlinenoexcept |
Output a hedaer for the treebank result file.
Default is true.
- Parameters
-
◆ set_separator()
void lal::io::_process_treebank_base::set_separator |
( |
char | c | ) |
|
|
inlinenoexcept |
Sets the separator character.
The default seprator is a tabulator character '\t'.
- Parameters
-
c | The separator character. |
◆ set_verbosity()
void lal::io::_process_treebank_base::set_verbosity |
( |
int | k | ) |
|
|
inlinenoexcept |
Sets the level of verbosity of the process methods.
Default is 0 (i.e., no verbosity at all). Verbosity is classified by levels:
- Level 1: outputs progress messages.
- Level 2: outputs error messages.
- Parameters
-
◆ m_be_verbose
int lal::io::_process_treebank_base::m_be_verbose = 0 |
|
protected |
The verbosity of the processor.
When set to a value greater than or equal to 1, method process will output progress messages.
The documentation for this class was generated from the following file: