Advanced knowledge exploration (python)
How to go home ?
Presentation of the problem
This is the second tutorial! Now that we have seen what is an ontology manipulator, the exploration of heritage and the management of the language and the passage in natural language, we will now see the use of properties. We will only see the properties of objects here but those of data differ only very little.
The mini-project that we will do together to illustrate the use of the properties will consist of graph exploration.
Above, you have the map of the city where Bob lives. In this city, we have two types of paths, roads and pedestrian paths (there is, therefore, a heritage). A path can be linked to another path via an intersection. To describe this, we said that an intersection is along a path that is to say that a path has an intersection along with it.
We have in this city three additional elements that are bob's house, his car as well as the pub of the city. These elements are also located along a path.
Bob is currently in the pub and will have to go home. Having drunk too much, he goes back on foot. The next day, Bob will get his car on foot and then take it home. When he is in the car, Bob will no longer be allowed to use the pedestrian paths and will only have to take roads.
Our goal will therefore be to find the shortest paths in terms of the number of paths used, for each trip.
The ontology used
In the ontology used, we have the two classes "pedestrian_path" and "road" inheriting from the class "path". We also have the class "intersection" inheriting from the class "place".
The individuals "house", "pub" and "car" are of type "place". The individuals of types "intersection" are notes "int_i", the "road" are notes "road_i" and the "pedestrian_path" are notes "pp_i".
The property "isAlong" is applied from one place to a path to signify that the place is along this path.
Before you start
Before moving on, you can use the ontologenius_tutorial package that we have create before. To be sure that your the package is well configured to use Ontologenius, we advise you to follow this guide. You can also create the launch file as done in the previous tutorial. We will name this file find_our_way and put the tutorial_2.owl file as an input file.