Selection or weighting of terms from queries, including natural language queries