nltk.invert_graph()

nltk.invert_graph(graph)[source]

Inverts a directed graph.

Parameters:graph (dict(set)) – the graph, represented as a dictionary of sets
Returns:the inverted graph
Return type:dict(set)