(tokens, entities)
return graphs
Deprecated
Deprecated
Deprecated
def construct_graphs(tokens, entities):
    """
    Deprecated
    """
    entity_powerset = itertools.chain.from_iterable(itertools.combinations(entities, n) for n in range(1, len(entities)+1))
    graphs = []
    for entity_set in entity_powerset:
        g = {'edgeSet': [], 'tokens': tokens}
        for entity in entity_set:
            g['edgeSet'].append({'right':entity})
        graphs.append(g)
    return graphs
def construct_graphs ( tokens , entities ) : entity_powerset = itertools . chain . from_iterable ( itertools . combinations ( entities , n ) for n in range ( 1 , len ( entities ) + 1 ) ) graphs = [ ] for entity_set in entity_powerset : g = { 'edgeSet' : [ ] , 'tokens' : tokens } for entity in entity_set : g [ 'edgeSet' ] . append ( { 'right' : entity } ) graphs . append ( g ) return graphs