Calculating prediction sets before creating the grammar graph.