nltk.ProbabilisticNonprojectiveParser.update_edge_scores

ProbabilisticNonprojectiveParser.update_edge_scores(new_node, cycle_path)[source]

Updates the edge scores to reflect a collapse operation into new_node.

Parameters:
  • new_node (A Node.) – The node which cycle nodes are collapsed into.
  • cycle_path (A list of integers.) – A list of node addresses that belong to the cycle.