Translation service

Nick Thomas gemini at ur.gs
Fri Nov 27 00:56:22 GMT 2020


Hola mis amigos!

I didn't find a capsule offering translation services in Geminispace,
so I've put one together. It's linked from gemini://ur.gs, or you can
construct a translation request URL manually, like so:

gemini://ur.gs/cgi-bin/translate/en/es?Hello%20world

Only en->es and es->en are supported right now; he estado aprendiendo
español casi dos años ahora.

You can visit gemini://ur.gs/cgi-bin/translate to get a 10 prompt for
translation.

It's using apertium, running on the same machine as the gemini server. 
If people like the service, I'll set up a babel.ur.gs or so somewhere,
with more language pairs.

Improvements... well, visiting /translate could prompt for the source
language, and /translate/en could prompt for the destination language.
It could also, conceivably, take a URL to perform translation for.

Let me know what you think. I'm especially interested in translation
quality and responsiveness - I only learned about apertium todaym and
I've managed to get some pretty bad translations out of it so far :D.
If you have suggestions for alternatives, I'm all ears, although
apertium was pleasingly simple to set up. I might never visit deepl
again!

Source code for the cgi-bin script is here: 
https://code.ur.gs/lupine/capsule/src/branch/main/src/cgi-bin/translate
- it relies on the apertium and aperium-en-es packages being installed
on the same machine, and on everything being UTF-8 throughout.

/Nick



More information about the Gemini mailing list