Skip to content

[FEATURE]Abstract Translation Maybe a Good Idea #154

Open

Description

@GEN2FILM

Is your feature request related to a problem? Please describe.
When reading academic papers in foreign languages, it's often time-consuming and challenging to understand the abstract and title. Currently, users need to manually copy and paste text into separate translation tools, which interrupts the reading flow and reduces efficiency.

Describe the solution you'd like
I would like to implement an AI-powered translation feature in the APP that allows users to:

  • Selectively translate either the abstract or title sections of academic papers
  • Choose target languages for translation
  • Toggle between original and translated text easily
  • Access high-quality translations powered by advanced AI language models
  • Save translated versions for future reference

Describe alternatives you've considered

  1. Using built-in browser translation tools, but they often lack accuracy for academic content
  2. Implementing traditional machine translation APIs (like Google Translate), but they may not handle technical terminology well
  3. Creating a dictionary/glossary feature instead of full translation, but this wouldn't provide smooth reading experience

Additional context

  • The feature should support multiple languages
  • Translation should preserve academic formatting and technical terms
  • The interface should be minimalistic and non-intrusive
  • Users should have the option to provide feedback on translation quality
  • Offline translation capability would be beneficial for users with limited internet access

It will be a wide-spread APP, please add a button for coffee!!!

Activity

  1. Scriptbash commented on Jun 7, 2025

    @Scriptbash
    Owner

    Hi! That's a great idea! I've started looking at possible options:

    • LibreTranslate
      • Pros: Free and open-source, can be self-hosted, similar results to Google translate (also a con)
      • Cons: Not always accurate translations for technical terms, requires an internet connection (except if you travel with an instance 😅)
    • DeepL
      • Pros: Seems pretty accurate for translating technical terms
      • Cons: Proprietary, free API includes only 500k characters/months(~250 abstracts), paid API is quite expensive, online only
    • Google ML kit
      • Pros: On device AI model, completely offline, free
      • Cons: Proprietary, impossible to publish on F-droid due to Google APIs (would need to make a libre and non-libre builds)
      • No idea how good the translations are
      • Supports 58 languages

    I think Google ML kit would do pretty much everything you asked, but would require two build flavors. The libre build would have no translation capabilities (or maybe just LibreTranslate). I'm not sure if Google ML kit would work on Chinese devices🤔

    I'm also wondering how the translations will work with latex commands found in abstracts and titles.

  2. Scriptbash commented on Jun 7, 2025

    @Scriptbash
    Owner

    What do you think of this? 👀 That's using ML kit. In this case I think it did well (at least it did when translated in french), but other times it's really bad. I'll probably need to split the sentences instead of translating the abstracts all at once.

    wispar_translate_demo.webm
  3. GEN2FILM commented on Jun 8, 2025

    @GEN2FILM
    Author

    Hi, sorry for the late reply. The demo is fantastic, and I was really surprised by how well it works!

    I just have a question: if the service supports offline mode on our phones (I mainly use an iPhone), would that increase the risk of high RAM usage on older devices or cause storage issues? My concern is that if we have the option to use our own large language model (llama.cpp) or an OpenAI-compatible service, it would be better for people like me who use older devices or have limited storage.

    We definitely don’t want our app to keep getting bigger and bigger.

    Anyway, please keep up the great work—your demo is very impressive and has far exceeded my expectations. Well done!

  4. Scriptbash commented on Jun 8, 2025

    @Scriptbash
    Owner

    No worries at all! That's a good point. I just checked the RAM usage with an Android emulator and it didn't seem to spike at all! The RAM usage went up from 120MB to 130MB for a few seconds. The translations on my Pixel 7 are also almost instantaneous. I think it would work well for old devices too! As for storage, on my phone it takes about 3 seconds to download a new language (with a 400mbits/s internet connection), so I think the individual languages are quite small in size.

    I really like the idea of having a model like Llama! It would 1) allow the app to be published on F-Droid and 2) open other possibilities, like asking questions about an article, summarizing, etc. in the PDF reader. There are a few packages that allows using llama and other models on device : LangChain, llama SDK, fllama

    I tried using an app called Maid, which allows downloading different models and using it as an assistant. I tried TinyLlama 1.1B Chat, Llama 3.2 3 Instruct and Gemma 2 2B IT. Unfortunately, all of them were really slow to translate just one sentence. Llama 3.2 crashed the app and slowed down my phone considerably, Tiny Llama wasn't able to translate in the correct language and Gemma was just too slow.

    I don't know much about all these types of models and their variants, so maybe there is one somewhere that would be fast and accurate for translating.

    Edit: Maybe the slow responses and crash are problems with the Maid app, I tried the Google Play version with the gemma 3B IT Q2_k and it was much faster! I will try LangChain when I have some free time and experiment with some models!

  5. Scriptbash commented on Jul 21, 2025

    @Scriptbash
    Owner

    Hi! I have done a lot of tests using many flutter packages to run local AI models on phones. I found Llama.cpp packages to run very slow, even with small models (2b parameters, 4bits quantization). The best results I had was using flutter_gemma. It doesn't support Llama.cpp yet, but could run Gemma, DeepSeek and Phi models in LiteRT formats. The inference was very fast for 2B-3B parameters, 4bits and 8bits quantization. The problem was that I haven't been able to find pre-trained models for translations in that format. Gemma was the one giving the best results (at least for translating in french), but was still inaccurate most of the time and somewhat unpredictable.

    The ideal would have been to use Google ML kit, but unless the APIs get added to MicroG, I would need a libre and non-libre version of the app... which I was not successful at 😅

    I think I will use online APIs instead, as they usually give excellent translations and the app should still be accepted in F-Droid. I would have preferred offline translations, but I think accurate translations are more important and useful. I will save translations so that they can be used offline too. I currently have Gemini, DeepSeek and ChatGPT as options. Users will need to provide their API keys, but Gemini can be used for free and DeepSeek is very cheap (<0.01USD for 8 translations). Using online APIs will also allow to chat with downloaded PDF files.

  6. Scriptbash commented on Jul 22, 2025

    @Scriptbash
    Owner

    Little update again! Here's how it currently looks like. One translation is saved per article and a button allows for switching between the original text and the translation. The AI providers available in the drop-down menu are only shown when an API key is set for it. So if only a Gemini key is provided in the settings, only Gemini will be shown.

    Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-07-22.at.19.03.19.mp4
  7. ShaoweiCheng commented on Aug 26, 2025

    @ShaoweiCheng

    I really like this feature! I was wondering if you could add a function in the "AI settings" so that I can deliver my own prompt to the AI online model.

  8. Scriptbash commented on Aug 27, 2025

    @Scriptbash
    Owner

    Glad you like it! Sure, I'll add that as an option for the next update! Do you think you would want to change the prompt frequently? If so, I could add it to the bottom sheet that pops up when tapping the translate button.

  9. ShaoweiCheng commented on Aug 28, 2025

    @ShaoweiCheng

    Glad you like it! Sure, I'll add that as an option for the next update! Do you think you would want to change the prompt frequently? If so, I could add it to the bottom sheet that pops up when tapping the translate button.

    Thanks for thinking this through so carefully. In your update, it would be super handy if we could save a few prompts as options — with one set as the default (used when nothing is selected), and the others easy to choose from when translating. That would make the settings really convenient.

    On another note, I’d like to make a suggestion. For titles and abstracts I’ve already read, or ones I don’t really need to see again, would it be possible to add a “hide” feature? For example, maybe an icon or a checkbox that lets me hide them. That way, the next time I’m browsing, I won’t have to see those papers show up again.

    Thanks so much for all the work and effort you’ve put into improving this program!

  10. Scriptbash commented on Aug 28, 2025

    @Scriptbash
    Owner

    I like that idea! I'll go with the few custom prompts option!

    As for a hiding feature, there is already one available in the Home screen. You can tap the options menu on any card and select "Hide this publication". Alternatively, you can swipe a card from right to left to reveal a "Send to Zotero" and "Hide this publication" buttons. The option to hide publications is not available in the Favorites screen, since the publications can simply be removed from the favorites. Hidden publications can be viewed (and unhidden) by tapping the Wispar button in the top right corner of the Home screen, then "View hidden publications". Is this what you were looking for?

  11. ShaoweiCheng commented on Aug 29, 2025

    @ShaoweiCheng

    As for a hiding feature, there is already one available in the Home screen. ...

    Thanks for your reply about the hiding feature — that’s exactly what I was looking for! I found it on the Home screen, which is awesome. The reason I didn’t notice it before is because of my reading habit: I usually go into the Library and read all the papers from a specific journal. But inside a single journal’s card in the Library, there isn’t a “Hide this publication” option.

    Based on that, I have a bit of a personal favor to ask: would it be possible to also have a “Hide This Publication” option when I’m reading all the papers from a single journal in the Library? Another approach could be allowing me to select a single journal on the Home screen so that it only shows articles from that journal (without having to type the journal name into search every time). If that could work together with the “Hide This Publication” feature on the Home screen, it would make my reading flow a lot more efficient given my habits. Thanks again!

    ***Note. I just realized that the request I mentioned above can actually be done by setting up a customized Feed on the Home screen. That’s perfect — problem solved! Thanks so much for providing such a useful app.

  12. ShaoweiCheng commented on Aug 31, 2025

    @ShaoweiCheng

    About the abstract translator, I have a couple more requests (I hope I’m not asking for too much).

    1. Would it be possible to let me manually input the model name I want to use (e.g., o3, gpt-5, etc.)
    2. Sometimes the abstract can’t be displayed directly in the card, so I click “View article” and access the abstract through an EZproxy link. In that situation, I can mark or copy the abstract text. Would it be possible to add a feature that lets me send the marked/copied text from the EZproxy view back into Wispar’s translator for translation?

    Thanks so much for taking the time to read through my requests. I really hope Wispar continues to grow and become even more convenient to use. I truly appreciate all your hard work.

  13. Scriptbash commented on Sep 1, 2025

    @Scriptbash
    Owner

    I'm quite happy you found an alternative using the custom feeds, otherwise it would have required quite a lot of changes to make it possible to hide cards in the journals view 😅

    Absolutely not, I'm glad to receive feedback and suggestions! For model names, you can change the model by going into the AI settings. You can type a different model name in one of the fields (it currently defaults on gpt-4o for ChatGPT). Did you mean to have an option similar to the prompts, where you can define several models and be able to pick the one you want in the translation sheet?

    As for the missing abstracts, is the abstract scraping not working correctly? If possible, can you send me a DOI that you are having problems with the abstract? Even without an EZproxy, the abstracts are usually available on the website and the scraper should be able to get them.

    For other requests, it may be best to open a different issue, as we probably send a notification to the original poster with every replies. Thanks for the kind words, I appreciate it! :D

  14. ShaoweiCheng commented on Sep 2, 2025

    @ShaoweiCheng

    Absolutely not, I'm glad to receive feedback and suggestions! For model names, you can change the model by going into the AI settings. You can type a different model name in one of the fields (it currently defaults on gpt-4o for ChatGPT). Did you mean to have an option similar to the prompts, where you can define several models and be able to pick the one you want in the translation sheet?

    1. Thanks for pointing me to where I can change the model name — I hadn’t noticed that setting before.
    2. Since I don’t change the model very often, I don’t think it needs options like the ones for prompts.
    3. I did run into an issue though: when I enter certain model names (e.g., o3, gpt-5), the translation fails and I get the following error message:
    Image
  15. ShaoweiCheng commented on Sep 2, 2025

    @ShaoweiCheng

    As for the missing abstracts, is the abstract scraping not working correctly? If possible, can you send me a DOI that you are having problems with the abstract? Even without an EZproxy, the abstracts are usually available on the website and the scraper should be able to get them.

    I’m not entirely sure if the issue is with the abstract scraping itself, but I haven’t been able to read the abstracts for papers from certain journals — in fact, all the abstracts are missing for those journals. Here are some examples where every article seems to have a missing abstract: The Annals of Statistics, The Annals of Applied Statistics, Statistical Science, and Statistica Sinica.

  16. Scriptbash commented on Sep 3, 2025

    @Scriptbash
    Owner

    I have adapted the abstract scraper, it now works with the journals of Institute of Mathematical Statistics! The only one I can't make it work is Statistica, since the URLs are pointing directly to the PDF files and not to a website with an abstract.

    I've also added a temperature slider, so gpt-5 and o3 should now work. For chatGPT, I changed the default temperature to 1.0.
    I added 3 custom prompts in the settings. You need to use the placeholders $src (source language) $dst (target language) and $text (title/abstract text). The custom prompts will show in the translation sheet. The prompts I used in the following video weren't very good, you may need to constrain it more than I did 😅

    Screen.Recording.2025-09-02.at.9.04.08.PM.mov
  17. ShaoweiCheng commented on Sep 3, 2025

    @ShaoweiCheng

    Awesome! Looking forward to using the new version of Wispar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions