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)
example_9.cpp

[plugin_example_1]

[plugin_example_1]

#include <iostream>
#include <memory>
#include <optional>
#include "parser.h"
#include "parser_builder.h"
#include "parser_provider.h"
#include "simple_extractor.h"
using namespace doctotext;
{
void parse() const override
{
// parsing process (see doctotext::Parser)
}
virtual Parser &addOnNewNodeCallback(NewNodeCallback callback) override
{
// manage callbacks (see doctotext::Parser)
return *this;
}
};
{
std::unique_ptr<Parser> build(const std::string &inFileName) const override
{
// build new parser from file (see doctotext::ParserBuilder)
}
std::unique_ptr<Parser> build(const char *buffer, size_t size) const override
{
// build new parser from data buffer (see doctotext::ParserBuilder)
}
};
#include <boost/config.hpp>
{
std::optional<ParserBuilder*> findParserByExtension(const std::string &extension) const override
{
return std::nullopt;
}
std::optional<ParserBuilder*> findParserByData(const std::vector<char>& buffer) const override
{
return std::nullopt;
}
std::set<std::string> getAvailableExtensions() const override
{
return {".custom"};
}
};
extern "C" BOOST_SYMBOL_EXPORT CustomParserProvider custom_parser_provider;
CustomParserProvider custom_parser_provider;
int main(int argc, char* argv[])
{
doctotext::SimpleExtractor extractor("file.custom", "path_tp_directory_with_plugins");
std::cout << extractor.getPlainText();
return 0;
}
[plugin_example_1]
Definition: example_9.cpp:53
Abstract class for all parsers.
Definition: parser.h:130
The ParserProvider class.
The SimpleExtractor class provides basic functionality for extracting text from a document.