I'd like to give something like this:
# John # eat + past # apple
and get back the grammatically correct sentence:
John ate an apple.
Which software can I use for such generation?
The example you give displays three grammatical aspects to deal with. First, the subject should agree with the verb by person and number, which is relevant in present tense: “John eats” and not “John eat”. Second, you need to construct the verb phrase correctly according to the required tense/aspect/voice, i.e., present-perfect-progressive will be “John has been eating an apple”. And third, you have to identify that “apple” is a count-singular noun and therefore it requires a determiner.
More grammatical rules may be relevant for other patterns you might want to support.
I’m not aware of any software that does exactly what you describe. However, in Contextors we use an internal tool for the first two aspects above.
I've purchased the book "Building natural language generation systems" by Ehud Reiter and Robert Dale, isbn 978-780521-024518. The book is old (issued in 2000), but enough to get the basics and the keywords for further search. The keywords:
Several systems are briefly described: