(self,
                 edges: List[Edge]=None,
                 tokens: List[str]=None,
                 free_entities: List[Dict]=None
                 )
A semantic graph object.
        >>> SemanticGraph(edges=[Edge(rightentityid="Q1", leftentityid="Q2"), Edge(0,rightentityid="Q1", leftentityid="Q2"), Edge(rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(0, Q2-None->Q1), Edge(1, Q2-None->Q1), Edge(2, Q2-None->Q1)])
        >>> SemanticGraph(edges=[Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(2, Q2-None->Q1), Edge(3, Q2-None->Q1), Edge(4, Q2-None->Q1)])
A semantic graph object.
        >>> SemanticGraph(edges=[Edge(rightentityid="Q1", leftentityid="Q2"), Edge(0,rightentityid="Q1", leftentityid="Q2"), Edge(rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(0, Q2-None->Q1), Edge(1, Q2-None->Q1), Edge(2, Q2-None->Q1)])
        >>> SemanticGraph(edges=[Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(2, Q2-None->Q1), Edge(3, Q2-None->Q1), Edge(4, Q2-None->Q1)])
A semantic graph object . >>> SemanticGraph ( edges = [ Edge ( rightentityid = Q1 leftentityid = Q2 ) Edge ( 0 rightentityid = Q1 leftentityid = Q2 ) Edge ( rightentityid = Q1 leftentityid = Q2 ) ] ) SemanticGraph ( [ Edge ( 0 Q2 - None - > Q1 ) Edge ( 1 Q2 - None - > Q1 ) Edge ( 2 Q2 - None - > Q1 ) ] ) >>> SemanticGraph ( edges = [ Edge ( 2 rightentityid = Q1 leftentityid = Q2 ) Edge ( 2 rightentityid = Q1 leftentityid = Q2 ) Edge ( 2 rightentityid = Q1 leftentityid = Q2 ) ] ) SemanticGraph ( [ Edge ( 2 Q2 - None - > Q1 ) Edge ( 3 Q2 - None - > Q1 ) Edge ( 4 Q2 - None - > Q1 ) ] )
def __init__(self,
                 edges: List[Edge]=None,
                 tokens: List[str]=None,
                 free_entities: List[Dict]=None
                 ):
        """
        A semantic graph object.
        >>> SemanticGraph(edges=[Edge(rightentityid="Q1", leftentityid="Q2"), Edge(0,rightentityid="Q1", leftentityid="Q2"), Edge(rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(0, Q2-None->Q1), Edge(1, Q2-None->Q1), Edge(2, Q2-None->Q1)])
        >>> SemanticGraph(edges=[Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2"), Edge(2, rightentityid="Q1", leftentityid="Q2")])
        SemanticGraph([Edge(2, Q2-None->Q1), Edge(3, Q2-None->Q1), Edge(4, Q2-None->Q1)])
        """
        self.edges = EdgeList()
        self.tokens = tokens if tokens else []
        self.free_entities = free_entities if free_entities else []
        if edges:
            self.edges.extend(edges)

        self.denotations = []
        self.denotation_classes = []
def __init__ ( self , edges : List [ Edge ] = None , tokens : List [ str ] = None , free_entities : List [ Dict ] = None ) : self . edges = EdgeList ( ) self . tokens = tokens if tokens else [ ] self . free_entities = free_entities if free_entities else [ ] if edges : self . edges . extend ( edges ) self . denotations = [ ] self . denotation_classes = [ ]