Question/answering is not done with one algorithm. It can be a combination of NLP algorithms such as part of speech tagging, semantic analysis, semantic and/or lexical parsing etc. Then many approaches can be used like supervised learning, clustering or just storing the information and indexing them.
Can you maybe explain what you are trying to do?