Skip to content

Commit

Permalink
version is incremeant
Browse files Browse the repository at this point in the history
  • Loading branch information
Demirrr committed Mar 25, 2024
1 parent d854879 commit d67a443
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 27 deletions.
16 changes: 16 additions & 0 deletions .idea/jupyter-settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
<details><summary> Click me! </summary>

```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
```
</details>



## Usage

Expand Down Expand Up @@ -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 <http://example.com/society#hasChild> ?s_1 . ?s_1 a <http://example.com/society#male> . ?x a <http://example.com/society#teacher> . } }
```
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)
Expand Down
10 changes: 1 addition & 9 deletions owlapy/__init__.py
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d67a443

Please sign in to comment.