Download latest PDF - Read the Docs
Transcript
educe Documentation, Release 0.1 A | Elab | | v n_bc +-----+ e_bc | B C | +-----+ 4.8.2 Classes class educe.graph.AttrsMixin Attributes common to both the hypergraph and directed graph representation of discourse structure annotation(x) Return the annotation object corresponding to a node or edge edge_attributes_dict(x) edgeform(x) Return the argument if it is an edge id, or its mirror if it’s an edge id (This is possible because every edge in the graph has a node that corresponds to it) is_cdu(x) is_edu(x) is_relation(x) mirror(x) For objects (particularly, relations/CDUs) that have a mirror image, ie. an edge representation if it’s a node or vice-versa, return the identifier for that image node(x) DEPRECATED (renamed 2013-11-19): use self.nodeform(x) instead node_attributes_dict(x) nodeform(x) Return the argument if it is a node id, or its mirror if it’s an edge id (This is possible because every edge in the graph has a node that corresponds to it) type(x) Return if a node/edge is of type ‘EDU’, ‘rel’, or ‘CDU’ class educe.graph.DotGraph(anno_graph) Bases: pydot.Dot A dot representation of this graph for visualisation. The to_string() method is most likely to be of interest here This is fairly abstract and unhelpful. You probably want the project-layer extension instead, eg. educe.stac.graph exception educe.graph.DuplicateIdException(duplicate) Bases: exceptions.Exception Condition that arises in inconsistent corpora class educe.graph.EnclosureDotGraph(enc_graph) Bases: pydot.Dot class educe.graph.EnclosureGraph(annotations, key=None) Bases: pygraph.classes.digraph.digraph, educe.graph.AttrsMixin 4.8. educe.graph module 119