sparql

Sparql query getting duplicate or not I dont understant

本小妞迷上赌 提交于 2019-12-23 02:39:09
问题 I am using this query to get all programming languages and their details. This is my test class. I have used it in java and it works fine. The problem I am facing is, there is a language named "ML (programming language)" It prints multiple times with different abstract, different influenced. Not only ML but also some other languages doing this. I don't know is there any problem in my query or its getting exact data as it is. package io.naztech.dbpedia; import java.io.ByteArrayOutputStream;

Number of incoming link fo each DBpedia resource

谁说胖子不能爱 提交于 2019-12-22 19:16:05
问题 I have the SPARQL DBpedia Query below: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX vrank:<http://purl.org/voc/vrank#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT distinct ?Nom ?resource ?url (count( (?o) as ?nb)) WHERE{ ?resource rdfs:label ?Nom. ?resource foaf:isPrimaryTopicOf ?url. ?resource dbpedia-owl:wikiPageWikiLink ?o ?Nom <bif:contains> "Apple". FILTER ( langMatches( lang(?Nom), "EN" )). MINUS {?resource dbo

Number of incoming link fo each DBpedia resource

左心房为你撑大大i 提交于 2019-12-22 19:15:23
问题 I have the SPARQL DBpedia Query below: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX vrank:<http://purl.org/voc/vrank#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT distinct ?Nom ?resource ?url (count( (?o) as ?nb)) WHERE{ ?resource rdfs:label ?Nom. ?resource foaf:isPrimaryTopicOf ?url. ?resource dbpedia-owl:wikiPageWikiLink ?o ?Nom <bif:contains> "Apple". FILTER ( langMatches( lang(?Nom), "EN" )). MINUS {?resource dbo

What are values starting with “t” and how to ignore them for counting

牧云@^-^@ 提交于 2019-12-22 18:36:45
问题 I am trying to query the frequency of certain attributes in Wikidata, using SPARQL. For example, to find out what the frequency of different values for gender is, I have the following query: SELECT ?rid (COUNT(?rid) AS ?count) WHERE { ?qid wdt:P21 ?rid. BIND(wd:Q5 AS ?human) ?qid wdt:P31 ?human. } GROUP BY ?rid I get the following result: wd:Q6581097 2752163 wd:Q6581072 562339 wd:Q1052281 223 wd:Q1097630 68 wd:Q2449503 67 wd:Q48270 36 wd:Q44148 8 wd:Q43445 4 t152990852 1 t152990762 1

SPARQL to get all parents of all nodes

戏子无情 提交于 2019-12-22 13:07:12
问题 I have been using this post to get the parents or lineage of a single RDF node: SPARQL query to get all parent of a node This works nicely on my virtuoso server. Sorry, couldn't find a public endpoint containing data with a similar structure. prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix bto: <http://purl.obolibrary.org/obo/> select (group_concat(distinct ?midlab ; separator = "|") AS ?lineage) where { bto:BTO_0000207 rdfs:subClassOf* ?mid . ?mid rdfs:subClassOf* ?class . ?mid

Generate Graph with sub-Graphs using sparql

偶尔善良 提交于 2019-12-22 10:37:40
问题 I have the following situation in my RDF-store: Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 I now want to define a SPARQL Query which finds all Graphs where O1 is in the tripples, and stores those 3 Graphs + the tripples in a new Graph with the name A+B+C NEW Named Graph: A+B+C Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 With Construct or insert Into i only found out how to build a graph out of tripples, bzw not how to build a graph

how to convert model checking logic query to SPARQL query?

萝らか妹 提交于 2019-12-22 10:27:01
问题 Suppose I have the following RDF data: @prefix : <urn:ex:> :m :A "a" :m :A "b" :m :A "c" :m :B "a" :m :B "b" What SPARQL query could I use to check whether the RDF model satisfies the following logical formula? ∀x A(X) → B(x) 回答1: SPARQL doesn't have conditionals or universal quantification, but does have existentials (does anything match this?), (implicit) conjunction and negation (in the 'absence' sense). So rewrite the question: ∀x A(x) → B(x) ⇒ ∀x ¬ ( A(x) ∧ ¬ B(x) ) ⇒ ¬ ∃x A(x) ∧ ¬ B(x)

Saving and reusing the result of a SPARQL query

萝らか妹 提交于 2019-12-22 09:18:20
问题 I am using Jena to query an owl file through Eclipse. I want to do some successive queries and every new query will use the results of the previous query. I want to do it in different ?SELECT and save every time the result of a query in order to use it again in a new query. I dont want to insert the values of the variables by myself but automatically occur from the queries. Any ideas whats a suitable way to achieve this? Thanks in advance 回答1: I think that there are two primary options here:

DBpedia SPARQL Query US Universities

邮差的信 提交于 2019-12-22 08:50:37
问题 I created a SPARQL query that I'm running on the DBpedia SNORQL SPARQL endpoint. The purpose of the query is to get a list of universities or colleges in the United States, including their longitude, latitude, and endowment. The query seems to be working but seems to be missing some records and/or attributes. So, for example, Harvard University doesn't show up in the result, even though its DBpedia record exists and the attributes should match my query. I'm not sure why that record doesn't

How to find the “lexical file” in Wordnet?

扶醉桌前 提交于 2019-12-22 07:01:35
问题 If you look at the original Wordnet search and select "Display options: Show Lexical File Info", you'll see an extremely useful classification of words called lexical file . Eg for "filling" we have: <noun.substance>S: (n) filling, fill (any material that fills a space or container) <noun.process>S: (n) filling (flow into something (as a container)) <noun.food>S: (n) filling (a food mixture used to fill pastry or sandwiches etc.) <noun.artifact>S: (n) woof, weft, filling, pick (the yarn woven