I'm interested in creating files where a source text and translation are interleaved with each other, so that each sentence (or small group of sentences) is immediately followed by its translation.
If we start with a source text and a translated text, the crucial step is figuring out which sentences in the source correspond with which sentences in the translation, since there is not necessarily a one-to-one correspondence.
So far I've been using machine translation of the source and looking for shared words between the MT text and the human translated text to correlate sentences. Here's the code and an example of the output (unfortunately, it gets the first sentence wrong, but after that it does okay).
This works semi-decently on the few texts I tried it on, but I'm just stumbling around and I was wondering if there are any standard tools or algorithms for doing something like this.