nltk.parse.ProbabilisticNonprojectiveParser.compute_original_indexes

ProbabilisticNonprojectiveParser.compute_original_indexes(new_indexes)[source]

As nodes are collapsed into others, they are replaced by the new node in the graph, but it’s still necessary to keep track of what these original nodes were. This takes a list of node addresses and replaces any collapsed node addresses with their original addresses.

Parameters:new_indexes (A list of integers.) – A list of node addresses to check for

subsumed nodes.