Name | Owlready2 JSON |
Version |
0.42
JSON |
| download |
home_page | https://bitbucket.org/jibalamy/owlready2 |
Summary | A package for ontology-oriented programming in Python: load OWL 2.0 ontologies as Python objects, modify them, save them, and perform reasoning via HermiT. Includes an optimized RDF quadstore. |
upload_time | 2023-06-01 08:37:32 |
maintainer | |
docs_url | None |
author | Lamy Jean-Baptiste (Jiba) |
requires_python | >=3.6 |
license | LGPLv3+ |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Owlready2
=========
.. image:: https://readthedocs.org/projects/owlready2/badge/?version=latest
:target: http://owlready2.readthedocs.io/en/latest/
:alt: documentation
.. image:: http://www.lesfleursdunormal.fr/static/_images/owlready_downloads.svg
:target: http://www.lesfleursdunormal.fr/static/informatique/pymod_stat_en.html
:alt: download stats
Owlready2 is a module for ontology-oriented programming in Python 3. It can manage ontologies and knwoledge graphs, and includes an optimized RDF/OWL quadstore.
Owlready2 can:
- Import OWL 2.0 ontologies in NTriples, RDF/XML or OWL/XML format
- Export OWL 2.0 ontologies to NTriples or RDF/XML
- Manipulates ontology classes, instances and properties transparently, as if they were normal Python objects
- Add Python methods to ontology classes
- Perform automatic classification of classes and instances, using the HermiT or Pellet reasoner (included)
- Load DBpedia or UMLS (for medical terminology, using the integrated PyMedTermino2 submodule)
- Native support for optimized SPARQL queries
- Tested up to 1 billion of RDF triples! (but can potentially support more)
- In addition, the quadstore is compatible with the RDFlib Python module
- Finally, Owlready2 can also be used as an ORM (Object-Relational mapper) -- as a graph/object database, it beats Neo4J, MongoDB, SQLObject and SQLAlchemy in terms of performances
Owlready has been created by Jean-Baptiste Lamy at the LIMICS reseach lab.
It is available under the GNU LGPL licence v3.
If you use Owlready in scientific works, **please cite the following article**:
**Lamy JB**.
`Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies. <http://www.lesfleursdunormal.fr/_downloads/article_owlready_aim_2017.pdf>`_
**Artificial Intelligence In Medicine 2017**;80:11-28
In case of troubles, questions or comments, please use this Forum/Mailing list: http://owlready.306.s1.nabble.com
What can I do with Owlready2?
-----------------------------
Load an ontology from a local repository, or from Internet:
::
>>> from owlready2 import *
>>> onto_path.append("/path/to/your/local/ontology/repository")
>>> onto = get_ontology("http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl")
>>> onto.load()
Create new classes in the ontology, possibly mixing OWL constructs and Python methods:
::
>>> with onto:
... class NonVegetarianPizza(onto.Pizza):
... equivalent_to = [
... onto.Pizza
... & ( onto.has_topping.some(onto.MeatTopping)
... | onto.has_topping.some(onto.FishTopping)
... ) ]
... def eat(self): print("Beurk! I'm vegetarian!")
Access ontology class, and create new instances / individuals:
::
>>> onto.Pizza
pizza_onto.Pizza
>>> test_pizza = onto.Pizza("test_pizza_owl_identifier")
>>> test_pizza.has_topping = [ onto.CheeseTopping(),
... onto.TomatoTopping(),
... onto.MeatTopping () ]
Export to RDF/XML file:
::
>>> test_onto.save()
Perform reasoning, and classify instances and classes:
::
>>> test_pizza.__class__
onto.Pizza
>>> # Execute HermiT and reparent instances and classes
>>> sync_reasoner()
>>> test_pizza.__class__
onto.NonVegetarianPizza
>>> test_pizza.eat()
Beurk! I'm vegetarian !
Perform SPARQL queries:
::
>>> list(default_world.sparql("""SELECT * { ?x a owl:Class . FILTER(ISIRI(?x)) }"""))
[[pizza_onto.CheeseTopping], [pizza_onto.FishTopping], [pizza_onto.MeatTopping], [pizza_onto.Pizza], [pizza_onto.TomatoTopping], [pizza_onto.Topping], [pizza_onto.NonVegetarianPizza]]
Access to medical terminologies from UMLS:
::
>>> from owlready2 import *
>>> from owlready2.pymedtermino2.umls import *
>>> default_world.set_backend(filename = "pym.sqlite3")
>>> import_umls("umls-2018AB-full.zip", terminologies = ["ICD10", "SNOMEDCT_US", "CUI"])
>>> default_world.save()
>>> PYM = get_ontology("http://PYM/").load()
>>> ICD10 = PYM["ICD10"]
>>> SNOMEDCT_US = PYM["SNOMEDCT_US"]
>>> SNOMEDCT_US[186675001]
SNOMEDCT_US["186675001"] # Viral pharyngoconjunctivitis
>>> SNOMEDCT_US[186675001] >> ICD10 # Map to ICD10
Concepts([
ICD10["B30.9"] # Viral conjunctivitis, unspecified
])
For more documentation, look at the doc/ directories in the source.
Changelog
---------
version 1 - 0.2
***************
* Fix sync_reasonner and Hermit call under windows (thanks Clare Grasso)
version 1 - 0.3
***************
* Add warnings
* Accepts ontologies files that do not ends with '.owl'
* Fix a bug when loading ontologies including concept without a '#' in their IRI
version 2 - 0.1
***************
* Full rewrite, including an optimized quadstore
version 2 - 0.2
***************
* Implement RDFXML parser and generator in Python (no longer use rapper or rdflib)
* Property chain support
* Add ntriples_diff.py utility
* Bugfixes:
- Fix breaklines in literal when exporting to NTriples
version 2 - 0.3
***************
* Add destroy_entity() global function
* Greatly improve performance for individual creation
* When searching, allow to use "*" as a jocker for any object
* Bugfixes:
- Fix nested intersections and unions
- Fix boolean
- Fix bug when removing parent properties
- Fix parsing of rdf:ID
- Fix multiple loading of the same ontology whose IRI is modified by OWL file, using an ontology alias table
- Fix ClassConstruct.subclasses()
- Check for properties with multiple incompatible classes (e.g. ObjectProperty and Annotation Property)
version 2 - 0.4
***************
* Add methods for querying the properties defined for a given individuals, the inverse properties
and the relation instances (.get_properties(), .get_inverse_properties() and .get_relations())
* Add .indirect() method to obtain indirect relations (considering subproperties, transivitity,
symmetry and reflexibity)
* search() now takes into account inheritance and inverse properties
* search() now accepts 'None' for searching for entities without a given relation
* Optimize ontology loading by recreating SQL index from scratch
* Optimize SQL query for transitive quadstore queries, using RECURSIVE Sqlite3 statements
* Optimize SQL query for obtaining the number of RDF triples (ie len(default_world.graph))
* Add Artificial Intelligence In Medicine scientific article in doc and Readme
* Bugfixes:
- Fix properties loading when reusing an ontology from a disk-stored quadstore
- Fix _inherited_property_value_restrictions() when complement (Not) is involved
- Fix restrictions with cardinality
- Fix doc on AllDisjoint / AllDifferent
version 2 - 0.5
***************
* Add individual/instance editor (require EditObj3, still largely untested)
* Add support for hasSelf restriction
* Optimize XML parsers
* Check for cyclic subclass of/subproperty of, and show warning
* PyPy 3 support (devel version of PyPy 3)
* Bugfixes:
- Fix search() for '*' value on properties with inverse
- Fix individual.annotation = "..." and property.annotation = "..."
- Fix PlainLiteral annotation with no language specified
- Fix doc for Creating classes dynamically
- Fix loading ontologies with python_name annotations
- Fix _inherited_property_value_restrictions when multiple is-a / equivalent-to are present
- Align Python floats with xsd:double rather than xsd:decimal
- Rename module 'property' as 'prop', to avoid name clash with Python's 'property()' type
version 2 - 0.6
***************
* Add set_datatype_iri() global function for associating a Python datatype to an IRI
* Add nquads ontology format (useful for debugging)
* Add support for dir() on individuals
* Add support for ontology using https: protocol (thanks Samourkasidis Argyrios)
* Add observe module (for registering callback when the ontology is modified)
* Improve docs
* Bugfixes:
- Align Python floats with xsd:decimal rather than xsd:double, finally, because decimal accepts int too
- Fix Class.instances() so as it returns instances of subclasses (as indicated in the doc)
- Fix direct assignation to Ontology.imported_ontologies
- Fix a bug in reasoning, when adding deduced facts between one loaded and one non-loaded entity
version 2 - 0.7
***************
* Bugfixes:
- Restore HermiT compiled with older Java compilator (higher compatibility)
version 2 - 0.8
***************
* Bugfixes:
- REALLY restore HermiT compiled with older Java compilator (higher compatibility)
- Fix search(prop = "value") when value is a string and the ontology uses localized string
version 2 - 0.9
***************
* PostgresQL backend (in addition to SQLite3)
* Add 'exclusive = False' option for SQLite3 backend (slower, but allows multiple uses)
* Use unique index in sqlite3 quadstore on resources table
* Optimize sqlite3 quadstore by caching IRI dict (5% faster)
* Add == support for class construct
* Add get_namespace() support on World
* Add 'existential restrictions as class properties' feature
* Bugfixes:
- Fix imported ontologies
- Fix saving ontologies in onto_path
- Fix clear() on CallbackList
- Fix bug in Class IRI in ontologies whose base IRI ends with a /
- Fix imported ontologies in ontologies whose base IRI ends with a /
version 2 - 0.10
****************
* Add Ontology.metadata for adding/querying ontology metadata
* Allows multiple individual creations with the same name/IRI, now returning the same individuals
* Add OwlReadyInconsistentOntologyError and Word.inconsistent_classes()
* Implement RDF/XML and OWL/XML parsing in Cython (25% speed boost for parsing)
* Small optimization
* Extend individual.prop.indirect() to include relations asserted at the class level
* Add .query_owlready() method to RDF graph
* Bugfixes:
- Fix reasoning when obtaining classes equivalent to nothing
- Fix World creation with backend parameters
- Fix error when adding property at the class definition level
- Fix loading of ontology files with no extension from onto_path
- Fix properties defined with type 'RDF Property' and subproperty of 'OWL Data/Object/Annotation Property'
- Support old SQLite3 versions that do not accept WITHOUT ROWID
- Fix reference to undeclared entities (they were replaced by None, now by their IRI)
- Fix loading and saving ontologies whose base IRI ends with /
- Fix RDF query using string
version 2 - 0.11
****************
* Optimized Full-Text Search
* Support Pellet reasoner in addition to HermiT
* Support loading of huge OWL files (incremental load)
* Use Class.property.indirect() for indirect Class property (instead of Class.property)
* Add reload and reload_if_newer parameters to Ontology.load()
* search() is now much faster on properties that have inverse
* Add shortcut for SOME ConstrainedDatatype: e.g. age >= 65
* Bugfixes:
- Fix creation of an individual that already exists in the quadstore
- Fix missing import of EntityClass in class_construct.py
- Fix World.save() with RDF/XML format
- Fix Thing.subclasses() and Thing.descendants()
- Fix ontology's update time for ontologies created de novo in Python with Owlready
- Fix reasoning when asserting new parents with equivalent classes
version 2 - 0.12
****************
* New quadstore
* Numerical search (NumS, e.g. all patients with age > 65)
* Nested searches
* Synchronization for multithreading support
* Add Class.inverse_restrictions() and Class.direct_instances()
* Drop PostgresQL support (little interest: more complex and slower than Sqlite3)
* Bugfixes:
- Fix call to _get_by_storid2
- Fix rdfs_subclassof in doc
- Fix FTS triggers
- Fix boolean in RDFlib / SPARQL
- Fix bug when destroying an AnnotationProperty
version 2 - 0.13
****************
* Bugfixes:
- Fix performance regression due to suboptimal index in the quadstore
- Fix messing up with IRI ending with a /
- Fix error in World cloning
- Fix the addition of Thing in class's parent when redefining a class with Thing as the only parent
- Fix inverse_resctriction()
- Add error message when creating an existent quadstore
version 2 - 0.14
****************
* UMLS support (owlready2.pymedtermino2 package)
* Can infer object property values when reasoning (thanks W Zimmer)
* New implementation of property values; use INDIRECT_prop to get indirect values
* Support several class property types : some, only, some + only, and direct relation
* Automatically create defined classes via class properties
* Support anonymous individuals, e.g. Thing(0)
* Optimize search() when only the number of returned elements is used
* Optimize FTS search() when using also non-FTS statements
* Can restrict reasoning to a list of ontologies
* Union searches (i.e. default_world.search(...) | default_world.search(...))
* Bugfixes:
- Fix functional class properties with inheritance
- Fix dupplicated instance list restrictions when calling close_world(ontology)
- Fix use of '*' in search
- Fix synchronization, using contextvars for global variables
version 2 - 0.15
****************
* Can infer data property values when reasoning with Pellet
* Optimize searches with 'type =', 'subclass_of =', or 'is_a =' parameters
* Add Property.range_iri
* Add _case_sensitive parameter to search()
* Add inverse property support in RDFlib support
* Show Java error message when reasoners crash
* Bugfixes:
- Consider inverse property in get_properties()
- Fix parsing bug in reasoning with HermiT and infer_property_values = True
- Namespace prefix support in RDFlib binding
- Fix dupplicates values when a relation involving a property with inverse is asserted in both directions
- Better workaround in case of metaclass conflict
- Fix 'sqlite3.OperationalError: too many SQL variables' in searches with 'type =', 'subclass_of =', or 'is_a =' parameters
version 2 - 0.16
****************
* Optimize nested searches
* search(sublclass_of = xxx) now returns xxx itself in the results
* Support "with long_ontology_name as onto" syntax
* In UMLS import, add optional parameters for preventing extraction of attributes, relations, etc
* Support SPARQL INSERT queries
* Optimize Pymedtermino mapping
* Doc for PyMedTermino2
* Bugfixes:
- Fix 'Cannot release un-acquired lock' error when reasoning on inconsistent ontologies inside a 'with' statement
- Fix bug when loading a property that refers to another property from a quadstore stored on disk
- Fix RDF triple suppression with RDFlib when object is a datatype
version 2 - 0.17
****************
* SWRL rule support
* Allows importing UMLS suppressed terms
* Uncache entities when relaoding an ontology
* Bugfixes:
- Fix PyMedTermino2 installation
- Fix data property value inferrence with debug = 1
- Fix sort() in LazyList (thanks fiveop!)
- Fix World.get() and add World.get_if_loaded()
- Add appropriate error message when importing UMLS with Python 3.6
- Fix individuals belonging to multiple, equivalent, classes after reasoning
version 2 - 0.18
****************
* Add UNIQUE constraints for preventing dupplicated RDF triples in the quadstore
* Add Individual.INDIRECT_is_a / Individual.INDIRECT_is_instance_of
* Add isinstance_python() (faster than isinstance(), but do not consider equivalent_to relations)
* Bugfixes:
- Force UTF-8 encoding when importing UMLS
- Be more tolerant when loading OWL file
version 2 - 0.19
****************
* Consider symmetric properties as their own inverse properties
* Update Python objects after basic SPARQL update/delete queries (works on user-defined properties, hierarchical properties (type/subclassof) and equivalence properties)
* Add individual.INVERSE_property
* Add Class.INDIRECT_is_a
* INDIRECT_is_a / INDIRECT_is_instance_of now include class contructs. ancestors() has a 'include_constructs' parameter, which defaults to False.
* Add more aliases for XMLSchema datatypes
* Add is_a property to class constructs
* Add bottomObjectProperty and bottomDataProperty
* Support ReflexiveProperties in individual.INDIRECT_property
* Optimize Thing.subclasses()
* Optimize search() with multiple criteria, including those done by PyMedTermino
* Add support for destroy_entity(SWRL_rule)
* Add support for UMLS "metathesaurus" format in addition to "full" format
* Bugfixes:
- After reasoning, keep all equivalent classes as parents of individuals (as they may have methods)
- Fix IndividualPropertyAtom when creating SWRL rule
- Fix SWRL parser
- Fix RDF serialization for nested RDF lists
- Fix removing inverse property (i.e. Prop.inverse = None)
- Fix datetime parsing for date with time zone or milliseconds
version 2 - 0.20
****************
* Add support for undoable destroy_entity()
* Small database optimizations
* No longer treat properties associated with exactly-1 or max-1 restriction as functional properties,
returning single values instead of a list (you can restore the previous behaviour as follows:
import owlready2.prop; owlready2.prop.RESTRICTIONS_AS_FUNCTIONAL_PROPERTIES = True)
* Bugfixes:
- Fix performance bug on UMLS mapping in PyMedTermino
version 2 - 0.21
****************
* Use Pellet 2.3.1 (same version as Protégé) instead of 2.4 (which has a bug in SWRL for many builtin predicates including equals and matches)
* Much faster mangement of annotations on relations
* Bugfixes:
- Fix bug on blank node in RDFlib/SPARQL support
- Fix bug on blank node deletion in RDFlib/SPARQL support
- Fix data loss in Restriction modification
- Fix 'no query solution' error in search()
- Fix literal support in RDF lists, causing "TypeError: '<' not supported between instances of 'NoneType' and 'int'" when saving ontologies
- Fix DifferentFrom SWRL builtin
- Fix string parsing in SWRL rules
- Fix string and boolean literal representation (str/repr) in SWRL rules
- Fix the inverse of subproperties having a symmetric superproperty
version 2 - 0.22
****************
* Add support for disjoint unions (Class.disjoint_unions)
* Add deepcopy support on class constructs, and automatically deep-copy constructs when needed (i.e. no more OwlReadySharedBlankNodeError)
* Support the creation of blank nodes with RDFlib
version 2 - 0.23
****************
* Add get_parents_of(), get_instances_of(), get_children_of() methods to ontology, for querying the hierarchical relations defined in a given ontology
* Use Thing as default value for restrictions with number, instead of None
* Add 'filter' parameter to save(), for filtering the entities saved (contributed by Javier de la Rosa)
* Bugfixes:
- Fix value restriction with the false value
- Fix blank node loading from different ontologies
- Fix constructs reused by several classes
- Fix 'Class.is_a = []' was not turning the list into an Owlready list
- Fix destroy_entity() - was not destroying the IRI of the entity
- Improve setup.py: ignore Cython if Cython installation fails
version 2 - 0.24
****************
* Support intersection of searches (e.g. World.search(...) & World.search(...))
* Add owlready2.reasoning.JAVA_MEMORY
* Move development repository to Git
* Bugfixes:
- Fix parsing of NTriples files that do not end with a new line
- Fix KeyError with Prop.python_name when several properties share the same name
- Fix get_ontology() calls in Python module imported by ontologies in a World that is not default_world
- Fix use of PyMedTermino2 in a World that is not default_world
- Fix World.as_rdflib_graph().get_context(onto) for ontology added after the creation of the RDFLIB graph
- Fix destroying SWRL rules
- Fix disjoint with non-atomic classes
version 2 - 0.25
****************
* Allow the declaration of custom datatypes with declare_datatype()
* Support the annotation of annotations (e.g. a comment on a comment)
* search() now support the "subproperty_of" argument
* search() now support the "bm25" argument (for full-text searches)
* Bugfixes:
- Fix Concept.descendant_concepts() in PymedTermino2
- Update already loaded properties when new ontologies are loaded
- Now accept %xx quoted characters in file:// URL
- Improve error message on punned entities
- Property.get_relations() now considers inverse properties
- Fix "AttributeError: 'mappingproxy' object has no attribute 'pop'" error
- Fix Thing.instances()
version 2 - 0.26
****************
* Module owlready2.dl_render allows rendering entities to Description Logics (contributed by Simon Bin)
* Bugfixes:
- Adjustment in the comparison of strings from SameAs and DiferrentFrom, allowing equal comparison regardless of the case-sensitive (contributed by Thiago Feijó)
- Fix transitive equivalent_to relations between classes and OWL constructs
- Fix AnnotationProperty[entity] where entity is a predefined OWL entity (e.g. comment or Thing)
- Fix entity.AnnotationProperty where entity is a predefined OWL entity (e.g. comment or Thing)
- Fix HermiT when reasoning on several ontologies with imports statement
- Ignore "A type A", with a warning
version 2 - 0.27
****************
* When Pellet is called with debug >= 2 on an inconsistent ontology, Pellet explain output is displayed (contributed by Carsten Knoll)
* Update doc theme (contributed by Carsten Knoll)
* Adapt setup.py to allow 'python setup.py develop' and 'pip install -e .' (contributed by Carsten Knoll)
* Add 'url' argument to Ontology.load() method
* Add 'read_only' argument to World.set_backend() method
* Bugfixes:
- Fix XML/RDF file parsing/writing for entity having ':' in their name
- Fix destroy_entity(), was leaking some RDF triples when class contructs or equivalent_to were involved
- Fix 'Class1(entityname); Class2(entityname)' (was changing the individual namespace)
- Fix annotation request on RDF annotation properties, e.g. label.label
version 2 - 0.28
****************
* Bugfixes:
- Fix installation under Windows (contributed by CVK)
- Under Windows, run the reasoners without opening a DOS windows
version 2 - 0.29
****************
* Bugfixes:
- Fix installation as a requirement of another Python module
version 2 - 0.30
****************
* New native SPARQL engine that translates SPARQL queries to SQL
* Direct support for Dublin Core via the integration of an OWL translation
* Bugfixes:
- Fix RecursionError when saving very deep ontologies to RDF/XML
- Fix IRI of the form 'urn:uuid:...'
- Fix loading ontologies that modify an imported property
version 2 - 0.31
****************
* Can open SPARQL endpoints (see module owlready2.sparql.endpoint and doc)
* Support ClaML file format in PyMedTermino2 for French ICD10
* Bugfixes:
- Fix prefix in SPARQL that does not correspond to an existing ontology
- Fix ! in SPARQL FILTER
- Fix Thing.subclasses() so as it now returns classes that have parent constructs but no parent named classes
- Fix metaclass of FusionClass when creating individuals belonging to several classes, including one from PyMedTermino
- Fix Prop[individual] for functional properties with no relation for the given individual
version 2 - 0.32
****************
* Add scripts to import OMOP-CDM as an ontology (see directory pymedtermino2/omop_cdm/)
* SPARQL engine optimization
* Bugfixes:
- Fix name clash when creating individuals from classes whose names end with a number, e.g. "c1" + "1" vs "c" + "11"
- Fix block with only a FILTER in SPARQL
version 2 - 0.33
****************
* Bugfixes:
- Fix 'sqlite3.OperationalError: no such table: sqlite_schema' with SQLite3 < 0.33
version 2 - 0.34
****************
* NEW FORUM ADDRESS: http://owlready.306.s1.nabble.com
* Support SPARQL property path expressions with parentheses without sequences, repeats or negative property set nested inside repeats
* Add define_datatype_in_ontology() global function for defining a new user-defined datatype in an ontology
* Class.instances() now takes into account equivalent classes (like other class methods such as .descendants())
* Add the LOADED(iri) SPARQL function
* Support Thing.is_a.append(...)
* Faster loading of very large quadstores
* list(onto.metadata) now lists the annotations present on the ontology
* Add OntologyClass and NamespaceClass argument to get_ontology() and get_namespace(), allowing the use of custom classes
* Bugfixes:
- Accept UTF8 and latin encoding from reasoners (thanks Francesco Compagno)
- Fix SPARQL query with a UNION without variables
- Fix semantic type support in UMLS
version 2 - 0.35
****************
* SPARQL optimizations
* Support for VALUES in SPARQL
* Add STATIC optimization keyword extension to SPARQL
* Accept GROUP BY, HAVING, LIMIT in INSERT and DELETE SPARQL query
* Add the STORID(iri), DATE(), TIME() and DATETIME() SPARQL function
* UMLS CUI are now hierarchized by Semnatic Types (TUI)
* Improved parallelism
* Bugfixes:
- Fix 'sqlite3.OperationalError: circular reference: prelim1_objs' in .instances(), caused by a bug in old versions of SQLite3
- Fix SPARQL INSERT query with data parameters in the INSERT clause
- Fix RDF list parsing when the list includes the integer number 5
- Fix nb_parameter in SPARQL query when numbered parameters are used
- Fix ObjectProperty.subclasses(), ObjectProperty.descendants(), Property.subclasses(), DataProperty.descendants(), AnnotationProperty.subclasses(), AnnotationProperty.descendants()
- Fix declare_datatype() for datatype already used in Owlready, such as AnyURI
- Fix Pellet on properties having annotations that are not declared in the loaded ontologies
version 2 - 0.36
****************
* Support xsd:duration, including DATETIME_DIFF(), DATETIME_ADD(), DATETIME_SUB() SPARQL non-standard functions
* Faster ontology operation (e.g. ontology deletion) on big quadstores
* Automatically add .owl, .rdf or .xml to ontology IRI if the IRI itself does not yield an OWL file
* Bugfixes:
- Fix FusionClasses (= individuals belonging to several classes, i.e. multiple instanciation) when using several worlds
- Fix OPTIONAL SPARQL clause when guessing variable types
- Fix typo in undo entity destruction (thanks Lukas Westhofen)
- Fix IRI from OWL namespace in SWRL rules
- Fix Pellet explanation on inconsistent ontology
- Fix MEDDRA parent-child relation of LLT in PyMedTermino2
- Make sure the filename is a file before returning (Thanks Nicolas Rouquette)
version 2 - 0.37
****************
* Add World.forget_reference(entity)
* Add NamedIndividual (for SPARQL results on rdf:type)
* Add 'update_relation' optional args to Ontology.destroy()
* Add Ontology.set_base_iri() and Ontology.base_iri = "new_base_iri"
* Bugfixes:
- Fix SPARQL queries having a UNION but using no variable from the UNION
- Fix SPARQL queries on read only quadstores
- Fix SPARQL queries mixing OPTIONAL and VALUES / STATIC
- Fix property defined as a subproperty of TransitiveProperty (and the like), but not of type ObjectProperty
- Fix importlib.reload(owlready2)
- Fix RDF/XML serialization of individuals whose class name start by a digit
- Fix RDF/XML serialization when ontology base IRI ends with /
- Fix Or.Classes = ... and And.Classes = ...
- Fix ONLY class properties with more than two values
version 2 - 0.38
****************
* Accepts localized language codes, such as fr_FR or fr_BE, and wildcard fr_any
* Add 'update_is_a' optional args to Ontology.destroy()
* Bugfixes:
- Fix individual.INVERSE_prop update when prop is functional
- Fix performance regression on complex SPARQL queries with OPTIONAL
- Fix declare_datatype after a World has been closed
- Fix Pellet reasoning on blank nodes (ignoring them)
- Fix Pellet reasoning on strings data property that include comma ","
- Fix boolean constant 'true' and 'false' in SPARQL engine
- Fix INSERT SPARQL queries with UNION that insert RDF triples without variables
- Fix SPARQL queries with only a FILTER NOT EXISTS in the WHERE part
- Accept empty lines at the beginning of NTriple files
- Support non-ASCII characters when parsing SWRL rules
version 2 - 0.39
****************
* 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)
version 2 - 0.40
****************
* 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()
version 2 - 0.41
****************
* 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
version 2 - 0.42
****************
* INCOMPATIBLE CHANGE: Consider literal with different language as different (e.g. locstr("Test", "en") != locstr("Test", "fr"))
* 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
Links
-----
Owlready2 on BitBucket (Git development repository): https://bitbucket.org/jibalamy/owlready2
Owlready2 on PyPI (Python Package Index, stable release): https://pypi.python.org/pypi/Owlready2
Documentation: http://owlready2.readthedocs.io/
Forum/Mailing list: http://owlready.306.s1.nabble.com
Contact "Jiba" Jean-Baptiste Lamy:
::
<jean-baptiste.lamy *@* univ-paris13 *.* fr>
LIMICS
INSERM, Université Sorbonne Paris Nord, Sorbonne Université
Bureau 149
74 rue Marcel Cachin
93017 BOBIGNY
FRANCE
Raw data
{
"_id": null,
"home_page": "https://bitbucket.org/jibalamy/owlready2",
"name": "Owlready2",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Lamy Jean-Baptiste (Jiba)",
"author_email": "jibalamy@free.fr",
"download_url": "https://files.pythonhosted.org/packages/fc/7d/63421107ca637824645b2058337238cf18238b788e1c3165535a6a303359/Owlready2-0.42.tar.gz",
"platform": null,
"description": "Owlready2\n=========\n\n.. image:: https://readthedocs.org/projects/owlready2/badge/?version=latest\n :target: http://owlready2.readthedocs.io/en/latest/\n :alt: documentation\n\n.. image:: http://www.lesfleursdunormal.fr/static/_images/owlready_downloads.svg\n :target: http://www.lesfleursdunormal.fr/static/informatique/pymod_stat_en.html\n :alt: download stats\n\n\n \nOwlready2 is a module for ontology-oriented programming in Python 3. It can manage ontologies and knwoledge graphs, and includes an optimized RDF/OWL quadstore.\n\nOwlready2 can:\n\n - Import OWL 2.0 ontologies in NTriples, RDF/XML or OWL/XML format\n\n - Export OWL 2.0 ontologies to NTriples or RDF/XML\n\n - Manipulates ontology classes, instances and properties transparently, as if they were normal Python objects\n\n - Add Python methods to ontology classes\n\n - Perform automatic classification of classes and instances, using the HermiT or Pellet reasoner (included)\n\n - Load DBpedia or UMLS (for medical terminology, using the integrated PyMedTermino2 submodule)\n\n - Native support for optimized SPARQL queries\n\n - Tested up to 1 billion of RDF triples! (but can potentially support more)\n \n - In addition, the quadstore is compatible with the RDFlib Python module\n \n - Finally, Owlready2 can also be used as an ORM (Object-Relational mapper) -- as a graph/object database, it beats Neo4J, MongoDB, SQLObject and SQLAlchemy in terms of performances\n \nOwlready has been created by Jean-Baptiste Lamy at the LIMICS reseach lab.\nIt is available under the GNU LGPL licence v3.\nIf you use Owlready in scientific works, **please cite the following article**:\n\n **Lamy JB**.\n `Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies. <http://www.lesfleursdunormal.fr/_downloads/article_owlready_aim_2017.pdf>`_\n **Artificial Intelligence In Medicine 2017**;80:11-28\n \nIn case of troubles, questions or comments, please use this Forum/Mailing list: http://owlready.306.s1.nabble.com\n\n\n \nWhat can I do with Owlready2?\n-----------------------------\n\nLoad an ontology from a local repository, or from Internet:\n\n::\n\n >>> from owlready2 import *\n >>> onto_path.append(\"/path/to/your/local/ontology/repository\")\n >>> onto = get_ontology(\"http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl\")\n >>> onto.load()\n\nCreate new classes in the ontology, possibly mixing OWL constructs and Python methods:\n\n::\n\n >>> with onto:\n ... class NonVegetarianPizza(onto.Pizza):\n ... equivalent_to = [\n ... onto.Pizza\n ... & ( onto.has_topping.some(onto.MeatTopping)\n ... | onto.has_topping.some(onto.FishTopping)\n ... ) ]\n ... def eat(self): print(\"Beurk! I'm vegetarian!\")\n\nAccess ontology class, and create new instances / individuals:\n\n::\n\n >>> onto.Pizza\n pizza_onto.Pizza\n >>> test_pizza = onto.Pizza(\"test_pizza_owl_identifier\")\n >>> test_pizza.has_topping = [ onto.CheeseTopping(),\n ... onto.TomatoTopping(),\n ... onto.MeatTopping () ]\n\nExport to RDF/XML file:\n\n::\n\n >>> test_onto.save()\n\nPerform reasoning, and classify instances and classes:\n\n::\n\n >>> test_pizza.__class__\n onto.Pizza\n \n >>> # Execute HermiT and reparent instances and classes\n >>> sync_reasoner()\n \n >>> test_pizza.__class__\n onto.NonVegetarianPizza\n >>> test_pizza.eat()\n Beurk! I'm vegetarian !\n\nPerform SPARQL queries:\n\n::\n \n >>> list(default_world.sparql(\"\"\"SELECT * { ?x a owl:Class . FILTER(ISIRI(?x)) }\"\"\"))\n [[pizza_onto.CheeseTopping], [pizza_onto.FishTopping], [pizza_onto.MeatTopping], [pizza_onto.Pizza], [pizza_onto.TomatoTopping], [pizza_onto.Topping], [pizza_onto.NonVegetarianPizza]]\n\n\nAccess to medical terminologies from UMLS:\n\n::\n\n >>> from owlready2 import *\n >>> from owlready2.pymedtermino2.umls import *\n >>> default_world.set_backend(filename = \"pym.sqlite3\")\n >>> import_umls(\"umls-2018AB-full.zip\", terminologies = [\"ICD10\", \"SNOMEDCT_US\", \"CUI\"])\n >>> default_world.save()\n \n >>> PYM = get_ontology(\"http://PYM/\").load()\n >>> ICD10 = PYM[\"ICD10\"]\n >>> SNOMEDCT_US = PYM[\"SNOMEDCT_US\"]\n \n >>> SNOMEDCT_US[186675001]\n SNOMEDCT_US[\"186675001\"] # Viral pharyngoconjunctivitis\n \n >>> SNOMEDCT_US[186675001] >> ICD10 # Map to ICD10\n Concepts([\n ICD10[\"B30.9\"] # Viral conjunctivitis, unspecified\n ])\n \nFor more documentation, look at the doc/ directories in the source.\n\nChangelog\n---------\n\nversion 1 - 0.2\n***************\n\n* Fix sync_reasonner and Hermit call under windows (thanks Clare Grasso)\n\nversion 1 - 0.3\n***************\n\n* Add warnings\n* Accepts ontologies files that do not ends with '.owl'\n* Fix a bug when loading ontologies including concept without a '#' in their IRI\n\nversion 2 - 0.1\n***************\n\n* Full rewrite, including an optimized quadstore\n\nversion 2 - 0.2\n***************\n\n* Implement RDFXML parser and generator in Python (no longer use rapper or rdflib)\n* Property chain support\n* Add ntriples_diff.py utility\n* Bugfixes:\n - Fix breaklines in literal when exporting to NTriples\n\nversion 2 - 0.3\n***************\n\n* Add destroy_entity() global function\n* Greatly improve performance for individual creation\n* When searching, allow to use \"*\" as a jocker for any object\n* Bugfixes:\n - Fix nested intersections and unions\n - Fix boolean\n - Fix bug when removing parent properties\n - Fix parsing of rdf:ID\n - Fix multiple loading of the same ontology whose IRI is modified by OWL file, using an ontology alias table\n - Fix ClassConstruct.subclasses()\n - Check for properties with multiple incompatible classes (e.g. ObjectProperty and Annotation Property)\n\nversion 2 - 0.4\n***************\n\n* Add methods for querying the properties defined for a given individuals, the inverse properties\n and the relation instances (.get_properties(), .get_inverse_properties() and .get_relations())\n* Add .indirect() method to obtain indirect relations (considering subproperties, transivitity,\n symmetry and reflexibity)\n* search() now takes into account inheritance and inverse properties\n* search() now accepts 'None' for searching for entities without a given relation\n* Optimize ontology loading by recreating SQL index from scratch\n* Optimize SQL query for transitive quadstore queries, using RECURSIVE Sqlite3 statements\n* Optimize SQL query for obtaining the number of RDF triples (ie len(default_world.graph))\n* Add Artificial Intelligence In Medicine scientific article in doc and Readme \n* Bugfixes:\n - Fix properties loading when reusing an ontology from a disk-stored quadstore\n - Fix _inherited_property_value_restrictions() when complement (Not) is involved\n - Fix restrictions with cardinality\n - Fix doc on AllDisjoint / AllDifferent\n\nversion 2 - 0.5\n***************\n\n* Add individual/instance editor (require EditObj3, still largely untested)\n* Add support for hasSelf restriction\n* Optimize XML parsers\n* Check for cyclic subclass of/subproperty of, and show warning\n* PyPy 3 support (devel version of PyPy 3)\n* Bugfixes:\n - Fix search() for '*' value on properties with inverse\n - Fix individual.annotation = \"...\" and property.annotation = \"...\"\n - Fix PlainLiteral annotation with no language specified\n - Fix doc for Creating classes dynamically\n - Fix loading ontologies with python_name annotations\n - Fix _inherited_property_value_restrictions when multiple is-a / equivalent-to are present\n - Align Python floats with xsd:double rather than xsd:decimal\n - Rename module 'property' as 'prop', to avoid name clash with Python's 'property()' type\n\nversion 2 - 0.6\n***************\n\n* Add set_datatype_iri() global function for associating a Python datatype to an IRI\n* Add nquads ontology format (useful for debugging)\n* Add support for dir() on individuals\n* Add support for ontology using https: protocol (thanks Samourkasidis Argyrios)\n* Add observe module (for registering callback when the ontology is modified)\n* Improve docs\n* Bugfixes:\n - Align Python floats with xsd:decimal rather than xsd:double, finally, because decimal accepts int too\n - Fix Class.instances() so as it returns instances of subclasses (as indicated in the doc)\n - Fix direct assignation to Ontology.imported_ontologies\n - Fix a bug in reasoning, when adding deduced facts between one loaded and one non-loaded entity\n\nversion 2 - 0.7\n***************\n\n* Bugfixes:\n - Restore HermiT compiled with older Java compilator (higher compatibility)\n \nversion 2 - 0.8\n***************\n\n* Bugfixes:\n - REALLY restore HermiT compiled with older Java compilator (higher compatibility)\n - Fix search(prop = \"value\") when value is a string and the ontology uses localized string\n \nversion 2 - 0.9\n***************\n\n* PostgresQL backend (in addition to SQLite3)\n* Add 'exclusive = False' option for SQLite3 backend (slower, but allows multiple uses)\n* Use unique index in sqlite3 quadstore on resources table\n* Optimize sqlite3 quadstore by caching IRI dict (5% faster)\n* Add == support for class construct\n* Add get_namespace() support on World\n* Add 'existential restrictions as class properties' feature\n* Bugfixes:\n - Fix imported ontologies\n - Fix saving ontologies in onto_path\n - Fix clear() on CallbackList\n - Fix bug in Class IRI in ontologies whose base IRI ends with a /\n - Fix imported ontologies in ontologies whose base IRI ends with a /\n \nversion 2 - 0.10\n****************\n\n* Add Ontology.metadata for adding/querying ontology metadata\n* Allows multiple individual creations with the same name/IRI, now returning the same individuals\n* Add OwlReadyInconsistentOntologyError and Word.inconsistent_classes()\n* Implement RDF/XML and OWL/XML parsing in Cython (25% speed boost for parsing)\n* Small optimization\n* Extend individual.prop.indirect() to include relations asserted at the class level\n* Add .query_owlready() method to RDF graph \n* Bugfixes:\n - Fix reasoning when obtaining classes equivalent to nothing\n - Fix World creation with backend parameters\n - Fix error when adding property at the class definition level\n - Fix loading of ontology files with no extension from onto_path\n - Fix properties defined with type 'RDF Property' and subproperty of 'OWL Data/Object/Annotation Property'\n - Support old SQLite3 versions that do not accept WITHOUT ROWID\n - Fix reference to undeclared entities (they were replaced by None, now by their IRI)\n - Fix loading and saving ontologies whose base IRI ends with /\n - Fix RDF query using string\n \nversion 2 - 0.11\n****************\n\n* Optimized Full-Text Search\n* Support Pellet reasoner in addition to HermiT\n* Support loading of huge OWL files (incremental load)\n* Use Class.property.indirect() for indirect Class property (instead of Class.property)\n* Add reload and reload_if_newer parameters to Ontology.load()\n* search() is now much faster on properties that have inverse\n* Add shortcut for SOME ConstrainedDatatype: e.g. age >= 65\n* Bugfixes:\n - Fix creation of an individual that already exists in the quadstore\n - Fix missing import of EntityClass in class_construct.py\n - Fix World.save() with RDF/XML format\n - Fix Thing.subclasses() and Thing.descendants()\n - Fix ontology's update time for ontologies created de novo in Python with Owlready\n - Fix reasoning when asserting new parents with equivalent classes\n \nversion 2 - 0.12\n****************\n\n* New quadstore\n* Numerical search (NumS, e.g. all patients with age > 65)\n* Nested searches\n* Synchronization for multithreading support\n* Add Class.inverse_restrictions() and Class.direct_instances()\n* Drop PostgresQL support (little interest: more complex and slower than Sqlite3)\n* Bugfixes:\n - Fix call to _get_by_storid2\n - Fix rdfs_subclassof in doc\n - Fix FTS triggers\n - Fix boolean in RDFlib / SPARQL\n - Fix bug when destroying an AnnotationProperty\n\nversion 2 - 0.13\n****************\n\n* Bugfixes:\n - Fix performance regression due to suboptimal index in the quadstore\n - Fix messing up with IRI ending with a /\n - Fix error in World cloning\n - Fix the addition of Thing in class's parent when redefining a class with Thing as the only parent\n - Fix inverse_resctriction()\n - Add error message when creating an existent quadstore\n\nversion 2 - 0.14\n****************\n\n* UMLS support (owlready2.pymedtermino2 package)\n* Can infer object property values when reasoning (thanks W Zimmer)\n* New implementation of property values; use INDIRECT_prop to get indirect values\n* Support several class property types : some, only, some + only, and direct relation\n* Automatically create defined classes via class properties\n* Support anonymous individuals, e.g. Thing(0)\n* Optimize search() when only the number of returned elements is used\n* Optimize FTS search() when using also non-FTS statements\n* Can restrict reasoning to a list of ontologies\n* Union searches (i.e. default_world.search(...) | default_world.search(...))\n* Bugfixes:\n - Fix functional class properties with inheritance\n - Fix dupplicated instance list restrictions when calling close_world(ontology)\n - Fix use of '*' in search\n - Fix synchronization, using contextvars for global variables\n\nversion 2 - 0.15\n****************\n\n* Can infer data property values when reasoning with Pellet\n* Optimize searches with 'type =', 'subclass_of =', or 'is_a =' parameters\n* Add Property.range_iri\n* Add _case_sensitive parameter to search()\n* Add inverse property support in RDFlib support\n* Show Java error message when reasoners crash\n* Bugfixes:\n - Consider inverse property in get_properties()\n - Fix parsing bug in reasoning with HermiT and infer_property_values = True\n - Namespace prefix support in RDFlib binding\n - Fix dupplicates values when a relation involving a property with inverse is asserted in both directions\n - Better workaround in case of metaclass conflict\n - Fix 'sqlite3.OperationalError: too many SQL variables' in searches with 'type =', 'subclass_of =', or 'is_a =' parameters\n \nversion 2 - 0.16\n****************\n\n* Optimize nested searches\n* search(sublclass_of = xxx) now returns xxx itself in the results\n* Support \"with long_ontology_name as onto\" syntax\n* In UMLS import, add optional parameters for preventing extraction of attributes, relations, etc\n* Support SPARQL INSERT queries\n* Optimize Pymedtermino mapping\n* Doc for PyMedTermino2\n* Bugfixes:\n - Fix 'Cannot release un-acquired lock' error when reasoning on inconsistent ontologies inside a 'with' statement\n - Fix bug when loading a property that refers to another property from a quadstore stored on disk\n - Fix RDF triple suppression with RDFlib when object is a datatype\n\nversion 2 - 0.17\n****************\n\n* SWRL rule support\n* Allows importing UMLS suppressed terms\n* Uncache entities when relaoding an ontology\n* Bugfixes:\n - Fix PyMedTermino2 installation\n - Fix data property value inferrence with debug = 1\n - Fix sort() in LazyList (thanks fiveop!)\n - Fix World.get() and add World.get_if_loaded()\n - Add appropriate error message when importing UMLS with Python 3.6\n - Fix individuals belonging to multiple, equivalent, classes after reasoning\n \nversion 2 - 0.18\n****************\n\n* Add UNIQUE constraints for preventing dupplicated RDF triples in the quadstore\n* Add Individual.INDIRECT_is_a / Individual.INDIRECT_is_instance_of\n* Add isinstance_python() (faster than isinstance(), but do not consider equivalent_to relations)\n* Bugfixes:\n - Force UTF-8 encoding when importing UMLS\n - Be more tolerant when loading OWL file\n \nversion 2 - 0.19\n****************\n\n* Consider symmetric properties as their own inverse properties\n* Update Python objects after basic SPARQL update/delete queries (works on user-defined properties, hierarchical properties (type/subclassof) and equivalence properties)\n* Add individual.INVERSE_property\n* Add Class.INDIRECT_is_a\n* INDIRECT_is_a / INDIRECT_is_instance_of now include class contructs. ancestors() has a 'include_constructs' parameter, which defaults to False.\n* Add more aliases for XMLSchema datatypes\n* Add is_a property to class constructs\n* Add bottomObjectProperty and bottomDataProperty\n* Support ReflexiveProperties in individual.INDIRECT_property\n* Optimize Thing.subclasses()\n* Optimize search() with multiple criteria, including those done by PyMedTermino\n* Add support for destroy_entity(SWRL_rule)\n* Add support for UMLS \"metathesaurus\" format in addition to \"full\" format\n* Bugfixes:\n - After reasoning, keep all equivalent classes as parents of individuals (as they may have methods)\n - Fix IndividualPropertyAtom when creating SWRL rule\n - Fix SWRL parser\n - Fix RDF serialization for nested RDF lists\n - Fix removing inverse property (i.e. Prop.inverse = None)\n - Fix datetime parsing for date with time zone or milliseconds\n \nversion 2 - 0.20\n****************\n\n* Add support for undoable destroy_entity()\n* Small database optimizations\n* No longer treat properties associated with exactly-1 or max-1 restriction as functional properties,\n returning single values instead of a list (you can restore the previous behaviour as follows:\n import owlready2.prop; owlready2.prop.RESTRICTIONS_AS_FUNCTIONAL_PROPERTIES = True)\n* Bugfixes:\n - Fix performance bug on UMLS mapping in PyMedTermino\n\nversion 2 - 0.21\n****************\n\n* Use Pellet 2.3.1 (same version as Prot\u00e9g\u00e9) instead of 2.4 (which has a bug in SWRL for many builtin predicates including equals and matches)\n* Much faster mangement of annotations on relations\n* Bugfixes:\n - Fix bug on blank node in RDFlib/SPARQL support\n - Fix bug on blank node deletion in RDFlib/SPARQL support\n - Fix data loss in Restriction modification\n - Fix 'no query solution' error in search()\n - Fix literal support in RDF lists, causing \"TypeError: '<' not supported between instances of 'NoneType' and 'int'\" when saving ontologies\n - Fix DifferentFrom SWRL builtin\n - Fix string parsing in SWRL rules\n - Fix string and boolean literal representation (str/repr) in SWRL rules\n - Fix the inverse of subproperties having a symmetric superproperty\n\nversion 2 - 0.22\n****************\n\n* Add support for disjoint unions (Class.disjoint_unions)\n* Add deepcopy support on class constructs, and automatically deep-copy constructs when needed (i.e. no more OwlReadySharedBlankNodeError)\n* Support the creation of blank nodes with RDFlib\n\nversion 2 - 0.23\n****************\n\n* Add get_parents_of(), get_instances_of(), get_children_of() methods to ontology, for querying the hierarchical relations defined in a given ontology\n* Use Thing as default value for restrictions with number, instead of None\n* Add 'filter' parameter to save(), for filtering the entities saved (contributed by Javier de la Rosa)\n* Bugfixes:\n - Fix value restriction with the false value \n - Fix blank node loading from different ontologies\n - Fix constructs reused by several classes\n - Fix 'Class.is_a = []' was not turning the list into an Owlready list\n - Fix destroy_entity() - was not destroying the IRI of the entity\n - Improve setup.py: ignore Cython if Cython installation fails\n\nversion 2 - 0.24\n****************\n\n* Support intersection of searches (e.g. World.search(...) & World.search(...))\n* Add owlready2.reasoning.JAVA_MEMORY\n* Move development repository to Git\n* Bugfixes:\n - Fix parsing of NTriples files that do not end with a new line\n - Fix KeyError with Prop.python_name when several properties share the same name\n - Fix get_ontology() calls in Python module imported by ontologies in a World that is not default_world\n - Fix use of PyMedTermino2 in a World that is not default_world\n - Fix World.as_rdflib_graph().get_context(onto) for ontology added after the creation of the RDFLIB graph\n - Fix destroying SWRL rules\n - Fix disjoint with non-atomic classes\n \nversion 2 - 0.25\n****************\n\n* Allow the declaration of custom datatypes with declare_datatype()\n* Support the annotation of annotations (e.g. a comment on a comment)\n* search() now support the \"subproperty_of\" argument\n* search() now support the \"bm25\" argument (for full-text searches)\n* Bugfixes:\n - Fix Concept.descendant_concepts() in PymedTermino2\n - Update already loaded properties when new ontologies are loaded\n - Now accept %xx quoted characters in file:// URL\n - Improve error message on punned entities\n - Property.get_relations() now considers inverse properties\n - Fix \"AttributeError: 'mappingproxy' object has no attribute 'pop'\" error\n - Fix Thing.instances()\n \nversion 2 - 0.26\n****************\n\n* Module owlready2.dl_render allows rendering entities to Description Logics (contributed by Simon Bin)\n* Bugfixes:\n - Adjustment in the comparison of strings from SameAs and DiferrentFrom, allowing equal comparison regardless of the case-sensitive (contributed by Thiago Feij\u00f3)\n - Fix transitive equivalent_to relations between classes and OWL constructs\n - Fix AnnotationProperty[entity] where entity is a predefined OWL entity (e.g. comment or Thing)\n - Fix entity.AnnotationProperty where entity is a predefined OWL entity (e.g. comment or Thing)\n - Fix HermiT when reasoning on several ontologies with imports statement\n - Ignore \"A type A\", with a warning\n \nversion 2 - 0.27\n****************\n\n* When Pellet is called with debug >= 2 on an inconsistent ontology, Pellet explain output is displayed (contributed by Carsten Knoll)\n* Update doc theme (contributed by Carsten Knoll)\n* Adapt setup.py to allow 'python setup.py develop' and 'pip install -e .' (contributed by Carsten Knoll)\n* Add 'url' argument to Ontology.load() method\n* Add 'read_only' argument to World.set_backend() method\n* Bugfixes:\n - Fix XML/RDF file parsing/writing for entity having ':' in their name\n - Fix destroy_entity(), was leaking some RDF triples when class contructs or equivalent_to were involved\n - Fix 'Class1(entityname); Class2(entityname)' (was changing the individual namespace)\n - Fix annotation request on RDF annotation properties, e.g. label.label\n\nversion 2 - 0.28\n****************\n\n* Bugfixes:\n - Fix installation under Windows (contributed by CVK)\n - Under Windows, run the reasoners without opening a DOS windows\n\nversion 2 - 0.29\n****************\n\n* Bugfixes:\n - Fix installation as a requirement of another Python module\n\nversion 2 - 0.30\n****************\n\n* New native SPARQL engine that translates SPARQL queries to SQL\n* Direct support for Dublin Core via the integration of an OWL translation\n* Bugfixes:\n - Fix RecursionError when saving very deep ontologies to RDF/XML\n - Fix IRI of the form 'urn:uuid:...'\n - Fix loading ontologies that modify an imported property\n\nversion 2 - 0.31\n****************\n\n* Can open SPARQL endpoints (see module owlready2.sparql.endpoint and doc)\n* Support ClaML file format in PyMedTermino2 for French ICD10\n* Bugfixes:\n - Fix prefix in SPARQL that does not correspond to an existing ontology\n - Fix ! in SPARQL FILTER\n - Fix Thing.subclasses() so as it now returns classes that have parent constructs but no parent named classes\n - Fix metaclass of FusionClass when creating individuals belonging to several classes, including one from PyMedTermino\n - Fix Prop[individual] for functional properties with no relation for the given individual\n\nversion 2 - 0.32\n****************\n\n* Add scripts to import OMOP-CDM as an ontology (see directory pymedtermino2/omop_cdm/)\n* SPARQL engine optimization\n* Bugfixes:\n - Fix name clash when creating individuals from classes whose names end with a number, e.g. \"c1\" + \"1\" vs \"c\" + \"11\"\n - Fix block with only a FILTER in SPARQL\n\nversion 2 - 0.33\n****************\n\n* Bugfixes:\n - Fix 'sqlite3.OperationalError: no such table: sqlite_schema' with SQLite3 < 0.33\n\nversion 2 - 0.34\n****************\n\n* NEW FORUM ADDRESS: http://owlready.306.s1.nabble.com\n* Support SPARQL property path expressions with parentheses without sequences, repeats or negative property set nested inside repeats\n* Add define_datatype_in_ontology() global function for defining a new user-defined datatype in an ontology\n* Class.instances() now takes into account equivalent classes (like other class methods such as .descendants())\n* Add the LOADED(iri) SPARQL function\n* Support Thing.is_a.append(...)\n* Faster loading of very large quadstores\n* list(onto.metadata) now lists the annotations present on the ontology\n* Add OntologyClass and NamespaceClass argument to get_ontology() and get_namespace(), allowing the use of custom classes\n* Bugfixes:\n - Accept UTF8 and latin encoding from reasoners (thanks Francesco Compagno)\n - Fix SPARQL query with a UNION without variables\n - Fix semantic type support in UMLS\n\nversion 2 - 0.35\n****************\n\n* SPARQL optimizations\n* Support for VALUES in SPARQL\n* Add STATIC optimization keyword extension to SPARQL\n* Accept GROUP BY, HAVING, LIMIT in INSERT and DELETE SPARQL query\n* Add the STORID(iri), DATE(), TIME() and DATETIME() SPARQL function\n* UMLS CUI are now hierarchized by Semnatic Types (TUI)\n* Improved parallelism\n* Bugfixes:\n - Fix 'sqlite3.OperationalError: circular reference: prelim1_objs' in .instances(), caused by a bug in old versions of SQLite3\n - Fix SPARQL INSERT query with data parameters in the INSERT clause\n - Fix RDF list parsing when the list includes the integer number 5\n - Fix nb_parameter in SPARQL query when numbered parameters are used\n - Fix ObjectProperty.subclasses(), ObjectProperty.descendants(), Property.subclasses(), DataProperty.descendants(), AnnotationProperty.subclasses(), AnnotationProperty.descendants()\n - Fix declare_datatype() for datatype already used in Owlready, such as AnyURI\n - Fix Pellet on properties having annotations that are not declared in the loaded ontologies\n\nversion 2 - 0.36\n****************\n\n* Support xsd:duration, including DATETIME_DIFF(), DATETIME_ADD(), DATETIME_SUB() SPARQL non-standard functions\n* Faster ontology operation (e.g. ontology deletion) on big quadstores\n* Automatically add .owl, .rdf or .xml to ontology IRI if the IRI itself does not yield an OWL file\n* Bugfixes:\n - Fix FusionClasses (= individuals belonging to several classes, i.e. multiple instanciation) when using several worlds\n - Fix OPTIONAL SPARQL clause when guessing variable types\n - Fix typo in undo entity destruction (thanks Lukas Westhofen)\n - Fix IRI from OWL namespace in SWRL rules\n - Fix Pellet explanation on inconsistent ontology\n - Fix MEDDRA parent-child relation of LLT in PyMedTermino2\n - Make sure the filename is a file before returning (Thanks Nicolas Rouquette)\n \nversion 2 - 0.37\n****************\n\n* Add World.forget_reference(entity)\n* Add NamedIndividual (for SPARQL results on rdf:type)\n* Add 'update_relation' optional args to Ontology.destroy()\n* Add Ontology.set_base_iri() and Ontology.base_iri = \"new_base_iri\"\n* Bugfixes:\n - Fix SPARQL queries having a UNION but using no variable from the UNION\n - Fix SPARQL queries on read only quadstores\n - Fix SPARQL queries mixing OPTIONAL and VALUES / STATIC \n - Fix property defined as a subproperty of TransitiveProperty (and the like), but not of type ObjectProperty\n - Fix importlib.reload(owlready2)\n - Fix RDF/XML serialization of individuals whose class name start by a digit\n - Fix RDF/XML serialization when ontology base IRI ends with /\n - Fix Or.Classes = ... and And.Classes = ...\n - Fix ONLY class properties with more than two values\n\nversion 2 - 0.38\n****************\n\n* Accepts localized language codes, such as fr_FR or fr_BE, and wildcard fr_any\n* Add 'update_is_a' optional args to Ontology.destroy()\n* Bugfixes:\n - Fix individual.INVERSE_prop update when prop is functional\n - Fix performance regression on complex SPARQL queries with OPTIONAL\n - Fix declare_datatype after a World has been closed\n - Fix Pellet reasoning on blank nodes (ignoring them)\n - Fix Pellet reasoning on strings data property that include comma \",\"\n - Fix boolean constant 'true' and 'false' in SPARQL engine\n - Fix INSERT SPARQL queries with UNION that insert RDF triples without variables\n - Fix SPARQL queries with only a FILTER NOT EXISTS in the WHERE part\n - Accept empty lines at the beginning of NTriple files\n - Support non-ASCII characters when parsing SWRL rules\n\nversion 2 - 0.39\n****************\n\n* Make RDF triple deletion non-ontology-specific\n* Faster creation of individual with property value (e.g. MyClass(prop = [value]))\n* Bugfixes:\n - Fix entity.prop.remove(x) and entity.prop = x when existing values are defined in another ontology than the entity\n - Fix inverse property update when referenced entity is destroyed (thanks Franzlst)\n - Prevent reasoners from reparenting OWL base entities such as Thing\n - Fix the reloading of an ontology that has been destroyed, when a local filename is provided as the ontology base IRI\n - Fix destroying object property involved in a property chain\n - Fix reloading of ontologies when the IRI of the ontology was a local filename\n - Fix SELECT * in SPARQL coumpound queries\n - Fix Class.get_class_properties() when some properties are defined as restriction on an Inverse property\n - Fix for RDFlib 0.6.2 (supports bind() override optional argument)\n \nversion 2 - 0.40\n****************\n\n* General class axiom support\n* Update Log4J in Pellet for security purpose\n* Add get_lang_first() for annotations.\n* Bugfixes:\n - Add trailing / to ontology URL if missing\n - Fix Individual.is_a when loading ontologies with individuals belonging to two classes, one being the descendant of the other\n - Fix datetime to make them XSD-compatible (thanks Lukas M\u00fcller)\n - Ensure that Things are properly initialized so that the __init__ method can be safely overwritten (thanks Lukas M\u00fcller)\n - Fix destroy_entity()\n\nversion 2 - 0.41\n****************\n\n* Parallelized huge OWL file parsing (about 25% faster on GO)\n* Parallelized SPARQL queries (see owlready2.sparql.execute_many() and execute(spawn = True))\n* Bugfixes:\n - Fix Class.INDIRECT_get_class_properties() with restriction on Inverse(Prop)\n - Fix Restriction of type HasSelf\n - Fix delattr in destroy_entity()\n - Fix blank nodes importation from RDFlib\n - Fix ', + and - in FTS search\n\nversion 2 - 0.42\n****************\n\n* INCOMPATIBLE CHANGE: Consider literal with different language as different (e.g. locstr(\"Test\", \"en\") != locstr(\"Test\", \"fr\"))\n* Support GRAPH clauses in SPARQL queries\n* World now supports custom lock (e.g. World(lock = ...))\n* Bugfixes:\n - Fix World(enable_thread_parallelism = True) (was named enable_gevent)\n - Fix blank nodes in rdflib_store\n - Fix FILTER in SPARQL when the filter was just after a recursive query\n - Fix recursive query in SPARQL involving variables in their right part\n - Fix SPARQL query with annotations containing entities\n - Fix property creation when using a Union in the '>>' syntax (e.g. class Prop((MyClass | MyOtherClass) >> str): pass)\n - Fix UMLS extraction in PyMedTermino2\n - Fix Class IRI with brackets (or other special characters) when writing RDF/XML file\n \n \nLinks\n-----\n\nOwlready2 on BitBucket (Git development repository): https://bitbucket.org/jibalamy/owlready2\n\nOwlready2 on PyPI (Python Package Index, stable release): https://pypi.python.org/pypi/Owlready2\n\nDocumentation: http://owlready2.readthedocs.io/\n\nForum/Mailing list: http://owlready.306.s1.nabble.com\n\n\nContact \"Jiba\" Jean-Baptiste Lamy:\n\n::\n\n <jean-baptiste.lamy *@* univ-paris13 *.* fr>\n LIMICS\n INSERM, Universit\u00e9 Sorbonne Paris Nord, Sorbonne Universit\u00e9\n Bureau 149\n 74 rue Marcel Cachin\n 93017 BOBIGNY\n FRANCE\n",
"bugtrack_url": null,
"license": "LGPLv3+",
"summary": "A package for ontology-oriented programming in Python: load OWL 2.0 ontologies as Python objects, modify them, save them, and perform reasoning via HermiT. Includes an optimized RDF quadstore.",
"version": "0.42",
"project_urls": {
"Homepage": "https://bitbucket.org/jibalamy/owlready2"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fc7d63421107ca637824645b2058337238cf18238b788e1c3165535a6a303359",
"md5": "a05cdfb1d289544f70aaba7b64f8fe20",
"sha256": "08e3d8d7385142fb65dc57962a90fc1d1806e09b1a7302ef1b36588f46fb7eb5"
},
"downloads": -1,
"filename": "Owlready2-0.42.tar.gz",
"has_sig": false,
"md5_digest": "a05cdfb1d289544f70aaba7b64f8fe20",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 27418825,
"upload_time": "2023-06-01T08:37:32",
"upload_time_iso_8601": "2023-06-01T08:37:32.856433Z",
"url": "https://files.pythonhosted.org/packages/fc/7d/63421107ca637824645b2058337238cf18238b788e1c3165535a6a303359/Owlready2-0.42.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-01 08:37:32",
"github": false,
"gitlab": false,
"bitbucket": true,
"codeberg": false,
"bitbucket_user": "jibalamy",
"bitbucket_project": "owlready2",
"lcname": "owlready2"
}