Ontologies with Python, Jean-Baptiste Lamy, Apress Éditions, 350 pages Python et les ontologies, Jean-Baptiste Lamy, ENI Éditions, 310 pages Sombre comme l'Aurore, Jean-Baptiste Lamy, Éditions 38, 466 pages

The blog and personal site of Jean-Baptiste Lamy (Jiba).

My French novel "Sombre comme l'Aurore - La légende de Tienn Halidenn" has been published by Éditions du 38!

My book on Python and ontologies is available in English (Ontologies with Python) and French (Python et les ontologies).

Good reading!

Owlready2 0.46 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

Here are the changes:

  • Remove warning when Cython module is not available

  • Update import OMOP CDM for their new CSV format

  • Basic support for enumerated datatypes (= defined with an equivalent_to and a OneOf)

  • Improved synchronization and multiprocessor support

  • Bugfixes: * Fix IRI() return type in SPARQL * Fix SPARQL queries with two UNIONs when there is no shared variables between the unions members * Fix parsing ontology with IRI ending by '?' * Avoid reusing ID of destroyed entity (storid; reuse is problematic when sharing the quadstore with other processes)

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

Happy new year 2024!

_images/voeux_2024.png

New preprint "ABiMed"

I have published a new preprint:

preprint [p4] Mouazer A, Léguillon R, Boudegzdame N, Levrard T, Le Bars Y, Simon C, Séroussi B, Grosjean J, Lelong R, Letord C, Darmoni S, Schuers M, Sedki K, Dubois S, Falcoff H, Tsopra R, Lamy JB. ABiMed: An intelligent and visual clinical decision support system for medication reviews and polypharmacy management. Arxiv preprint arXiv:2312.11526 2023

Owlready2 0.45 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

Here are the changes:

  • The PREDEFINED_ONTOLOGIES global dictionary can now be used to map ontology IRI to arbitrary local pathes or URL.

  • The new FTSSqlite3Phrase() string type can be used to perform FTS search using Sqlite3 special syntax, e.g. default_world.search(label = FTSSqlite3Phrase("Electrocardiographic OR ECG"))

  • Add support for RDF plain literals, via the plainliteral Python datatype.

  • Bugfixes: * Fix set_name() on property when python_name is the same as name * Fix some special characters (e.g. :) and keyword (e.g. OR) in FTS search * Fix literal with no datatype (should be considered as string, see https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal * Fix wrong inheritance of TransitiveProperty, ReflexiveProperty and SymmetricProperty * Fix 'DeprecationWarning: invalid escape sequence' in regexp * Raise an error when creating a new ontology inside a with ontology:... block * Use rdf:langString for locstr (was rdf:plainLiteral)

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

New preprint "Adaptive questionnaires for facilitating patient data entry in clinical decision support systems"

I have published a new preprint:

preprint [p3] Lamy JB, Mouazer A, Sedki K, Dubois S, Falcoff H. Adaptive questionnaires for facilitating patient data entry in clinical decision support systems: Methods and application to STOPP/START v2. Arxiv preprint arxiv:2309.10398 2023

Owlready2 0.44 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

This version includes an observation framework allowing to register a listener to any entity, in order to be notified when the entity relations are modified.

It also introduces a new syntax for annotating relations: AnnotatedRelation(s,p,o).comment = ["abc"] (NB the old syntax remains supported).

Here are the changes:

  • New syntax for annotations on relation, e.g. AnnotatedRelation(s,p,o).comment = "abc" (the old syntax remains supported)

  • Optimize annotations on relations

  • Support GRAPH clauses in SPARQL INSERT queries

  • Observation framework (see owlready2.observe and doc on the observation framework)

  • Bugfixes: - Fix the update of equivalent_to after destroying a class - Fix the update of annotations on class when modified with SPARQL queries - Fix SPARQL GRAPH clause in SELECT queries when querying the graph as a variable and all triples are not inside the GRAPH clause - Fix LANGMATCHES SPARQL function - Prevent multiprocessing loading of large ontologies when fork is not available (i.e. on Mac) - Fix subproperties parent classes when destroying a property - Fix loading of TransitiveProperty, SymmetricProperty, AsymmetricProperty, ReflexiveProperty, IrreflexiveProperty

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

Owlready2 0.43 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

This version includes a backward incompatible change: literal with different languages are now considered as different. For instance:

  • locstr("Test", "en") != "Test"

  • locstr("Test", "en") != locstr("Test", "fr")

This was not the case in previous releases, and it caused some weird bugs and confusion between literals.

I also would like to introduce a new projet: FullPy is Python module for designing web applications entirely in Python. It uses Owlready for data semantics and persistance. More information on FullPy can be found here:

Finally, due to a last minute bug, there is no 0.42 version.

Here are the changes:

  • INCOMPATIBLE CHANGE: Consider literal with different language as different

  • Support GRAPH clauses in SPARQL queries

  • World now supports custom lock (e.g. World(lock = ...))

  • Bugfixes: - Fix World(enable_thread_parallelism = True) (was named enable_gevent) - Fix blank nodes in rdflib_store - Fix FILTER in SPARQL when the filter was just after a recursive query - Fix recursive query in SPARQL involving variables in their right part - Fix SPARQL query with annotations containing entities - Fix property creation when using a Union in the '>>' syntax (e.g. class Prop((MyClass | MyOtherClass) >> str): pass) - Fix UMLS extraction in PyMedTermino2 - Fix Class IRI with brackets (or other special characters) when writing RDF/XML file

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

FullPy 0.1 has been released!

FullPy is a Python module for developing semantic client-server web application, entirely in Python.

This is the initial release of FullPy.

FullPy can be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/fullpy

Owlready2 0.41 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

This version introduces some works on thread-based parallelization. The parsing of huge OWL file is now faster (about 25% faster on GO), and Owlready can execute SPARQL queries in parallel. Please refer to the doc for more info (https://owlready2.readthedocs.io/en/latest/sync.html).

Here are the changes:

  • Parallelized huge OWL file parsing (about 25% faster on GO)

  • Parallelized SPARQL queries (see owlready2.sparql.execute_many() and execute(spawn = True))

  • Bugfixes: - Fix Class.INDIRECT_get_class_properties() with restriction on Inverse(Prop) - Fix Restriction of type HasSelf - Fix delattr in destroy_entity() - Fix blank nodes importation from RDFlib - Fix ', + and - in FTS search

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

Owlready2 0.40 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

Here are the changes:

  • General class axiom support

  • Update Log4J in Pellet for security purpose

  • Add get_lang_first() for annotations.

  • Bugfixes: - Add trailing / to ontology URL if missing - Fix Individual.is_a when loading ontologies with individuals belonging to two classes, one being the descendant of the other - Fix datetime to make them XSD-compatible (thanks Lukas Müller) - Ensure that Things are properly initialized so that the __init__ method can be safely overwritten (thanks Lukas Müller) - Fix destroy_entity()

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

Happy new year 2023!

_images/voeux_2023.png

Owlready2 0.39 has been released!

Owlready is a Python module for ontology-oriented programming. It can load OWL 2.0 ontologies and manipulate them transparently in Python.

Here are the changes:

  • Make RDF triple deletion non-ontology-specific

  • Faster creation of individual with property value (e.g. MyClass(prop = [value]))

  • Bugfixes: - Fix entity.prop.remove(x) and entity.prop = x when existing values are defined in another ontology than the entity - Fix inverse property update when referenced entity is destroyed (thanks Franzlst) - Prevent reasoners from reparenting OWL base entities such as Thing - Fix the reloading of an ontology that has been destroyed, when a local filename is provided as the ontology base IRI - Fix destroying object property involved in a property chain - Fix reloading of ontologies when the IRI of the ontology was a local filename - Fix SELECT * in SPARQL coumpound queries - Fix Class.get_class_properties() when some properties are defined as restriction on an Inverse property - Fix for RDFlib 0.6.2 (supports bind() override optional argument)

The new version be downloaded from PyPI (Python Package Index): https://pypi.python.org/pypi/Owlready2

New journal paper "Enabling patients to receive clinical practice guideline recommendations for hereditary cancer risk using chatbots, family history, application programming interfaces (API), ontologies, and Owlready2"

I have published a new journal paper:

journal [j70] Ritchie JB, Frey L, Lamy JB, Bellcross C, Morrison H, Schiffman JD, Welch BM. Enabling patients to receive clinical practice guideline recommendations for hereditary cancer risk using chatbots, family history, application programming interfaces (API), ontologies, and Owlready2: System description. Preprint 2021

New journal paper "Early prediction of all-cause clinical deterioration in general ward patients"

I have published a new journal paper:

journalif [j73] Saab A, Abi Khalil C, Jammal M, Saikali M, Lamy JB. Early prediction of all-cause clinical deterioration in general ward patients: development and validation of a biomarker-based machine learning model derived from Rapid Response Team activations. Journal of Patient Safety 2022;18(6)