Summarize Word, PDF, Web documents in C++

C++ solution for summarizing documents using AI

Seamless integration with major language models such as OpenAI and Gemini provides extensive AI-based document processing capabilities for C++ applications.

View code snippet

Intelligent Text Summarization for C++ Applications

Extract key information from texts and documents programmatically. Generate concise, informative summaries that capture the meaning of text using large language models (LLM) in C++. The applications of software text summarization are vast and varied. Text summarization can be used to provide up-to-date information on current events. By integrating text summarization function into your software, you will not only increase productivity, but also improve decision making by accessing important data as quickly as possible.

Key Features

  • Easy-to-use API that easily integrates with C++ software
  • Ability to integrate with various LLM models to meet your needs
  • Ability to customize text summarization settings
  • Support for a wide range of file formats

The interaction between Aspose.Words and Large Language Models is built on a REST architecture. This approach provides reliable and secure communication between your C++ application and various AI services. To set up authentication, you will need to specify your private API key and the `endpoint` of the AI service that provides the models you need (GoogleAiModel, OpenAiModel). For a full list of supported LLM types, see the API Reference.

Experience the future of intelligent text processing in C++ today!

Example code in C++ for summarizing a document
Select the target format from the list
Run code
dotnet add package Aspose.Words.Cpp
Copy
auto doc = System::MakeObject<Aspose::Words::Document>(u"Document.docx");
auto apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");

// Use OpenAI or Google generative language models.
const auto modelType = Aspose::Words::AI::AiModelType::Gpt4OMini;
auto model = System::ExplicitCast<Aspose::Words::AI::IAiModelText>(Aspose::Words::AI::AiModel::Create(modelType)->WithApiKey(apiKey));

auto summarizeOptions = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
summarizeOptions->set_SummaryLength(Aspose::Words::AI::SummaryLength::Short);
auto summary = model->Summarize(doc, summarizeOptions);
summary->Save(u"Output.pdf");
Run code

How to summarize a document in C++

  1. Install Aspose.Words for C++.
  2. Add a library reference (import the library) to your C++ project.
  3. Open the source file in C++.
  4. Invoke method, passing in your document along with the SummarizeOptions parameter.
  5. Once completed, you will receive a concise document summary that you can save as a new file in the format you need.

C++ library to summarize documents

There are three options to install Aspose.Words for C++ to your developer environment. Please choose one that resembles your needs and follow the step-by-step instructions:

System Requirements

You can use this C++ library to develop software on Microsoft Windows, Linux and macOS operating systems:

  • GCC >= 6.3.0 and Clang >= 3.9.1 are required for Linux
  • Xcode >= 12.5.1, Clang and libc++ are required for macOS

If you develop software for Linux or macOS, please check information on additional library dependencies (fontconfig and mesa-glu open-source packages) in Product Documentation.

5%

Subscribe to Aspose Product Updates

Get monthly newsletters and offers directly delivered to your mailbox.

© Aspose Pty Ltd 2001-2025. All Rights Reserved.