views:

92

answers:

1

I have a web application that translates sentences into English; the user chooses options from drop downs that basically provide the context. Now I want to turn the word and the context into an English sentence.

One case is that the user chooses 'who' and 'when', 'who' could be: I, you, you two, he, she, we, they. 'When' could be: 'did it', 'will do it', 'might do it', 'does it', 'do it!'. So in the end I would have the word that the user put in, as well as who and when. ex. 'sing', 'you', 'did it' would get the English sentence "You sang".

Another case is with transitive verbs like "chase", there would still be 'who' and 'when' but also another option of 'done to' which is basically another 'who' menu. ex. 'chase', 'I', 'will do it', 'they' would get the English sentence "I am going to chase them".

I'm new to the NLTK so I don't really know where to start with this problem. Can anyone point me in the general direction of where to start with this?

+3  A: 

NLTK is a fairly large project containing a lot of useful tools. I'd suggest starting out by reading the NLTK Book, which is very well done. You can probably skim the first few chapters.

The stuff you're looking for is in chapters 7 and beyond.

jjfine