PythonRdflib。查询出错

2024-10-01 07:38:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我真的很生气! 我需要使用rdf库为一个图创建一个查询。以下是查询:

queryCompetence = """prefix context: <http://www.ontologydesignpatterns.org/ont/mine/context.owl#>
                            select ?score where { <""" + \
                            str(elem) + """> context.hasProperty ?MyProperty. ?MyProperty ttt:hasScore ?score}."""

其中elem是URI。 我得到错误:“ParseException:Expected”}(在char 129处)(行:2, 列:51),对应于查询中元素URI的开头。 有人能帮我吗?你知道吗


Tags: orghttpprefixwwwcontextrdfuriscore