nltk.BottomUpProbabilisticChartParser.sort_queue¶
-
BottomUpProbabilisticChartParser.
sort_queue
(queue, chart)[source]¶ Sort the given queue of
Edge
objects, placing the edge that should be tried first at the beginning of the queue. This method will be called after eachEdge
is added to the queue.Parameters: - queue (list(Edge)) – The queue of
Edge
objects to sort. Each edge in this queue is an edge that could be added to the chart by the fundamental rule; but that has not yet been added. - chart (Chart) – The chart being used to parse the text. This chart can be used to provide extra information for sorting the queue.
Return type: None
- queue (list(Edge)) – The queue of