---
jupytext:
  cell_metadata_filter: -all
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
    format_version: 0.13
    jupytext_version: 1.14.1
kernelspec:
  display_name: Python 3 (ipykernel)
  language: python
  name: python3
---

# Gewässer 2023

Diese Seite: Ausführlichere Erklärung zum [Gewässer-Beispiel](http://jbusse.de/akwi2023/semantik-gewaesser-beispiel.html) aus dem Aufsatz <http://jbusse.de/akwi2023>.

![](../../images/Gewaesser_2023_DE_akwi2023.png)

```{code-cell} ipython3
import sys
sys.path.append('../py/')
from gd06 import GenDifS_Map

mindmap = "Gewässer_2023_DE"  # filename without .mm extension 
```

## SKOS

```{code-cell} ipython3
o = GenDifS_Map(f"../mm/{mindmap}.mm", 
                pattern = [ "skos" ],
                verbose = 1)
o.compile()
```

```{code-cell} ipython3
#update_mindmap_filename = f"../mm/{mindmap}.mm"
#o.mindmap.write(update_mindmap_filename,pretty_print=True)
#print(f"updated mindmap {update_mindmap_filename}")
```

```{code-cell} ipython3
len(o.rdflib_graph.serialize(destination=f"../ttl/{mindmap}_skos.ttl"))
```

Download SKOS: {download}`../ttl/Gewässer_2023_DE_skos.ttl`

```{code-cell} ipython3
print(o.ttl_code)
```

## OWL

```{code-cell} ipython3
o = GenDifS_Map(f"../mm/{mindmap}.mm", 
                pattern = [ 'owl'],
                verbose = 1)
o.compile()
len(o.rdflib_graph.serialize(destination=f"../ttl/{mindmap}_owl.ttl"))
```

Download OWL: {download}`../ttl/Gewässer_2023_DE_owl.ttl`

```{code-cell} ipython3
print(o.ttl_code)
```

## OWL Classify

```{code-cell} ipython3
o = GenDifS_Map(f"../mm/{mindmap}.mm", 
                pattern = [ "owl", "owl-classify", "docu" ], 
                # use_rdflib = False, # default: true
                # remove_attributes= False, # default: true
                verbose = 1)
o.compile()
```

```{code-cell} ipython3
len(o.rdflib_graph.serialize(destination=f"../ttl/{mindmap}_owl-classify.ttl"))
```

Download OWL: {download}`../ttl/Gewässer_2023_DE_owl-classify.ttl`

```{code-cell} ipython3
print(o.ttl_code)
```

```{code-cell} ipython3

```

```{code-cell} ipython3

```

```{code-cell} ipython3

```
