Serializes a Treebank into CoNLL-U formatted output.
More...
#include <writer.hpp>
|
|
constexpr | Writer () noexcept=default |
| | Default constructor. Initializes a writer with default options.
|
| constexpr | Writer (WriterOptions options) noexcept |
| | Constructs a writer with the given options.
|
| std::error_code | write (const Treebank *treebank, std::ostream &&stream) const noexcept |
| | Writes a treebank in CoNLL-U format to a stream.
|
| std::error_code | write_file (const Treebank *treebank, const std::filesystem::path &path) const noexcept |
| | Serializes treebank in CoNLL-U format and writes it to the file at path.
|
|
constexpr | ~Writer () noexcept=default |
| | Destructor.
|
Serializes a Treebank into CoNLL-U formatted output.
◆ Writer()
|
|
explicitconstexprnoexcept |
Constructs a writer with the given options.
- Parameters
-
| [in] | options | Writing configuration to use. |
◆ write()
| std::error_code tg::conllu::Writer::write |
( |
const Treebank * | treebank, |
|
|
std::ostream && | stream ) const |
|
nodiscardnoexcept |
Writes a treebank in CoNLL-U format to a stream.
- Parameters
-
| [in] | treebank | Treebank to serialize. |
| [in] | stream | Output stream to write to. |
- Returns
- Empty error_code on success, or an error describing the first failure encountered.
◆ write_file()
| std::error_code tg::conllu::Writer::write_file |
( |
const Treebank * | treebank, |
|
|
const std::filesystem::path & | path ) const |
|
nodiscardnoexcept |
Serializes treebank in CoNLL-U format and writes it to the file at path.
- Parameters
-
| [in] | treebank | Treebank to serialize. |
| [in] | path | Path to the file to write. |
- Returns
- Empty error_code on success, or an error describing why the file could not be opened/written or why serialization failed.
The documentation for this class was generated from the following file: