在Sparql中查询字母mu [英] Querying letter mu in Sparql

查看:145
本文介绍了在Sparql中查询字母mu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用python库RDFLIB来查询语义dicom owl文件.我需要查询包含字母mu的标签.我无法弄清楚如何查询包含此字母的标签.代码如下-

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 containing this letter. The code is given below -

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

上述查询没有任何结果.

I am not getting any results for the above query.

语义dicom owl文件包含以下三元组-
我要搜索的图像 sedi文件的内容(< 10信誉,无法发布图片)

The semantic dicom owl files contain the following triples -
Image of what I am trying to search contents of sedi file (<10 reputation, can't post images)

SEDI文件-语义Dicom OWL文件

推荐答案

这不是希腊字母μ(U + 03BC),而是 micro sign (U + 00B5).

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

以下代码在Python 3.6中对我有用:

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)

以下代码在Python 2.7和Python 3.6中都对我有用:

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)

这篇关于在Sparql中查询字母mu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆