From d67a44346ddb95d993b799a472001bcf6a1a5490 Mon Sep 17 00:00:00 2001 From: Caglar Demir Date: Mon, 25 Mar 2024 13:36:27 +0100 Subject: [PATCH] version is incremeant --- .idea/jupyter-settings.xml | 16 ++++++++++++++++ README.md | 35 ++++++++++++++++++----------------- owlapy/__init__.py | 10 +--------- setup.py | 2 +- 4 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 .idea/jupyter-settings.xml diff --git a/.idea/jupyter-settings.xml b/.idea/jupyter-settings.xml new file mode 100644 index 00000000..29de95db --- /dev/null +++ b/.idea/jupyter-settings.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index b0f4fa57..b13711f9 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ -# owlapy -**Owlapy is loosely based on _owlapi_ - the java counterpart, successfully representing the main -owl objects in python.** - -Other than that, Owlapy also offers some extra functionalities: -- `Owl2SparqlConverter` to convert owl class expressions to SPARQL syntax. -- `DLSyntaxObjectRenderer` to render owl objects to description logics. -- `ManchesterOWLSyntaxParser` to parse strings of manchester syntax to owl class expression. - -For more, you can check the [API documentation](https://ontolearn-docs-dice-group.netlify.app/autoapi/owlapy/#module-owlapy). +# OWLpy: OWL in Python ## Installation +
Click me! -```shell -pip install owlapy +### Installation from Source +``` bash +git clone https://github.com/dice-group/owlapy +conda create -n temp_owlapy python=3.10.13 --no-default-packages && conda activate temp_owlapy && pip3 install -e . +``` +or +```bash +pip3 install owlapy ``` +
+ + ## Usage @@ -43,13 +44,13 @@ teacher = OWLClass(IRI.create('http://example.com/society#teacher')) male_teachers_with_children = OWLObjectIntersectionOf([males_with_children, teacher]) # You can render and print owl class expressions in description logics syntax -print(DLSyntaxObjectRenderer().render(male_teachers_with_children)) +print(DLSyntaxObjectRenderer().render(male_teachers_with_children)) +# (∃ hasChild.male) ⊓ teacher +print(Owl2SparqlConverter().as_query("?x", male_teachers_with_children)) +# SELECT DISTINCT ?x WHERE { ?x ?s_1 . ?s_1 a . ?x a . } } ``` -The following will be printed: +For more, you can check the [API documentation](https://ontolearn-docs-dice-group.netlify.app/autoapi/owlapy/#module-owlapy). -```commandline -(∃ hasChild.male) ⊓ teacher -``` Every OWL object that can be used to classify individuals, is considered a class expression and inherits from [OWLClassExpression](https://ontolearn-docs-dice-group.netlify.app/autoapi/owlapy/model/#owlapy.model.OWLClassExpression) diff --git a/owlapy/__init__.py b/owlapy/__init__.py index 5a5fd5aa..10939f01 100644 --- a/owlapy/__init__.py +++ b/owlapy/__init__.py @@ -1,9 +1 @@ -"""OWLAPY - loosely based on OWL API. - -Many help texts copied from OWL API [1] -OWLAPI licence: LGPL and Apache - -[1] https://github.com/owlcs/owlapi -""" - -# the import order must be fixed otherwise there are circular import errors +__version__ = '0.1.2' diff --git a/setup.py b/setup.py index 84e56b2a..690a4b7d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ name="owlapy", description="Owlapy is loosely based on owlapi - the java counterpart, " "successfully representing the main owl objects in python.", - version="0.1.1", + version="0.1.2", packages=find_packages(), install_requires=[ "pandas>=1.5.0",