Raisonning and SWRL : Practical Activity
1 - The family ontology
Duration1h15 AI Banned
Launch the Protégé environment and import the Family ontology locally. Family Ontology
Add a tab dedicated to inference rules by performing the following actions:
- Window /create new tab, name it Rules, for example.
- Then Window/Views/Ontology Views/ Rules
- You can then view the existing rules associated with the ontology. Run an reasonner and view the result.
Throughout this activity, remember to save any changes made to this ontology. The save format must be RDF/XML Syntax. You can check the RDF/XML syntax of your ontology by displaying the RDF/XML Rendering tab.
- Check that the Family ontology has been loaded into Protégé, and add the following properties to the
Personconcept, making sure to specify the domain and range of each property:
hasGrandParent
hasGrandChild
hasGrandFather
hasGrandMother
hasGrandSon
hasGrandDaughter- Specify subproperty relationships when necessary.
- Clearly differentiate the range of a property between the concepts
ManandWoman, when necessary. - Associate the appropriate characteristic(s) with these properties.
- What description is appropriate to link the property hasGrandParent to hasGrandChild? Specify it.
- We would like to enrich our knowledge base and deduce the grandparents (grand parent) and grandchildren (grand child) of different individuals. In addition, for each individual, we must deduce, where applicable, their grandfather (grand father), grandmother (grand mother), grandson (grand son), or granddaughter (grand daughter).
- Add the appropriate inference rules.
- Save and run a reasonner to verify that the new knowledge is generated correctly.
- We would like to describe the
Personconcept by age.
- Add a new
ageproperty to the Person concept. Make sure that age is a positive integer. - Then associate ages with the following individuals:
Rachel: 38 years old
Ethan: 30 years old
Larry: 23 years old
Harry: 25 years old
Pamela: 27 years old- Deduce, for a set of individuals with the same parents, who is older or younger than the other. To do this, you need to define two other properties,
youngerThanandolderThan. Specify the domain, range, and characteristics of these properties. - Define the inference rule that allows you to deduce the following new knowledge among these individuals (whose ages are known):
- who is younger than the other with
youngerThan - who is older than the other with
olderThan
- who is younger than the other with
- Test this rule and verify that the new knowledge is correctly inferred for these individuals. For example, you should get the following result: “Ethan youngerThan Rachel.”
2 - Internship management system
Now go back to your ontology describing an internship management system for your engineering school, and add somee useful reasoning rules. For example :
- A student can only apply for an internship if they possess at least 2 of the required skills.
- A supervisor cannot supervise more than 3 internships.
- An internship must last at least 8 weeks to qualify for credits.
- Infer that a student has obtained credits if they have completed an internship that offers credits.