sparql

HM Land Registry SPARQL postcode query?

你说的曾经没有我的故事 提交于 2019-12-11 17:44:10
问题 I'm looking at researching into the impact of particular energy sources, upon house prices. I would like to find information on property values for multiple post codes, in the vicinity of where energy is being produced. I found the following information which was helpful: HM Land Registry SPARQL query for multiple postcodes and have adjusted the code sightly, so that I am able to obtain more categories of information. However, this only produces results when I use the example post codes

Results filtered out even though the data is there

ぐ巨炮叔叔 提交于 2019-12-11 17:33:18
问题 Here's my query: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX : <http://dbpedia.org/resource/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?resource ?parentOrSpouse WHERE { ?resource a dbo:Royalty ; rdfs:label ?label ; dbo:parent ?parent ; dbo:birthDate ?bd ; dbo:birthPlace ?bp . ?bp dbo:isPartOf :England . FILTER(?bd < '1900-01-01'^^xsd:dateTime) . FILTER(?bd

How to get only Wikidata wdt (or other) predicates for an item via SPARQL?

旧巷老猫 提交于 2019-12-11 16:57:51
问题 Very new to this, so might have some terms wrong. I want to get a subset of triples for an entity (or entities). For example, this gives me 856 (as of now) triples for these two entities, including some labels and also /prop/direct/, /prop/direct-normalized/, and /prop/ predicates: CONSTRUCT {?s ?p ?o.} WHERE { VALUES ?s {wd:Q937 wd:Q670439} {?s ?p ?o.} } Try it But what if I only want the /prop/direct/ ( wdt ) triples? Would I use FILTER in some way? I suspect I'm missing the correct way to

getLiteral returns null when reading RDF file using jena

别说谁变了你拦得住时间么 提交于 2019-12-11 16:45:33
问题 I have been reading about OWL ontology and RDF files all these days. I still can't understand this. Let's say I created a simple ontology using Protege. It has single class called Review with two data properties which are comment and rating. Now I want to create a separate RDF file written in xml which has some comments. The file I created look like <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:c

Query DBpedia to get abstract for different inputs

空扰寡人 提交于 2019-12-11 16:26:09
问题 I have a question I need to build a single query to DBpedia such that, If I give any one of these as input like a City name or a person name or a Institute name or a Instrument name can I get its abstract as a output??? For instance, New York- New York is a state in the Northeastern and Mid-Atlantic regions of the United States...... Mars- Mars is the fourth planet from the Sun and the second smallest planet in the Solar System.... Michael Jackson- Michael Joseph Jackson was an American

How to create and use GeoSpatial indexes in Marklogic from Sparql

為{幸葍}努か 提交于 2019-12-11 16:22:54
问题 I have loaded the geospatial data from geonames.org into Marklogic using RDF import. When using the Query Console to explore the data, I see the data has been loaded into an xml document and looks like this: <sem:triple> <sem:subject>http://sws.geonames.org/2736540/</sem:subject> <sem:predicate>http://www.w3.org/2003/01/geo/wgs84_pos#lat</sem:predicate> <sem:object datatype="http://www.w3.org/2001/XMLSchema#string">40.41476</sem:object> </sem:triple> <sem:triple> <sem:subject>http://sws

Geospatial Queries with Optics API (MarkLogic)

我的未来我决定 提交于 2019-12-11 16:19:02
问题 Question brought over from thread.I am currently trying to do a search with SPARQL and CTS using Optics API. I have attempted to try using the following code Query Used import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; let $people := op:from-lexicons( map:entry("people",cts:uri-reference()), "lexicon" )=>op:where( cts:path-geospatial-query("people_data/location", cts:circle(7500, cts:point(89.39101918779838, 51.97989163203445)), "type=long-lat-point") ) let

Constructing all Wikidata triples in SPARQL that have to do with a certain identifier

狂风中的少年 提交于 2019-12-11 16:16:21
问题 I am trying to return a list of triples by using a construct query in the Wikidata SPARQL query service. I want all triples of people who have a GTAA_ID identifier. In addition to this, of all people who have a GTAA_ID, I want all triples containing the person with a GTAA_ID as the subject + all combinations of predicates and objects. Take the following example: Tom Hanks has a GTAA_ID (identifier). Tom Hanks also has a lot of other statements and identifiers in Wikidata. I want to retrieve

How to remove non-English entries from wikidata

旧街凉风 提交于 2019-12-11 16:02:03
问题 I am currently using the following SPARQL query to count the number of incoming links of a given node. SELECT (COUNT (*) AS ?count) WHERE {?s ?p wd:Q22673982 .} Code in Wikidata query editor: https://w.wiki/5DW However, the results include the count of non-English links as well. Is there a way to remove non-english links in wikidata results using SPARQL? I am happy to provide more details if needed. 来源: https://stackoverflow.com/questions/56724431/how-to-remove-non-english-entries-from

sparql and query in group of multiple predicates

丶灬走出姿态 提交于 2019-12-11 15:49:03
问题 I did not get the right sentence to ask the question. I would like to explain my problem using a sample data. let's say the triples are as below. @prefix skos: <http://www.w3.org/2004/02/skos/core#> . @prefix xs: <http://www.w3.org/2001/XMLSchema#> . @prefix p0: <http://www.mlacustom.com#> . @prefix p2: <http://www.mla.com/term/> . _:bnode7021016689601753065 p0:lastModifiedDateTime "2018-09-14T12:55:38"^^<xsd:dateTime> ; p0:lastModifiedUser "admin"^^xs:string . <http://www.mla.com/name