def search(ont, searchterm):
    """
    Search for things using labels
    """
    namedGraph = get_named_graph(ont)
    query = """
    SELECT ?c ?l WHERE {{
    GRAPH <{g}>  {{
    ?c rdfs:label ?l
    FILTER regex(?l,'{s}','i')
    }}
    }}
    """.format(s=searchterm, g=namedGraph)
    bindings = run_sparql(query)
    return [(r['c']['value'],r['l']['value']) for r in bindings]
def search ( ont , searchterm ) : namedGraph = get_named_graph ( ont ) query = """
    SELECT ?c ?l WHERE {{
    GRAPH <{g}>  {{
    ?c rdfs:label ?l
    FILTER regex(?l,'{s}','i')
    }}
    }}
    """ . format ( s = searchterm , g = namedGraph ) bindings = run_sparql ( query ) return [ ( r [ 'c' ] [ 'value' ] , r [ 'l' ] [ 'value' ] ) for r in bindings ]
Search for things using labels