owl

retrieving the class name of a specific subclass in owl

此生再无相见时 提交于 2019-12-18 09:32:47
问题 I am an rdflib beginner, i have an ontology with classes and sub-classes and I need to look for a specific word in a subclass and, if it is found, return its class name. I have the following code: import rdflib from rdflib import plugin from rdflib.graph import Graph g = Graph() g.parse("test.owl") from rdflib.namespace import Namespace plugin.register( 'sparql', rdflib.query.Processor, 'rdfextras.sparql.processor', 'Processor') plugin.register( 'sparql', rdflib.query.Result, 'rdfextras

Equal relationship between ontology properties

ぃ、小莉子 提交于 2019-12-18 09:28:58
问题 I have 2 properties, e.g. 'hasColor' and 'hasFinish'. I want to express with ontology that in case of ontology class A are properties 'hasColor' and 'hasFinish' equal (owl:equivalentProperty). But in case of ontology class B the properties 'hasColor' and 'hasFinish' are NOT equal. How can I achieve this? One way probably is to create 'hasColor' and 'hasFinish' properties with class A as a range and set them to be equal. Then create another ones 'hasColor' and 'hasFinish' properties with class

Is it possible to make property assertions on class level in OWL 2?

半城伤御伤魂 提交于 2019-12-18 09:28:45
问题 I have an OWL 2 ontology containing several named individuals belonging to a class that need to have the same object property with the same value. I would like to make this property assertion "on the class" in such a way that a reasoner could infer the property to be had by all of its members, thus without needing an explicit assertion for each. (obtaining something similar to a class-based object-oriented property inheritance) A simple example could be an ontology containing the individuals

Getting error in executing OWL API

喜欢而已 提交于 2019-12-18 07:05:06
问题 I am trying to execute following code. import java.io.File; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.AddAxiom; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model

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

obtain the matrix in protege

馋奶兔 提交于 2019-12-17 20:26:19
问题 My work is about library book of recommendation systems . that as input I need book Classification ontology . in my ontology classify library books. this classification has 14 categories, beside the sibling classes Author, book, Isbn. Individuals in book class are book’s subject(about 600 subjects) , and individuals in author class are name’s author and also isbn class. I design this ontology with protege 4.1. also I collected and Have got in part of belong book to categories manually. That a

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

owl protege how can I describe a class that has just some properties?

烂漫一生 提交于 2019-12-17 14:54:05
问题 Is it possible in protege (Thus in owl) to describe a class depending if it has some properties? For example I have a class Home , and I want to say that every instance that has property1 and property2 and property2 is considered an instance of that class? 回答1: Suppose you have a class Duck and you want to say that if something walks like a Duck, and talks like a Duck, then it is a Duck. You can do that with a class axiom: ((walksLike some Duck) and (talksLike some Duck)) SubClassOf Duck A

What is the difference between RDF and OWL?

孤者浪人 提交于 2019-12-17 10:07:19
问题 I am trying to grasp the concept of Semantic Web. I am finding it hard to understand what exactly is the difference between RDF and OWL. Is OWL an extension of RDF or these two are totally different technologies? 回答1: The semantic web comes in layers. This is a quick summary of the ones I think you're interested in. Update : Please note that RDFS is used to define the structure of the data, not OWL. OWL describes semantic relationships which normal programming, such as a C struct, isn't