owl

OWL type inference with a restriction

有些话、适合烂在心里 提交于 2019-12-01 11:02:53
I am studying the notion of OWL restrictions with Protege 4 using FaCT++ and a trivial ontology. Suppose I have an individual foo of class Something : :Something a owl:Class. :foo a :Something, owl:NamedIndividual. and another class defined from a restriction on the hasBar property: :hasBar a owl:ObjectProperty. :SomethingElse owl:equivalentClass [a owl:Restriction; owl:onProperty :hasBar; owl:allValuesFrom :Something]. If I assert that: :x :hasBar :foo. why can't I infer from it that x is a SomethingElse (via the fact that foo is a Something )? The only way I can make it work is if the range

dbpedia fetch entitites in language other than english

Deadly 提交于 2019-12-01 09:11:43
I'm trying to extract entity dictionary contains person name etc. from dbpedia using sparql. PREFIX owl: <http://dbpedia.org/ontology/> PREFIX dbpprop: <http://dbpedia.org/property/> SELECT ?name WHERE { ?person a owl:Person . ?person dbpprop:name ?name . FILTER(lang(?name) = "en") } The query above did succeed, but when I change the language name to fr , there is nothing to fetch. How can I fetch names in other languages? Moreover, why can't I filter language using query below? SELECT ?name WHERE { ?person a owl:Person . ?person dbpprop:language "English" ?person dbpprop:name ?name . } //

A class subclass of itself. Why mutual subclassing is forbidden?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 08:29:50
Complex question I assume, but studying OWL opened a new perspective to live, the universe and everything. I'm going philosophical here. I am trying to achieve a class C which is subclass of B which in turn is subclass of C. Just for fun, you know... So here it is >>> class A(object): pass ... >>> class B(A): pass ... >>> class C(B): pass ... >>> B.__bases__ (<class '__main__.A'>,) >>> B.__bases__ = (C,) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: a __bases__ item causes an inheritance cycle >>> clearly, python is smart and forbids this. However, in OWL it

OWL type inference with a restriction

孤人 提交于 2019-12-01 07:51:25
问题 I am studying the notion of OWL restrictions with Protege 4 using FaCT++ and a trivial ontology. Suppose I have an individual foo of class Something : :Something a owl:Class. :foo a :Something, owl:NamedIndividual. and another class defined from a restriction on the hasBar property: :hasBar a owl:ObjectProperty. :SomethingElse owl:equivalentClass [a owl:Restriction; owl:onProperty :hasBar; owl:allValuesFrom :Something]. If I assert that: :x :hasBar :foo. why can't I infer from it that x is a

dbpedia fetch entitites in language other than english

点点圈 提交于 2019-12-01 07:30:19
问题 I'm trying to extract entity dictionary contains person name etc. from dbpedia using sparql. PREFIX owl: <http://dbpedia.org/ontology/> PREFIX dbpprop: <http://dbpedia.org/property/> SELECT ?name WHERE { ?person a owl:Person . ?person dbpprop:name ?name . FILTER(lang(?name) = "en") } The query above did succeed, but when I change the language name to fr , there is nothing to fetch. How can I fetch names in other languages? Moreover, why can't I filter language using query below? SELECT ?name

How to reason or make inferences in Neo4j?

时光怂恿深爱的人放手 提交于 2019-12-01 05:32:05
I created a semantic Graph in Neo4j. Is there any possibility to use an OWL reasoner in Neo4j? Or any inference engine? Though it has been mentioned here i can't find any solution or API for this. Thankful for any advice! Maybe you want to see this: click here I quoted this from that link: Your main task if you want to use reasoners over a neo4j database is going to be to suck data out of neo4j, and format it as a set of RDF triples. You can then put those RDF triples into a Jena Model. When you have that jena model in memory, you can use existing jena APIs to use reasoners with that model My

A class subclass of itself. Why mutual subclassing is forbidden?

爱⌒轻易说出口 提交于 2019-12-01 05:03:00
问题 Complex question I assume, but studying OWL opened a new perspective to live, the universe and everything. I'm going philosophical here. I am trying to achieve a class C which is subclass of B which in turn is subclass of C. Just for fun, you know... So here it is >>> class A(object): pass ... >>> class B(A): pass ... >>> class C(B): pass ... >>> B.__bases__ (<class '__main__.A'>,) >>> B.__bases__ = (C,) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: a _

How to reason or make inferences in Neo4j?

喜你入骨 提交于 2019-12-01 03:33:01
问题 I created a semantic Graph in Neo4j. Is there any possibility to use an OWL reasoner in Neo4j? Or any inference engine? Though it has been mentioned here i can't find any solution or API for this. Thankful for any advice! 回答1: Maybe you want to see this: click here I quoted this from that link: Your main task if you want to use reasoners over a neo4j database is going to be to suck data out of neo4j, and format it as a set of RDF triples. You can then put those RDF triples into a Jena Model.

SPARQL Querying Transitive

依然范特西╮ 提交于 2019-12-01 03:29:46
I am a beginner to SPARQL and was wondering if there was a query which could help me return transitive relations. For example the n3 file below I would want a query that would return "a is the sameas c" or something along those lines. Thanks @prefix : <http://websitename.com/links/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . :a owl:sameas :b. :b owl:sameas :c. You can use property paths if you are using a suitably enabled SPARQL 1.1 engine, you've tagged your question Jena so I assume you are using its ARQ engine which supports this feature. So you can write a query like the following:

Retrieving superclasses implied by OWL intersection classes

怎甘沉沦 提交于 2019-11-30 23:23:51
An OWL ontology may have classes A, B, and C, and axiom (in DL notation): A &sqsubseteq; (B &sqcap; C) or in approximate Manchester OWL Syntax: A subClassOf (B and C) It is logically true that A is a subclass of B, and that A is a subclass of C, but the triples A rdfs:subClassOf B A rdfs:subClassOf C are not necessarily present in the RDF serialization of the OWL ontology. For instance, consider this very simple ontology in Protégé and its RDF serialization in RDF/XML and Turtle: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://stackoverflow.com/q/19924861/1281433