Natural language query processing

I am trying to implement a natural language query preprocessing module which would, given a query formulated in natural language, extract the keywords from that query and submit it to an IR (information retrieval system) system.

At first, I thought about using some training set to compute TF-IDF values of terms and use these values for estimating the importance of single words. But on second thought, this does not make any sense in this scenario - I only have a training collection but I dont have access to index the indexed IR data. Would it be reasonable to only use the IDF value for such estimation (is IDF enough to establish weight of a term in general)? Or maybe another weighting approach?

Could you suggest how to tackle this problem? Usually, the articles about NLP processing that I read talks about training and test data sets. But what if I only have the query and training data?

• I don't really understand your question :( could you please add some more detail. TF-IDF can be calculated on any set of documents. You give me a set of webpages then I can calculate the TF-IDF weighting for all the words in them, period. – jhegedus Nov 23 '14 at 19:58
• Please update with $\text{Input}$ and $\text{Output}$ examples. – lucasoliveira Feb 21 '15 at 22:34