1. 程式人生 > >Ask HN: How to turn a tuple/array into a grammatically correct question

Ask HN: How to turn a tuple/array into a grammatically correct question

I have a tuple with four quantities: time, amount, location, action

I am looking for resources to help me automatically form grammatically correct questions from these tuples.

So for example: my_tuple = (11:30am, $20, online, buy)

I would want to form a question with at least two or more of the values. E.g

Where did you make a purchase of $20 around 11:30am? How much did you spend online around noon? What time did you spend $20 online? What did you do online around 11:30am?

I have looked at the Stanford parser but that thing is a behemoth and would probably only tackle a piece of the problem. Any ideas?