gpt4 book ai didi

python - 在Sparql中查询字母mu

转载 作者:太空宇宙 更新时间:2023-11-03 15:13:22 25 4
gpt4 key购买 nike

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

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

我没有得到上述查询的任何结果。

语义 dicom owl 文件包含以下三元组 -
我正在尝试搜索的图像 contents of sedi file (<10 声誉,无法发布图片)

SEDI 文件 - Semantic Dicom OWL file

最佳答案

这不是希腊字母μ (U+03BC),而是微符号 (U+00B5)。

以下代码在 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 中都适用于我:

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

关于python - 在Sparql中查询字母mu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44062565/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com