Jump to content

Where do I begin? - Answering a question with PHP/NLP


sug15

Recommended Posts

Alright, I have been trying to work on this but it has been difficult. I looked at the Python NLTK but I don't think that will be of much help.

 

Let's say I have a database full of facts, and one of them is "highway - a main road". The user enters a question, let's say "What is a highway?". I want to be able to pull the the answer from the database and then form it into proper English. For example, in this case, I would like it to form "A highway is a main road". Let's say the user asks "what are highways. It should answer "Highways are main stretches of road". Then I could get into more complex sentences as I gather more data, for example "What is the average distance of a highway in the United States?" wouldn't just be giving a definition.

 

Yes, I know this is pretty complex, but does anyone know where I could start? I have the basics, obviously - break up a sentence, interpret the words, try and figure out what tense it is in and if it's plural, then figuring out what it's asking, and then of course generating an answer. I don't have much of an idea how to do this, though. If anyone could give me an idea of where to start that would be great.

 

Thanks a lot.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.