Hello,
You can create an ontology dynamically with Owlready.
You can create classes dynamically, from a class name and a list of superclasses (see doc here:
http://owlready2.readthedocs.io/en/latest/class.html#creating-classes-dynamically ).
Then, you can add some class construct to the class, for example:
Class.is_a.append(property.some(Other_Class))
For intersection, you can use the & operator, or the And([...]) construct:
Class.is_a.append(property.some(Other_Class) & property2.some(Other_Class2))
Class.is_a.append(And([property.some(Other_Class), property2.some(Other_Class2)]))
Both lines are equivalent, however the And([...]) version is possibly easier to use when creating classes dynamically.
Best regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13
> I want to write Descriptive Logic dynamically for several classes. I'm using
> intersection in the DL. I find some examples in owlapi but not in owlready.
> Can anyone help with this??
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
>
http://owlready.8326.n8.nabble.com/Dynamic-Descriptive-Logic-Insertion-tp236.html> To start a new topic under Owlready, email
[hidden email]
> To unsubscribe from Owlready, visit