rdf

Get all nodes in a transitive relation

巧了我就是萌 提交于 2019-12-18 08:35:26
问题 Is it somehow possible to get the list of nodes connected through a transitive relation with SPARQL? I have elements that are connected in this way: ?a g:eastOf ?b ?b g:eastOf ?c … Not all nodes are connected with each other, because some are further down south. Only when nodes are vertically in the same plane there might be a g:eastOf relationship. This means there are several groups of nodes that are not connected with each other. I'd like to get all these groups of nodes (basically a list

Getting hyperlinks of a Wikipedia page using DBpedia

耗尽温柔 提交于 2019-12-18 07:17:29
问题 I have two resources in DBPedia: dbr:Diabetes_mellitus and dbr:Hyperglycemia. In Wikipedia, the corresponding pages are wikipedia-en:Diabetes_mellitus and wikipedia-en:Hyperglycemia. In Wikipedia there is a hyperlink from Diabetes_mellitus page to Hyperglycemia page. But when I try to find the link between the 2 resources in DBpedia, I cannot find it. I tried to find the link using the following SPARQL query. SELECT ?prop WHERE { { dbr:Diabetes_mellitus ?prop dbr:Hyperglycemia } UNION { dbr

Work around to query DBpedia for two keywords

一世执手 提交于 2019-12-18 06:58:09
问题 I want to query DBpedia for multiple keywords, apparently I have to search for an exact substring, so if I want the page about Egyptian Pyramids , searching for Egypt Pyramids won't work, but that's exactly what I need.. So I was thinking maybe I can see if the concept "Pyramids" has anything to do with "Egypt", by searching through the relations, but I am finding it difficult to come up with the sparql query needed for that BTW I query through: http://dbpedia.org/sparql 回答1: Trying to

Using SPARQL to locate a subject with multiple occurrences of same property

笑着哭i 提交于 2019-12-18 06:54:33
问题 I am trying to use SPARQL to return triples where the same subject has multiple objects for the same property, like so: example:subject1 example:property example:object1 example:subject1 example:property example:object2 I feel like such a query should make use of property paths: SELECT ?subject WHERE { ?subject example:property{2} ?object . } I'm running this property-path query using Jena 2.6.4, but I'm not getting any results. Is this due to Jena? Or am I phrasing the query incorrectly? The

How to extract Freebase Data Dump for a particular topic

天涯浪子 提交于 2019-12-18 06:06:13
问题 I want to extract music data from the freebase data dumps. (http://www.freebase.com/music) Once I have the data dump how to I extract say the following properties http://www.freebase.com/music/recording?schema= Will a better approach be get all songs and then fetch relevant information from it? If this is a good approach how should I go about extracting it? 回答1: zgrep $'\tns:music\.recording' freebase-rdf-{date}.gz | gzip > freebase-filtered.gz should get you started. Depending on what other

How can I easily convert RDF triples to/from an idiomatic Java POJO business object?

谁说胖子不能爱 提交于 2019-12-18 05:17:36
问题 I'm a Java developer just getting started with linked data/RDF. I can create triples, put them in a triple store, query them, etc, but it's very awkward. Most of my code is focused on the mechanics of RDF and I'd really like to work with this data in a way that's more idiomatic Java. How can I convert a POJO to/from RDF triples with Jena without hand-coding everything? I'd like something that can convert a pile of triples with a defined structure back and forth between a Java POJO and RDF.

Inferencing in protege

为君一笑 提交于 2019-12-18 05:17:13
问题 I have a simple ontology as follows <?xml version="1.0"?> <!DOCTYPE rdf:RDF [ <!ENTITY owl "http://www.w3.org/2002/07/owl#" > <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <!ENTITY assignment "http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#" > ]> <rdf:RDF xmlns="http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#" xml:base="http://www

How to Define My Own Ranges for OWL DataProperties

☆樱花仙子☆ 提交于 2019-12-18 05:12:25
问题 I have recently started learning Web Ontology Language (OWL). I want to define a DataProperty with my own defined range of value. Consider the following property: <owl:DatatypeProperty rdf:ID="myProperty"> <rdfs:domain rdf:resource="#MyDomain"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> </owl:DatatypeProperty> The property has the range of double value but I want to restrict the range in order to make my property to accept only double values between 0 and 1. I would

The best PHP lib/class to generate RSS/Atom [closed]

天涯浪子 提交于 2019-12-17 22:32:16
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I have to produce an RSS/Atom feed in various applications, and I want to know a good library or class which is able to produce both,

The State of RDF in Ruby [closed]

半腔热情 提交于 2019-12-17 22:16:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm wondering about the current support there is in Ruby for semantic web technologies. Is there good RDF options? It seems that the