(edge: Edge, entity2label, entity2type,
                                 replace_entities=True,
                                 mark_boundaries=False,
                                 no_entity=False)
return property_label
>>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="Q5", relationid="P175"), {"Q5": "human"}, {"Q5": "NN"})
    ['performer', 'human']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P585"), {}, {})
    ['point', 'in', 'time', '<max>']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P36", qualifierrelationid="P585"), {}, {}, no_entity=True, mark_boundaries=True)
    ['<s>', 'capital', 'point', 'in', 'time', '<f>']
>>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="Q5", relationid="P175"), {"Q5": "human"}, {"Q5": "NN"})
    ['performer', 'human']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P585"), {}, {})
    ['point', 'in', 'time', '<max>']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P36", qualifierrelationid="P585"), {}, {}, no_entity=True, mark_boundaries=True)
    ['<s>', 'capital', 'point', 'in', 'time', '<f>']
>>> _get_edge_str_representation ( Edge ( leftentityid = graph_queries . QUESTION_VAR rightentityid = Q5 relationid = P175 ) { Q5 : human } { Q5 : NN } ) [ performer human ] >>> _get_edge_str_representation ( Edge ( leftentityid = graph_queries . QUESTION_VAR rightentityid = MAX relationid = P585 ) {} {} ) [ point in time <max > ] >>> _get_edge_str_representation ( Edge ( leftentityid = graph_queries . QUESTION_VAR rightentityid = MAX relationid = P36 qualifierrelationid = P585 ) {} {} no_entity = True mark_boundaries = True ) [ <s > capital point in time <f > ]
def _get_edge_str_representation(edge: Edge, entity2label, entity2type,
                                 replace_entities=True,
                                 mark_boundaries=False,
                                 no_entity=False):
    """
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="Q5", relationid="P175"), {"Q5": "human"}, {"Q5": "NN"})
    ['performer', 'human']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P585"), {}, {})
    ['point', 'in', 'time', '<max>']
    >>> _get_edge_str_representation(Edge(leftentityid=graph_queries.QUESTION_VAR, rightentityid="MAX", relationid="P36", qualifierrelationid="P585"), {}, {}, no_entity=True, mark_boundaries=True)
    ['<s>', 'capital', 'point', 'in', 'time', '<f>']
    """
    property_label = [""]
    p_meta = scheme.property2label.get(edge.relationid)
    if p_meta:
        property_label = _utils.split_pattern.split(p_meta['label'])
    p_meta = scheme.property2label.get(edge.qualifierrelationid)
    if p_meta:
        property_label += _utils.split_pattern.split(p_meta['label'])
    entity_kbids = [n for n in edge.nodes() if n and n != graph_queries.QUESTION_VAR]
    if any(entity_kbids) and not no_entity:
        entity_kbid = entity_kbids[0]
        property_label += _entity_kbid2token(entity_kbid, entity2label, entity2type, replace_entities, mark_boundaries=False)
    if mark_boundaries:
        property_label = SENT_TOKENS[0:1] + property_label + SENT_TOKENS[1:2]
    return property_label
def _get_edge_str_representation ( edge : Edge , entity2label , entity2type , replace_entities = True , mark_boundaries = False , no_entity = False ) : property_label = [ "" ] p_meta = scheme . property2label . get ( edge . relationid ) if p_meta : property_label = _utils . split_pattern . split ( p_meta [ 'label' ] ) p_meta = scheme . property2label . get ( edge . qualifierrelationid ) if p_meta : property_label += _utils . split_pattern . split ( p_meta [ 'label' ] ) entity_kbids = [ n for n in edge . nodes ( ) if n and n != graph_queries . QUESTION_VAR ] if any ( entity_kbids ) and not no_entity : entity_kbid = entity_kbids [ 0 ] property_label += _entity_kbid2token ( entity_kbid , entity2label , entity2type , replace_entities , mark_boundaries = False ) if mark_boundaries : property_label = SENT_TOKENS [ 0 : 1 ] + property_label + SENT_TOKENS [ 1 : 2 ] return property_label