Пример #1
0
def test_grounded_endpoint_with_pmids_on_medline():
    pmid_list = ['16403219', '22258404', '16961925', '22096607']
    for pmid in pmid_list:
        rp = rlimsp.process_from_webservice(pmid,
                                            id_type='pmid',
                                            source='medline',
                                            with_grounding=False)
Пример #2
0
def test_grounded_endpoint_with_pmids():
    pmid_list = ['16403219', '22258404', '16961925', '22096607']
    stmts = []
    for pmid in pmid_list:
        rp = rlimsp.process_from_webservice(pmid, id_type='pmid')
        assert len(rp.statements), len(rp.statements)
        stmts.extend(rp.statements)
    assert len(stmts) > 10, len(stmts)
Пример #3
0
def test_grounded_endpoint_with_pmids():
    pmid_list = ['16403219', '22258404', '16961925', '22096607']
    stmts = []
    for pmid in pmid_list:
        rp = rlimsp.process_from_webservice(pmid, id_type='pmid')
        assert len(rp.statements), len(rp.statements)
        stmts.extend(rp.statements)
    assert len(stmts) > 10, len(stmts)
Пример #4
0
def test_simple_usage():
    rp = rlimsp.process_from_webservice('PMC3717945')
    stmts = rp.statements
    assert len(stmts) == 6, len(stmts)
    for s in stmts:
        assert len(s.evidence) == 1, "Wrong amount of evidence."
        ev = s.evidence[0]
        assert ev.annotations, "Missing annotations."
        assert 'agents' in ev.annotations.keys()
        assert 'trigger' in ev.annotations.keys()
Пример #5
0
def test_simple_usage():
    rp = rlimsp.process_from_webservice('PMC3717945')
    stmts = rp.statements
    assert len(stmts) == 33, len(stmts)
    for s in stmts:
        assert len(s.evidence) == 1, "Wrong amount of evidence."
        ev = s.evidence[0]
        assert ev.annotations, "Missing annotations."
        assert 'agents' in ev.annotations.keys()
        assert 'trigger' in ev.annotations.keys()
Пример #6
0
def test_grounded_endpoint_with_pmids_on_medline():
    pmid_list = ['16403219', '22258404', '16961925', '22096607']
    for pmid in pmid_list:
        rp = rlimsp.process_from_webservice(pmid, id_type='pmid',
                                            source='medline',
                                            with_grounding=False)
Пример #7
0
def test_ungrounded_usage():
    rp = rlimsp.process_from_webservice('PMC3717945', with_grounding=False)
    assert len(rp.statements) == 33, len(rp.statements)
Пример #8
0
def test_ungrounded_usage():
    rp = rlimsp.process_from_webservice('PMC3717945', with_grounding=False)
    assert len(rp.statements) == 33, len(rp.statements)