symbsrcool on Nostr: Yep, that’s what we do. A special syntax counter keeps track of where each piece of ...
Yep, that’s what we do. A special syntax counter keeps track of where each piece of non translated text goes and inserts it back in after we get the translation. This does assume the translation service will leave the symbol of the counter untouched. Currently we use AWS machine translation as the translator and it’s nearly perfect at leaving the symbols in place. Haven’t tested LibreTranslate tho.
While our code isn’t open source, I’d be happy to share my logic there as I wrote it in python.
Are you open to offering paid translation services through the client? You could offer libre translate as a free option as well. That’s what damus has.
Published at
2023-10-29 16:59:36Event JSON
{
"id": "45936e6b6a03be3c2033d8f53e008772e35780a96a80901a9bb4c814febbffb6",
"pubkey": "444960e888caa7015071c69e45e954ccd336cffceaff079d8563bc1a62cf6771",
"created_at": 1698598776,
"kind": 1,
"tags": [
[
"e",
"107ef896213ebfa546247a982dc84601c2388eeef58c96228c553cbf1b700143",
"wss://nostrue.com"
],
[
"e",
"72356ec1713be0579c45e1e973d254d62082a90698b80a1992a7bbf01da71c4e"
],
[
"p",
"72f9755501e1a4464f7277d86120f67e7f7ec3a84ef6813cc7606bf5e0870ff3"
],
[
"p",
"f4db5270bd991b17bea1e6d035f45dee392919c29474bbac10342d223c74e0d0"
],
[
"p",
"266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5"
]
],
"content": "Yep, that’s what we do. A special syntax counter keeps track of where each piece of non translated text goes and inserts it back in after we get the translation. This does assume the translation service will leave the symbol of the counter untouched. Currently we use AWS machine translation as the translator and it’s nearly perfect at leaving the symbols in place. Haven’t tested LibreTranslate tho.\n\nWhile our code isn’t open source, I’d be happy to share my logic there as I wrote it in python. \n\nAre you open to offering paid translation services through the client? You could offer libre translate as a free option as well. That’s what damus has.",
"sig": "55bf371fd2765fd0617852609367aec7beb71e314e0549952e91c2f4b37ddc4713302bf5f74c515131430a8c10f3b98d4ba3c81a482d548e972314ebad0a65fb"
}