Proposal for new Summarizer API

Hello LibreTranslate Team,

have you ever thought about extending the API and offering a Summarizer?

As far as I understand, Argos offers this in the sources.
And if you believe what they say, it is quite easy to implement (or maybe not so easy … unfortunately I cannot estimate).

It would be very desirable if LibreTranslate would offer this service as well.
I know the project is called LibreTranslate and not LibreSummarize, but it would put the crown on the really great application.

It would be nice if there were two more API calls.

  1. Summarize
  2. Translate+Summarize (so all in one call)

If I cause any annoyance with my suggestion, then I take it all back.
In any case LibreTranslate is first class.
Thank you for your work and your commitment to the community!

2 Likes

CTranslate2 used to have some support for summarization but I don’t currently see anything about it in the docs.

You could try to use Argos Translate for summarization by, for example, translating from “en” → “summary”. I think the OpenNMT-py models that Argos Translate uses only support 150 characters in their context window so you would need to use some other model.

TLDR: Currently there’s no support for summarizing but it’s probably possilble

1 Like

I find your thoughts that a Summarizer for English might be possible very exciting.

It would be great to see what the community thinks about it. And if someone needs another language, then you can first translate to English, make a summary, and then translate to the desired language.

As I said, it’s a suggestion and unfortunately I can’t support it since I have no experience with Python at all.

I just think it could be interesting to be able to summarize an (English) text.
In case of doubt with some additional conditions like {… “maxSummarySize”:ddd … } but I don’t think a limitation is really important.
It would be great to have a switch {… “summarize”:true …} which then (at the beginning or in general) is only supported for “… → en” translations.

1 Like

I probably won’t add summarization support to Argos Translate anytime soon. The niche I’ve tried to focus on for Argos Translate is specifically machine translation on lower end hardware.

I’ve done some experiments with using OpenNMT-py models for more task, for example, in the v2 branch of Argos Translate there is support for using a neural language model to do sentence boundary detection and split sentences for translation. I also may try to add support for language detection or text to speech in the future but for now I’ve found that the extra features either don’t work that well or aren’t worth the extra code complexity.

2 Likes