DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
txt_parser.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_TXT_PARSER_H
13 #define DOCWIRE_TXT_PARSER_H
14 
15 #include "chain_element.h"
16 #include "plain_text_export.h"
17 
18 namespace docwire
19 {
20 
21 struct parse_paragraphs { bool v; };
22 struct parse_lines { bool v; };
23 
24 class DOCWIRE_PLAIN_TEXT_EXPORT txt_parser : public chain_element, public with_pimpl<txt_parser>
25 {
26  public:
27 
28  txt_parser(
29  parse_paragraphs parse_paragraphs_arg = parse_paragraphs{true},
30  parse_lines parse_lines_arg = parse_lines{true});
31 
32  continuation operator()(message_ptr msg, const message_callbacks& emit_message) override;
33  bool is_leaf() const override { return false; }
34 
35 private:
37 };
38 
39 } // namespace docwire
40 
41 #endif
bool is_leaf() const override
Check if chain element is a leaf (last element which doesn't produce any messages)....
Definition: txt_parser.h:33
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19