Such tasks are known collectively as Sequence-to-Sequence (Seq2seq) Learning. In all of these tasks, the input and desired output are strings, which may be of different lengths and which are usually not in one-to-one correspondence with each other.
Suppose you have a dataset of paired exampl...