DocWire DocToText - Powered by Silvercoders 5.0.5
A multifaceted, data extraction software development toolkit that converts all sorts of files to plain text and html. Written in C++, this data extraction tool has a parser able to convert PST & OST files along with a brand new API for better file processing. To enhance its utility, DocToText, as a data extraction tool, can be integrated with other data mining and data analytics applications. It comes equipped with a high grade, scriptable and trainable OCR that has LSTM neural networks based character recognition. This document parser is able to extract metadata along with annotations and supports a list of formats that include: DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), PDF, EML, HTML, Outlook (PST, OST), Image (JPG, JPEG, JFIF, BMP, PNM, PNG, TIFF, WEBP) and DICOM (DCM)
parsing_chain.h
1/***************************************************************************************************************************************************/
2/* DocToText - A multifaceted, data extraction software development toolkit that converts all sorts of files to plain text and html. */
3/* Written in C++, this data extraction tool has a parser able to convert PST & OST files along with a brand new API for better file processing. */
4/* To enhance its utility, DocToText, as a data extraction tool, can be integrated with other data mining and data analytics applications. */
5/* It comes equipped with a high grade, scriptable and trainable OCR that has LSTM neural networks based character recognition. */
6/* */
7/* This document parser is able to extract metadata along with annotations and supports a list of formats that include: */
8/* DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), */
9/* PDF, EML, HTML, Outlook (PST, OST), Image (JPG, JPEG, JFIF, BMP, PNM, PNG, TIFF, WEBP) and DICOM (DCM) */
10/* */
11/* Copyright (c) SILVERCODERS Ltd */
12/* http://silvercoders.com */
13/* */
14/* Project homepage: */
15/* http://silvercoders.com/en/products/doctotext */
16/* https://www.docwire.io/ */
17/* */
18/* The GNU General Public License version 2 as published by the Free Software Foundation and found in the file COPYING.GPL permits */
19/* the distribution and/or modification of this application. */
20/* */
21/* Please keep in mind that any attempt to circumvent the terms of the GNU General Public License by employing wrappers, pipelines, */
22/* client/server protocols, etc. is illegal. You must purchase a commercial license if your program, which is distributed under a license */
23/* other than the GNU General Public License version 2, directly or indirectly calls any portion of this code. */
24/* Simply stop using the product if you disagree with this viewpoint. */
25/* */
26/* According to the terms of the license provided by SILVERCODERS and included in the file COPYING.COM, licensees in possession of */
27/* a current commercial license for this product may use this file. */
28/* */
29/* This program is provided WITHOUT ANY WARRANTY, not even the implicit warranty of merchantability or fitness for a particular purpose. */
30/* It is supplied in the hope that it will be useful. */
31/***************************************************************************************************************************************************/
32
33#ifndef PROCESS_H
34#define PROCESS_H
35
36#include <iostream>
37#include "defines.h"
38
39namespace doctotext
40{
41
42class Importer;
43class Exporter;
44class Transformer;
45
54class DllExport ParsingChain
55{
56public:
62 ParsingChain(const Importer &importer, const Exporter &exporter);
63
64 ParsingChain(const ParsingChain &other);
65
66 ParsingChain(const ParsingChain &&other);
67
68 virtual ~ParsingChain();
69
70 ParsingChain& operator=(const ParsingChain &other);
71
72 ParsingChain& operator=(const ParsingChain &&other);
73
74 DllExport friend ParsingChain operator|(std::istream &input_stream, ParsingChain &&parsing_process);
75
76 DllExport friend ParsingChain operator|(std::istream &input_stream, ParsingChain &parsing_process);
77
78 DllExport friend ParsingChain operator|(std::istream &&input_stream, ParsingChain &&parsing_process);
79
80 DllExport friend ParsingChain operator|(std::istream &&input_stream, ParsingChain &parsing_process);
81
86 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, std::ostream &out_stream);
87
92 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, std::ostream &out_stream);
93
98 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, std::ostream &&out_stream);
99
104 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, std::ostream &&out_stream);
105
110 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Transformer &&transformer);
111
116 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Transformer &transformer);
117
122 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Transformer &&transformer);
123
128 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Transformer &transformer);
129
134 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Exporter &&exporter);
135
140 DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Exporter &exporter);
141
146 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Exporter &&exporter);
147
152 DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Exporter &exporter);
153
154private:
155 struct Implementation;
156 std::unique_ptr<Implementation> impl;
157};
158
159DllExport ParsingChain operator|(std::istream &input_stream, const Importer &importer);
160DllExport ParsingChain operator|(std::istream &input_stream, const Importer &&importer);
161DllExport ParsingChain operator|(std::istream &&input_stream, const Importer &importer);
162DllExport ParsingChain operator|(std::istream &&input_stream, const Importer &&importer);
163DllExport ParsingChain operator|(const Importer &importer, Exporter &&exporter);
164DllExport ParsingChain operator|(const Importer &importer, Transformer &&transformer);
165DllExport ParsingChain operator|(const Importer &importer, Transformer &transformer);
166
167} // namespace doctotext
168
169#endif //PROCESS_H
Exporter class is responsible for exporting the parsed data from importer or transformer to an output...
Definition: exporter.h:59
The Importer class. This class is used to import a file and parse it using available parsers.
Definition: importer.h:57
ParsingChain class is a wrapper for all defined steps of the parsing process.
Definition: parsing_chain.h:55
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, std::ostream &&out_stream)
Adds output stream for the parsing process and starts process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, std::ostream &out_stream)
Adds output stream for the parsing process and starts process.
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Transformer &transformer)
Adds transformer for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Exporter &exporter)
Sets exporter for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Exporter &&exporter)
Sets exporter for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Transformer &transformer)
Adds transformer for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Exporter &&exporter)
Sets exporter for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Transformer &&transformer)
Adds transformer for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, Transformer &&transformer)
Adds transformer for the parsing process.
DllExport friend ParsingChain operator|(ParsingChain &&parsing_process, std::ostream &&out_stream)
Adds output stream for the parsing process and starts process.
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, Exporter &exporter)
Sets exporter for the parsing process.
ParsingChain(const Importer &importer, const Exporter &exporter)
Constructor New parsing process from importer and exporter.
DllExport friend ParsingChain operator|(ParsingChain &parsing_process, std::ostream &out_stream)
Adds output stream for the parsing process and starts process.
The Transformer transforms data from Importer or from another Transformer.
Definition: transformer.h:59