I have a web application that translates sentences into English; the user selects options from the drop-down lists that basically provide context. Now I want to turn the word and context into an English sentence.
In one case, the user selects “who” and “when”, “who” can be: me, you, you two, he, she, we, they. “When” can be: “did”, “will do”, “can do”, “does”, “do it!”. Therefore, in the end, I would get the word that the user has enclosed, as well as who and when. ex. “sing”, “you”, “did”, received the English sentence “You sang”.
In another case, with transitive verbs such as “chase”, there will still be “who” and “when”, as well as another version of “done”, which is basically a different who menu. ex. “Chase,” “I,” “I will do it,” “they” will receive the English sentence “I am going to pursue them.”
I am new to NLTK, so I don’t know where to start this problem. Can someone point me in a general direction where to start?
source share