sparql

Validate language code for Wikimedia languages [closed]

*爱你&永不变心* 提交于 2019-12-24 10:47:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have a shell script that uses Wikidata Query Service (WDQS) to get required data. The SPARQL query that run WDQS takes input parameter language code. Is there a way that I can check in shell script if the input language code is a valid Wikimedia language code as the first column data in below link https://www

Wikidata sparql query returns 0 result

余生长醉 提交于 2019-12-24 10:24:21
问题 I’m new to query languages and linked data so thanks a lot for the help. I also have a similar question about sparql on dbpedia dbpedia sparql query returns 0 result I would like to look up all the art movements in wikidata with the associated artists (founder/inventor/creator, known for), date start, date end, country. Here is my query: PREFIX wdno: <http://www.wikidata.org/prop/novalue/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?art ?artLabel ?start ?end

How to encode URI with blank space in VOS isql service?

妖精的绣舞 提交于 2019-12-24 10:00:25
问题 As we write SPARQL in Virtuoso, it is easy to escape a space within an URI by coding the space with %20 . However, when I run the same query on Virtuoso isql service, the escape fails. Here is my query: PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wdno: <http://www.wikidata.org/prop/novalue/> PREFIX schema: <http://schema.org/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#

Extract statistical information from Wikipedia article

十年热恋 提交于 2019-12-24 09:57:56
问题 I'm currently extracting data from DBpedia articles using a SPARQLWrapper for python, but I can't seem to find how to extract the number of watchers (and other statistical information) for a given article. Is there an easy way to achieve this? I don't mind if it's through DBpedia, or directly through wikipedia (using wget, for example). Thanks for any advice. 回答1: It shell be prohibited to get the number of watchers for every arbitrary article, as it is considered to be a security leak if

finding super classes of an entity in SPARQL

无人久伴 提交于 2019-12-24 09:13:09
问题 I want to make a Name Entity Recognizer using wikipedia Data, I need to get all the super classes of a word to see in which category (Place, Human, Organization or None) the word is. I surfed the Internet a lot and find some pages like : SPARQL query to find all sub classes and a super class of a given class which when I execute the query results "No matching records found" even with the word mentioned in the page and trying other namespaces. and: Extracting hierarchy for dbpedia entity using

sparql DESCRIBE query to get data about linked objects

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:47:09
问题 I have defined a rdf class for Books. Another rdf class for describing people. The Book class contains authoredBy field which links book instances to people instances. Properties of Book Book -Id -name -authoredBy Person -id -firstName -LastName -designation For retrieving book properties, i use the following sparql query DESCRIBE ?book WHERE { ?book a rdf:Book ; } I am able to retrieve all the properties belonging to Book using DESCRIBE i.e the predicate , subject and object. However when it

RDF4J Workbench: Why is One SPIN Constructor Very Slow?

女生的网名这么多〃 提交于 2019-12-24 08:00:36
问题 I apologize for the length of this posting. I am trying to make this slow rule issue reproducible. I'm using TopBraid Composer FE to create an RDF file with ontology and SPIN constructors. He purpose of the SPIN constructors is to check for compliance in the instantiations of individuals of classes defined in the ontology. I find that the execution of the SPIN constructor is very slow, and I'd like to know why. Ontology Including SPIN Constructors SXXIComplianceCheck18.rdf I Modify/Clear my

Do I really need OWL reasoning?

让人想犯罪 __ 提交于 2019-12-24 08:00:28
问题 I recently asked a question about the feasibility of loading about 10 million statements into a triplestore with OWL reasoning enabled. That has lead to some StackOverflow comments as well as discussion within my research group about whether or not we really need OWL reasoning. I'll start with a real-world query that doesn't seem to require OWL reasoning. "41167-4120-0" is the NDC Code that identifies the commercial drug product "Fexofenadine hydrochloride 180 MG Oral Tablet [Allegra]" in the

Accumulated sum in SPARQL

本秂侑毒 提交于 2019-12-24 07:26:32
问题 Do we have a way to make an accumulated sum in SPARQL that is not reduced? For instance, SELECT ?p WHERE { VALUES ?p { 1 1 2 } } ORDER BY ?p would result in 1 2 4, - rather than 4. 回答1: If you want to calculate accumulated sums in the absense of RDF data (' FROM DUAL '), it is impossible: SPARQL list syntax is not allowed in VALUES , VALUES themself are unordered. However, if values are present in RDF data, it is possible to calculate their accumulated sums. Consider the following example.

SPARQL query returns multiple birth dates for same person

核能气质少年 提交于 2019-12-24 07:25:09
问题 I am learning SPARQL and dbpedia by working through the queries in https://www.joe0.com/2014/09/22/how-to-use-sparql-to-query-dbpedia-and-freebase/ . I am testing a query to return John Lennon's date of birth and I am running my queries in http://dbpedia.org/sparql . The query is: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT DISTINCT ?x0 ?x1 WHERE { ?x0 rdf:type foaf