试图以其所在的位置获得慈善组织的名称-SPARQL [英] Trying to get the name of charity organisations with their locations-SPARQL

查看:73
本文介绍了试图以其所在的位置获得慈善组织的名称-SPARQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个SPARQL查询,该查询从DBpedia获取慈善组织及其位置。

I am trying to create a SPARQL query which gets the charity organisations and their location from DBpedia.

这是一个慈善机构的链接- http://dbpedia.org/page/Stonewall_(charity)

Here is the link to one charity -- http://dbpedia.org/page/Stonewall_(charity).

我正在尝试获取所有具有名称和位置的慈善机构。

I am trying to get all the charities that exist with the names and location.

我想检索 dbp:name 以及 dbo:headquarter

推荐答案

您可以尝试以下方法:

select distinct ?name (group_concat(?headquarter;separator=",")) where 

{?s a dbo:Organisation.
?s dbo:status "Charity".
?s dbp:name ?name.
?s  dbo:headquarter/rdfs:label ?headquarter } 

LIMIT 100

这篇关于试图以其所在的位置获得慈善组织的名称-SPARQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆