Translation of natural language queries to structured queries