-1

我真的很生气!我需要使用 rdf lib 为图形创建查询。这是查询:

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 "}" (at char 129), (line:2, col:51)",对应于查询中 elem URI 的开头。谁能帮我?

4

1 回答 1

2

这篇文章的作者找到了答案。问题是context.hasProperty应该是context:hasProperty

于 2013-11-18T12:19:47.997 回答