ontology

Parsing schema.org ttl/owl file using Jena

末鹿安然 提交于 2019-11-28 14:30:42
I'm writing a code generator that generate entities (POJO's in Java language) from the schema defined here http://schema.rdfs.org/all.ttl . I'm using Jena to parse the ttl file and retrieve the meta data that I need to generate them. Jena parses the file successfully, however, for some reason it does not list all the attributes of a given entity, e.g., Person. I'm not sure whether I'm doing something wrong, using the wrong API, etc. Here's the code sample that recreates the scenario: public class PersonParser { public static void main(String[] args) { OntModel model = ModelFactory

obtain the matrix in protege

五迷三道 提交于 2019-11-28 12:43:48
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 object properties is name “hasSubject” related individual book class with categories. Example book “A”

Defining cardinality of data property in OWL

允我心安 提交于 2019-11-28 12:06:19
问题 Is it possible to define the cardinality of data property in OWL? For instance considering a class "Person" with the data property "Age", is there a way to declare that the data property "Age" must have a single value? 回答1: You use the axiom that you would with an object property (DL and Manchester syntaxes): Person &sqsubseteq; =1.hasAge Person subClassOf hasAge exactly 1 Here's a small ontology with just such axioms: @prefix : <http://stackoverflow.com/q/24188632/1281433/people-have-exactly

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

怎甘沉沦 提交于 2019-11-28 10:36:20
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. 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:comments map to skos:notes. rdfs:labels map to skos:prefLabels. rdfs:subClassOf maps to skos:broader. Using

Representing if-then sentence using OWL?

不问归期 提交于 2019-11-28 07:48:29
I am working with basic OWL, and it's quite easy to represent some simple sentence like "Songoku is a lecturer, he teaches Maths". E.g.: <owl:Class rdf:ID="Lecturer"></owl:Class> <owl:Class rdf:ID="Subject"></owl:Class> <owl:Property rdf:ID="teach"> <rdfs:domain rdf:resource="#Lecturer"/> <rdfs:range rdf:resource="#Subject"/> </owl:Property> <Subject rdf:ID="Maths"></Subject> <Lecturer rdf:ID="Songoku"> <teach> <Subject rdf:about="#Maths"></Subject> </teach> </Lecturer> But I faced a problem when I tried to represent this sentence: Bob is a Student, If Bob has 5 dogs, then he has at least 1

Adding statements of knowledge to an OWL Ontology in Protege)

心已入冬 提交于 2019-11-27 23:16:28
In my Ontology I have three classes, Player , Team , and Competition . I also have the two object properties, employs , and competesIn . The domain of employs is Team , and the range Player , the domain of competesIn is Team or Player and the range Competition . I want the Ontology to infer that if a Player is employed by a Team and that Team competes in a Competition then the Player also competes in that Competition . Is there any way to add this information to an Ontology without putting in the {Player} competesIn {Competition} for every single individual in the ontology? Joshua Taylor First

How to import specific classes and object properties from an ontology in Protege?

点点圈 提交于 2019-11-27 18:56:59
问题 I want to import some classes in Protege from different ontologies to my ontology. For example, I need the classes foaf:Person , org:Site , vcard:Organization , and many more. I don't want to create them by myself (and modifying their IRI). When I did import the whole ontology (Schema.org, vCard, FOAF, …), I had many elements that I don't need. Is there any way to do it? 回答1: — Have you looked at this thread: protege-project.136.n4.nabble.com/… — I tried to use it, but it didn't work. There

how can I recognize object properties vs datatype properties?

[亡魂溺海] 提交于 2019-11-27 12:32:16
问题 My ontology is book classification library. I have problems in this. I want to build a book classification ontology by protégé 4.1, 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. then I'm confused in object properties and datatype properties. if hasEdition is in properties in my ontology then i say that every book in

How to infer isBrotherOf property between two individuals

纵饮孤独 提交于 2019-11-27 08:58:46
I need to infer that one individual is the brother of other one if they have the same father. So, if I have this: Bart hasFather Homer. Lisa hasFather Homer. Because Bart and Lisa have the same father, I would like to infer: Lisa hasBrother Bart. Is there any method to do that using any property characteristics? Joshua Taylor Use Property Chains and Rolification Antoine Zimmermann's answer is a very good start to this problem, and touches on the major point that you need to solve this sort of task: From x to each of x 's brothers, there is a path of the form hasFather o hasFather -1 . Now,

Parsing schema.org ttl/owl file using Jena

僤鯓⒐⒋嵵緔 提交于 2019-11-27 08:31:59
问题 I'm writing a code generator that generate entities (POJO's in Java language) from the schema defined here http://schema.rdfs.org/all.ttl. I'm using Jena to parse the ttl file and retrieve the meta data that I need to generate them. Jena parses the file successfully, however, for some reason it does not list all the attributes of a given entity, e.g., Person. I'm not sure whether I'm doing something wrong, using the wrong API, etc. Here's the code sample that recreates the scenario: public