LinguaCafe icon indicating copy to clipboard operation
LinguaCafe copied to clipboard

Feature: Add context to requests for custom API services. (PR included)

Open lnikonl opened this issue 11 months ago • 1 comments

Feature: Add context to requests for custom API services.

Use case: When using LLM models for a custom dictionary, the translation quality will be more accurate if the context is added to the query. And it is possible to use it as part of the prompt.

Created PR for implement this feature: https://github.com/simjanos-dev/LinguaCafe/pull/394

lnikonl avatar Jan 10 '25 08:01 lnikonl

Hi!

Sorry for the late response.

Thank you! I'll try to review and merge this PR when I'll have time.

simjanos-dev avatar Mar 09 '25 14:03 simjanos-dev

Thank you for your efforts in merging this feature. I have been using this feature for over six months now, and here is my opinion.

In fact, I went through three stages of working with the dictionary:

  1. deepl + imported simple dict from dictd dictionary Pros: - Easy setup and works right out of the box Cons: - deepl only suggests the most common word, which often does not fit the context of the sentence. - deepl does not provide transcription, which is inconvenient for languages where pronunciation is often unpredictable.

  2. deepl + dictd dictionaries (with transcription and full dictionary entries) Pros: - You can add transcription to LinguaCafe dictionary cards - The full dictionary entry allows you to find a translation that matches the context Cons: - Transcription is available only for the most common words - The full dictionary entry is not very convenient to add to LinguaCafe cards due to its volume; I had to edit and remove unnecessary data to make the card shorter (very inconvenient when using a smartphone) - No possibility to get transcription for phrases

  3. custom API + ChatGPT bot as a card creator for words Pros: - You get a ready-made card for the word including transcription and translation matching the sentence context! (You can also add incoming words to your own database and accumulate word+context pairs (for cache and etc.), and so on, up to creating Anki cards) - Convenient to use on a phone — basically just tap the word and add the ready card to the LinguaCafe dictionary Cons: - You need to write your own service for the custom API (I’m not aware of any ready-made ones yet, as this functionality is probably still in beta)

I used stage 1 for about 2 months, stage 2 for 2-3 months, and have been using stage 3 since it was created — for over six months now (it is best for me).

lnikonl avatar Jul 17 '25 23:07 lnikonl

PR merged.

simjanos-dev avatar Jul 26 '25 09:07 simjanos-dev