Summarization API, with Generative AI

What is Summarization?

Text summarization simply is the process of summarizing a block of text in order to make it shorter.

Generative AI models like ChatGPT, GPT-3.5, GPT-4, LLaMA 3, Yi 34B, and Mixtral 8x7B, are very good at performing text summarization.

Let's say you have the following block of text:

The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.

This technical description is quite long and maybe not all these details are necessary for a common reader to grasp the general idea. So we now want to leverage machine learning in order to automatically summarize this piece of text.

A summarization model would return something like this:

The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world.

Interesting isn't it? As you can see, the general idea is still there, but tons of details were stripped. It makes the text half its initial size!

There are several types of summarizations. For example "headline generation" is about generating a very short sentence, perfectly suited for a blog or news title. "Dialogue summarization" is about converting a whole dialogue into a condensed version. "Extraction summarization" means that the summary is only made of sentences from the original text, while "abstractive summarization" means that new content can be created in the summary.

Summarization

Why Use Summarization?

Text summarization can be usefully used in many situations. Here are a couple of examples.

News Review

Some jobs require a huge amount of time dedicated to reading the news. It is especially true in marketing and commercial departments. Feeding analysts with summarized content can help them save a lot of time and energy.

Content Creation

If your company is creating a lot of content on a regular basis, it is very likely that this content has to be summarized after every article creation in order to serve as a headline and be pushed to social networks. Why not automate this?

Legal Documents Parsing

Reading a lot of legal documents everyday is long an exhausting. Sometimes, reading all the details is not vital. In that case, providing people with a summary in addition to the original text can be a great productivity booster.

Reports Generation

Writing reports is sometimes compulsory for your customers, your management, or your colleagues. Summarization can definitely alleviate this task.

NLP Cloud's Summarization API

NLP Cloud proposes a text summarization API that allows you to perform summarization out of the box, based on several advanced AI models like Meta's Bart Large CNN model and Google T5, and even generative AI models like LLaMA 3, Yi 34B, and Mixtral 8x7B. These models are very good alternatives to ChatGPT, GPT-3.5, and GPT-4. You can either use our pre-trained model, train your own models, or upload your own custom models!

For more details, see our documentation about text summarization here.

Testing text summarization locally is one thing, but using it reliably in production is another thing. With NLP Cloud you can just do both!

Frequently Asked Questions

What is text summarization?

Text summarization is the process of extracting the most important information from a source text and presenting it in a shorter form. It aims to capture the essence of the content, making it quicker and easier to understand the main points without reading the entire text.

What are the key benefits of using AI for text summarization?

AI for text summarization enables quick comprehension of lengthy documents by distilling them into concise summaries, saving time and increasing productivity. It also ensures consistency and objectivity in understanding vast volumes of information, aiding in better decision-making.

What are the differences between extractive and abstractive summarization?

Extractive summarization involves selecting and compiling phrases or sentences from the original text to form a summary, without altering the original text. Abstractive summarization, on the other hand, involves paraphrasing and rewriting the content to create a new, concise version of the information, often generating new sentences not found in the original text.

How to evaluate the accuracy of AI summarization?

Evaluating the accuracy of AI summarization is not easy. It involves comparing the AI-generated summaries to a set of human-generated reference summaries using metrics like ROUGE (Recall-Oriented Understudy for Gisting Evaluation) for overlap in key phrases and concepts. Additionally, human evaluators may assess the quality, coherence, and fidelity of the summaries to ensure they accurately represent the original content's meaning.

What types of documents or text formats are supported by your summarization API?

Any text based document can be summarized (plain text, HTML files, markdown files, CSV...)

What languages does your AI API support for summarization?

We support summarization in 200 languages

Can I try your summarization API for free?

Yes, like all the models on NLP Cloud, the summarization API endpoint can be tested for free

How does your AI API handle data privacy and security during the summarization process?

NLP Cloud is focused on data privacy by design: we do not log or store the content of the requests you make on our API. NLP Cloud is both HIPAA and GDPR compliant.