Skip to content Skip to sidebar Skip to footer

Querying Letter Mu In Sparql

I am using python library RDFLIB to query on semantic dicom owl file. I need to query for a label containing letter mu. I am not able to figure out how to query for labels containi

Solution 1:

This is not the greek letter μ (U+03BC), but the micro sign (U+00B5).

The following code works for me in Python 3.6:

q = """SELECT ?ur WHERE{?ur rdfs:label "Exposure in µAs".}"""
qres = g.query(q)
for row in qres:
    print(row)

The following code works for me both in Python 2.7 and Python 3.6:

q = """SELECT ?ur WHERE{?ur rdfs:label "Exposure in \u00b5As".}"""
qres = g.query(q)
for row in qres:
    print(row)

Post a Comment for "Querying Letter Mu In Sparql"