sparql

Is there a way to convert the data format of an RDF vocabulary to SKOS

假装没事ソ 提交于 2019-12-17 19:29:58
问题 The rdfs file I'm want to use is cv.rdfs, I want to convert it to SKOS, so I can use it in Maui Indexer I am a complete noob in the subject. Please help. 回答1: SKOS is for organizing concepts, and doesn't deal with properties, it seems, so there's a lot of information in the CV RDFS that doesn't really have a SKOS version. However, it's easy enough to define a mapping for the RDFS classes and generate some data using SPARQL. Here's a possible mapping: rdfs:Class maps to skos:Concept. rdfs

How to find similar content using SPARQL

喜你入骨 提交于 2019-12-17 16:38:00
问题 I'm playing with the idea of using SPARQL to identify conceptual overlap between things. Take movies for example (LinkedMDB data), if I have a movie, "The Matrix" and my goal is to list movies that are similar to that movie, I would probably start by doing the following: The Matrix get genre get actors get director get location etc And then using the things I identified in the matrix, I would query for things with those properties (pseudo-query) SELECT movie, genre, director, location, actors

Wikidata results sorted by something similar to a PageRank

半世苍凉 提交于 2019-12-17 16:36:06
问题 In Wikidata (Wikidata SPARQL endpoint), is there a way to order the SPARQL query results with something like a PageRank? SELECT DISTINCT ?entity ?entityLabel WHERE { ?entity wdt:P31 wd:Q5. SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } LIMIT 100 OFFSET 0 Can we specify a field to order the results by and that field expresses that the entity at the top is more notable/important/recognizable that the following one and so on? 回答1: It seems that PageRank does not make much

SPARQL Query: How I get only a literal or string as result?

两盒软妹~` 提交于 2019-12-17 14:49:46
问题 Data: <untitled-ontology-5:OperationName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"> Adhesive Curing </untitled-ontology-5:OperationName> SPARQL Query: PREFIX rdf:<http://wwww.semanticweb.org/ontologies/2012/7/9/untitled-ontology-5#> SELECT ?object WHERE { ?subject rdf:OperationName ?object . } Result: Adhesive Curing^^http://www.w3.org/2001/XMLSchema#string My Question: The result of the SPARQL Query is not the result what I wanted. The right result should contain only the

SPARQL Query: How I get only a literal or string as result?

☆樱花仙子☆ 提交于 2019-12-17 14:46:47
问题 Data: <untitled-ontology-5:OperationName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"> Adhesive Curing </untitled-ontology-5:OperationName> SPARQL Query: PREFIX rdf:<http://wwww.semanticweb.org/ontologies/2012/7/9/untitled-ontology-5#> SELECT ?object WHERE { ?subject rdf:OperationName ?object . } Result: Adhesive Curing^^http://www.w3.org/2001/XMLSchema#string My Question: The result of the SPARQL Query is not the result what I wanted. The right result should contain only the

SPARQL property path queries with arbitrary properties

▼魔方 西西 提交于 2019-12-17 10:55:11
问题 SPARQL property path queries of arbitrary length require using specific properties. I want to query and find any path starting from a resource and ending in another resource. For example: SELECT ?p WHERE { :startNode ?p* :endNode } where ?p* specifies a path. Is there a way of doing this? 回答1: You're right that you can't use variables in property path expressions. There are a few things that you can do, though, that might help you. A wildcard to check whether a path exists You can use a

SPARQL: is there any path between two nodes?

馋奶兔 提交于 2019-12-17 06:49:32
问题 Is there a good kind of SPARQL query that let's me answer if two given nodes are connected on a single / multiple SPARQL endpoints? Let's say i want to check if the two nodes <http://wiktionary.dbpedia.org/resource/dog> and <http://dbpedia.org/resource/Dog> are connected. If yes, i'd be interested in the path. By guessing i already knew they were connected via the label, so a query like this returns a path of length 3: SELECT * WHERE { <http://wiktionary.dbpedia.org/resource/dog> ?p1 ?n1. #

Why is dbpedia-owl:wikiPageRedirects not returning the full set of redirect links? (Sparql)

旧时模样 提交于 2019-12-17 06:18:12
问题 I am using the following query : select ?value where { <http://dbpedia.org/resource/Paris> dbpedia-owl:wikiPageRedirects* ?value } in order to retrieve the wikiPageRedirects property of Paris. Based on dbpedia Paris has more than 20 redirect links. Why am I only retrieving the first one? 回答1: Your direction was wrong. select distinct * where { ?x dbpedia-owl:wikiPageRedirects <http://dbpedia.org/resource/Paris> } 回答2: Artemis's answer is right; the "direction" in the query is wrong. It's

Exclude results from DBpedia SPARQL query based on URI prefix

只谈情不闲聊 提交于 2019-12-17 06:16:07
问题 How can I excluding a group of concepts when using the DBpedia SPARQL endpoint? I'm using the following basic query to get a list of concepts: SELECT DISTINCT ?concept WHERE { ?x a ?concept } LIMIT 100 SPARQL Results This gives me a list of 100 concepts. I want to exclude all the concepts that fall into the YAGO class/group (i.e., whose IRIs begin with http://dbpedia.org/class/yago/ ). I can filter out individual concepts like this: SELECT DISTINCT ?concept WHERE { ?x a ?concept FILTER (

Finding all steps in property path

ⅰ亾dé卋堺 提交于 2019-12-17 06:15:08
问题 I'm new to SPARQL and I'm trying to create a property path query that will spit out each intermediate step along the path. So far I have this: select ?object where { <subjectURI> <isRelatedTo>+ ?object . } This gives me a list of all the relations to my subject URI throughout the path, no matter how distantly the relation (correct me if I'm wrong so far). But, I'd like to see how the relations are organized. Something like: <subjectURI> <isRelatedTo> <object1> <object1> <isRelatedTo> <object2