我在wikidata查询服务中使用next query:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX xsd: <www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?lexemeId ?lemma WHERE {
?lexemeId <http://purl.org/dc/terms/language> wd:Q1860.
?lexemeId wikibase:lemma ?lemma.
FILTER (regex(?lemma, '^bank.*'))
}
它在https://query.wikidata.org/下执行时运行良好,但如果尝试使用Java Jena,则会失败,原因如下:
Exception in thread "main" org.apache.jena.query.QueryParseException: Line 7, column 11: Unresolved prefixed name: wikibase:lemma
它不能将wikibase解析为前缀。有什么线索吗?提前接受治疗,大卫。
转载请注明出处:http://www.tochigihk.com/article/20230526/2532009.html