class_docstr: A bottom-up parser for ``PCFG`` grammars that tries edges in descending
  order of the inside probabilities of their trees.  The "inside
  probability" of a tree is simply the
  probability of the entire tree, ignoring its context.  In
  particular, the inside probability of a tree generated by
  production *p* with children *c[1], c[2], ..., c[n]* is
  *P(p)P(c[1])P(c[2])...P(c[n])*; and the inside
  probability of a token is 1 if it is present in the text, and 0 if
  it is absent.
  
  This sorting order results in a type of lowest-cost-first search
  strategy.
class_docstr_tok: ["A","bottom-up","parser","for","``","PCFG","``","grammars","that","tries","edges","in","descending","order","of","the","inside","probabilities","of","their","trees",".","The","``","inside","probability","''","of","a","tree","is","simply","the","probability","of","the","entire","tree",",","ignoring","its","context",".","In","particular",",","the","inside","probability","of","a","tree","generated","by","production","*","p","*","with","children","*","c","[","1","]",",","c","[","2","]",",","...",",","c","[","n","]","*","is","*","P","(","p",")","P","(","c","[","1","]",")","P","(","c","[","2","]",")","...","P","(","c","[","n","]",")","*",";","and","the","inside","probability","of","a","token","is","1","if","it","is","present","in","the","text",",","and","0","if","it","is","absent",".","This","sorting","order","results","in","a","type","of","lowest-cost-first","search","strategy","."]
docstr: Sort the given queue of edges, in descending order of the
  inside probabilities of the edges' trees.
  
  :param queue: 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.
  :type queue: list(Edge)
  :param chart: The chart being used to parse the text.  This
      chart can be used to provide extra information for sorting
      the queue.
  :type chart: Chart
  :rtype: None
docstr_tok: ["Sort","the","given","queue","of","edges",",","in","descending","order","of","the","inside","probabilities","of","the","edges","'","trees",".",":","param","queue",":","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",".",":","type","queue",":","list","(","Edge",")",":","param","chart",":","The","chart","being","used","to","parse","the","text",".","This","chart","can","be","used","to","provide","extra","information","for","sorting","the","queue",".",":","type","chart",":","Chart",":","rtype",":","None"]
code: def sort_queue(self, queue, chart):
      """
      Sort the given queue of edges, in descending order of the
      inside probabilities of the edges' trees.
  
      :param queue: 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.
      :type queue: list(Edge)
      :param chart: The chart being used to parse the text.  This
          chart can be used to provide extra information for sorting
          the queue.
      :type chart: Chart
      :rtype: None
      """
      queue.sort(key=lambda edge: edge.prob())
  
imports: import random
  from functools import reduce
  from nltk.grammar import PCFG, Nonterminal
  from nltk.parse.api import ParserI
  from nltk.parse.chart import AbstractChartRule, Chart, LeafEdge, TreeEdge
  from nltk.tree import ProbabilisticTree, Tree
label_desc: Use image node_id 1 for calling the InsideChartParser obj's underlying member method code with example usage: obj.sort_queue(queue, chart) without return types