Exemple #1
0
def is_neg_graph1(graph):
    # no XXX
    # resolution of XXX
    if 'T0' in graph.node and graph.node['T0']['lemma'] in [
            'no', 'resolution', 'resolved'
    ]:
        # no verb
        has_verb = utils.contains(lambda x: graph.node[x]['tag'][0] == 'V',
                                  graph.nodes())
        if not has_verb:
            return True
    return False
Exemple #2
0
def test_contains():
    assert contains(lambda a: a == 1, [0, 1, 2])
    assert not contains(lambda a: a == 3, [0, 1, 2])
    assert not contains(lambda a: a == 3, [])
    assert not contains(None, [False, False, False])