I think this is a really cool idea and would be something I would use. Is there some way to translate short phrases like "drehte sich um" all together rather than word by word?
That would be really helpful because taken out of context, single words translated to English will often produce very confusing results. My suggestion would be to ditch the google links and provide a properly translated version that is revealed when hovering over a word/phrase. Such a translation could be crowd sourced.
GPT-4 Prompt: Please assist with providing English glosses for a German text. For phrases which are not easily interpreted word-for-word, please provide a gloss for the whole phrase. Otherwise, provide a gloss for each word. You may output the glosses as a list, one gloss per line, german on left, followed by an arrow (-->), and then the english gloss.
Here's some of the output:
Es --> It
war --> was
ein --> a
sonniger --> sunny
Tag --> day
im --> in the
Wald --> forest
und --> and
ein --> a
Mädchen --> girl
namens --> named
Lisa --> Lisa
ging --> went
spazieren --> for a walk
Sie --> She
hörte --> heard
plötzlich --> suddenly
ein --> a
Geräusch --> noise
und --> and
drehte --> turned
sich --> herself
um --> around
I was expecting "drehte sich um" to be grouped together, but I'm pleased with the glosses.
Note how "sich" is glossed with "herself". That's understanding the context properly. Much more useful than a dictionary definition of "sich". Similar for "sonniger" which Google translated as "sunnier" out of context.
EDIT: Note that GPT-3.5 gave me exactly the same glosses.
+1 One could display a small context menu with a "Translate" button whenever the user selects text. (Similarly to the "Share this on Twitter/Facebook/… menu on Medium".)