© Lamy Jean-Baptiste 2021
L. Jean-BaptisteOntologies with Pythonhttps://doi.org/10.1007/978-1-4842-6552-9_6

6. Constructs, restrictions, and class properties

Lamy Jean-Baptiste1  
(1)
Université Sorbonne Paris Nord, LIMICS, Sorbonne Université INSERM, UMR 1142, Bobigny, France
 

In this chapter, we will see how to handle all the OWL constructors in Python with Owlready. We will also see the different “shortcuts” that Owlready offers to facilitate the use of constructors and in particular restrictions.

6.1 Creating constructs

OWL constructors allow you to define logical constructions from classes, individuals, and properties (see sections 3.4.6 and 3.4.7).

In Owlready, restrictions are created with the syntax “property.restriction_type(value)”, using the ...

Get Ontologies with Python: Programming OWL 2.0 Ontologies with Python and Owlready2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.