# How could you generate sentences from lists of facts

Let's pretend we had a list of facts (similar to prolog tuples) that define some knowledge about some entities. e.g.

doing(clean, data)
done(collect, data)
todo(train, model)
todo(write, paper)


What methods could I use to generate sentences like:

You should be cleaning the data you collected, then you need to train your model and write your paper.

When you parse sentences you use grammatics to sentences to get the meaning (semantics).

Now you use sematics (tuples) and grammatics to make a sentence.

Your knowledge includes verb, noun and some kind of notion of readiness of the task defined by them.

To form sentences you also need knowledge / rules about the extra eligible words between these categories, as well as how time relates to verb grammatical tense.

You have to code a parser for tuples that codes the tuple in the three parts, formulate the grammatics, and then apply the grammatics to the parsed tuple data.

After that you'll get the sentences.

More precise information on how to code that and this information plus the picture source:

http://cs.union.edu/~striegnk/courses/nlp-with-prolog/html/node93.html#l14.sec.nlg