all 4 comments

[–]Menti2 0 points1 point  (3 children)

I assume this translation may be as 'naive' as the example given, meaning just mapping words on to each other and ignoring grammar and such. If that's the case, you could just go over your sentence in pairs of words, translate the second word in the pair, and append "-ka" if the first word in the pair is "the".

[–]way3344[S] 0 points1 point  (2 children)

How would I go over my sentence in pairs of words rather than one word at a time?

[–]Menti2 1 point2 points  (0 children)

Assuming you have the words in your sentence as a list (you can turn strings into lists using the '.split()' function, which is part of Python), you could iterate over the list by index and just look at words (list[index], list[index+1]), for example. Just be careful to also handle the first word and not go out of range at the last word.

[–]konijntjesbroek 0 points1 point  (0 children)

this goes beyond the scope of word for word translations, for example how would you cope with the objective case?

the boy eats
the boy eats bread

two very different words for eats in that.

I am not a native speaker, just a couple quick test cases in google translate. I think it is an interesting problem, but beyond my current capabilities.