我试图使用 rdf4h 从 rdf 获取该国的首都
Right (rdf::TriplesGraph) <- parseURL (XmlParser Nothing Nothing) "http://live.dbpedia.org/data/Spain.rdf"
let c = query rdf (Just (UNode "http://live.dbpedia.org/resource/Spain")) (Just (UNode "http://live.dbpedia.org/property/capital")) Nothing
但它返回空列表
我可以看到它有三倍
"ns3:string"
谓词,而不是
"http://live.dbpedia.org/property/capital"
解析网址后,
我应该如何解决这个问题或者我错过了其他方法?
编辑:找到这个功能
uniqTriplesOf :: rdf -> Triples
它确实扩展了命名空间,现在的问题是我如何通过完整的 uris 查询这个 rdf