ontology

do I use netbeans or Sparql in protege?

旧街凉风 提交于 2019-12-08 12:20:34
问题 I have a question in my project. I do not know whether I need to work netbeans or not. 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. also I collected and Have got in part

Consistency checking using Hermit reasoner in Python for an Ontology

荒凉一梦 提交于 2019-12-08 10:44:29
问题 I am using owlready2 api for python to load an Ontology and check consistency for that ontology using the sync_reasoner() function. But it seems that it is not checking the consistency for the ontology. Although there is an error, it shows nothing! Any idea how can I check consistency of an ontology in python using owlready2 or any other api. here is my small code: from owlready2 import * onto = get_ontology("test.owl") sync_reasoner() and here is the output I am getting: Owlready2 * Running

how to associate a resource to an other using Jena API

六月ゝ 毕业季﹏ 提交于 2019-12-08 09:00:26
问题 I have created an ontology containing two classes, the first one is named Father and the second is a subclass named Son . I would like to set the following conditions to the class father using Jena Has only son. Has some son. Then I would do the same for class Son : has exactly some father. My second issue is that I don't know how to associate the instance of class Son to the class Father using also Jena. I know it's possible to manipulate my classes using Protégé, but I want to explore Jena.

Modelling sequence order in OWL-DL ontology

心已入冬 提交于 2019-12-08 07:46:51
问题 As by default sequence order is not maintained in an OWL ontology. How can i model sequence in an OWL-DL ontology ? 回答1: One way to model a sequence and order its elements is to just introduc a hasNext property to capture sequence order: Class: SequenceItem EquivalentTo: hasNext only SequenceItem ObjectProperty: hasNext Domain: SequenceItem Range: SequenceItem InverseOf: hasPrevious Then, assuming the items you want to sequence in order are represented as instances, you can capture their

Narrowing down on SPARQL query

蓝咒 提交于 2019-12-08 04:57:30
问题 I want to make a query that returns only the items where person1(David) and person2(Charles) appears together. My query is: SELECT ?item ?par ?mod ?hon ?firstName ?lastName WHERE { ?item sci:itemTitle ?title. {?item sci:hasParticipant ?par. {?par sci:firstName "Charles".}UNION{?par sci:firstName "David".}} UNION {?item sci:hasModerator ?mod. {?mod sci:firstName "Charles".}UNION{?mod sci:firstName "David".}} UNION {?item sci:hasGuestOfHonor ?hon. {?hon sci:firstName "Charles".}UNION{?hon sci

How to define a class that does not have two equivalent predicate objects?

血红的双手。 提交于 2019-12-08 01:20:19
问题 I'm trying to define class of intervals. Each interval object may have (optionally) at most two boundary points. One of them - lower boundary, and another - upper boundary. How can I restrict my class of intervals, so that lower and upper individual boundary points must be different (if provided)? 回答1: You can declare that the hasLowerBound and hasUpperBound properties are disjoint. This means that an individual with values for both cannot have the same value for both. Here's an example. I've

OutOfMemoryError using Pellet as Reasoner

六眼飞鱼酱① 提交于 2019-12-07 14:18:17
问题 I'm trying to infer data using Pellet, but my application always crashes during reasoning due to an "OutOfMemoryError: Java heap space". As suggested elsewhere I have already tried to increase heap size and currently I am using these VM arguments: "-XX:MaxPermSize=256m -Xmx6144m". Furthermore I've to set 'PelletOptions.USE_CONTINUOUS = true', but so far I was only able delays the crashs for some minutes. (Longest run so far: 30 min.). I am storing data in a Jena TDB triplestore. Its total

is it correct that a class can be an instance?

杀马特。学长 韩版系。学妹 提交于 2019-12-07 13:29:20
In this document https://www.w3.org/TR/rdf-schema/#ch_introduction it is written: rdfs:Resource is an instance of rdfs:Class. however it is also written: This is the class of everything is this a typo? can a class be an instance ? That's actually an interesting question. I just want to add to your comment in CaptSolo's answer: but can I define my custom classes as instances of an instance? ( i highly doubt that ) It's not so much a question of whether you "can" do something or not (at least not in this case), but rather whether what you do will make sense. After all the Semantic Web was built

How do owl and rdfs property domain range work?

ε祈祈猫儿з 提交于 2019-12-07 02:34:26
I am trying to understand the semantics of rdfs domain and range. Because I am from an object oriented background, I am struggling to understand the semantics and how to validate data against the rdfs statements. Here is a sample file in turtle format: PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix tmpl: <http://template.example.com/> prefix data: <http://data.example.com/> tmpl:Thing a owl:Class. tmpl:Employment rdfs:subClassOf tmpl:TemporalThing. tmpl:Party rdfs:subClassOf tmpl

how to use cidoc-crm in jena

这一生的挚爱 提交于 2019-12-06 15:38:44
Recently, I'm trying to approach semantic web using Jena to create RDF and make query. Now, I have successfully made a owl based RDF file in Jena. However, when I trying to use different ontologies (such as: cidoc-crm), I do not know how to import those ontologies to Jena. Does anyone know how to import them to Jena? Do I need to create a new ontology model? Jena's OntModel interface provides a convenient way of working with ontologies (including RDFS ontologies). The following code shows how you can get an OntModel that contains the data of the ontology. In this code, I then create another