5ISS Lab 1
Purpose
The intent of these lab is to have you create an ontology step by step so that you get accointed with its main components. You will also use a reasoner to see what automatic deductions can be made thorough the lifecycle of the ontology design.
Before you start
- Download Protégé, an ontology editing tool.
-
Run Protégé (
./run.sh
in the archive you've downloaded). You can skip installing plugins. -
When Protégé has started, go to
File/Preferences
, and then to theNew Entities
tab. SelectAuto-generated ID
instead ofUser-supplied name
. This setting sets a clear boundary between human-oriented names, encoded in labels, and machine-oriented names, encoded in opaque IRIs. Make sure that the language tag matches the language you'll be using. - Protégé is not always very stable, and may crash during the lab. Make sure you save your progress regularily.
Designing the ontology
You will now start building the ontology. Its requirements are the following:
- Being able to describe wheather events (shower, sunshine...)
- Being able to describe parameters related to these events (temperature, pressure...)
- Being able to describe wheather stations observations
- Being able to link observations to events
Designing a lightwheight ontology
Translate the following statements into ontology elements by creating classes:
- Nice weather and Bad weather are two types of Weather event.
- Shower and Fog are two types of Bad weather, Sunshine is a type of Nice weather.
- Observable parameter, Instant and Observation are additional classes in the ontology.
- City, Country and Continents are types of Places.
Translate the following statements into ontology elements by adding properties.
Link these properties to the classes you've just created by setting their
Domain
and Range
. Note that two types of properties
are available: Object properties
, linking two class instances,
and Data properties
, linking a class instance to a litteral (string,
numerical value, date...).
- A Weather event is characterized by Observable parameters.
-
A Weather event has a duration expressed as an
xsd:float
value (in minutes). - A Weather event starts at an Instant.
- A Weather event ends at an Instant.
-
An Instant has for date an
xsd:dateTimeStamp
. - A Weather event has for symptom an Observation.
- An Observation measures an Observable parameter.
-
An Observation has for value an
xsd:float
. Modelling units is out of scope for this lab. - An Observation is located in a Place.
- An Observation is dated at an Instant.
- A Place is located in another Place.
- A Place is the location of another Place
- A Country has for capital a City
Populating the knowledge base
Implement the following statements using the ontology you just built, by
instantiating individuals and adding Object property assertions
and Data property assertions
to describe them. After
Hermitt
in
the Reasoner
tab, then press CTRL+R
each time you
want the reasoner to run).
- Temperature, Hygrometry, Rainfall, Athmospheric pressure, Wind speed and Wind strength are instances of Observable parameter.
- Température is a French synonym to Temperature. Add it as a label (properly setting the language tag) in the individual's annotations.
- Wind speed and Wind strength are equivalent.
-
Toulouse is located in France. Note that the individuals
are not typed in the statement: donot create them as a City or a Country, but as untyped individuals.What does the reasoner infer ? - Toulouse is a City.
- Paris is the capital of France. Create Paris as an untyped individual.
-
10/11/2015 at 10AM is an instant wel'll call
I1 . Its timestamp is2015-11-10T10:00:00Z
. - P1 is an observation measuring a value of 3mm of rainfall at Toulouse at moment I1.
- A1 has for symptom P1.
Designing a heavy ontology
You will now add logical axioms to the ontology to make it more expressive. Express the following statements in the ontology. Note that some definitions are provided here to explain the properties characteristics you can set in Protégé.
- A City instance cannot be a Country instance.
-
A Short Event is a Weather Event that lasts less than 15 minutes.
Create the Short Event class, and add the following axiom to its
equivalent classes:
Event that ’has for duration’ some xsd:float [< 15]
. Note that you may need to adjust the class and property names according to your own choices in the previous questions. - A Long Event is a Weather Event that lasts more than 15 minutes.
- The property is located in is the inverse of is location of.
- If some Place A is located in some place B, and B is located in C, then A is located in C.
- A City can only be the capital of one Coutry, and a Country may only have one capital.
- If a City is the capital of a Country, then this City is located in that Country. Hint: use the notion of sub-properties.
-
A Shower is a Weather Event that has for symptom a
Rainfall Observation which value is more than zero:
'Weather Event' that ’has for symptom’ some (Observation that ('measures' value Rainfall) and (’has value some xsd:float [> 0]))
Populating the ontology
As you did previously, for each assertion, observe the deductions from the reasoner and document relevant information in your lab report.
- France is in Europe.
- The City of Lights is the capital of France.
- Singapore is both a City and a Country.
Finally, what does the reasoner say about A1
?
Go to lab 2