Abstract: One of the most effective factors on the natural language researches is the data set which plays a significant role in designing, improving and evaluation the information retrieval systems and other applications for natural language processing. Unfortunately, building a proper data set consume time, labor and effort, in particular the query extraction from the data set documents. In this study, a novel algorithm for query extraction from any collection of documents was suggested,