User Guide — CEMENTO 0.8.4 documentation

Skip to main content
`Ctrl`+`K`

# User Guide

## Installation

To use CEMENTO, first install it with pip:

    (.venv) $ pip install cemento

Ideally, you can create a python environment where CEMENTO will reside. This command will automatically install CEMENTO dependencies.

## Scripting

### Converting draw.io to ttl

cemento.rdf.drawio_to_turtle.convert_drawio_to_ttl(input_path: str | Path, output_path: str | Path, onto_ref_folder: str | Path, defaults_folder: str | Path, prefixes_path: str | Path, log_substitution_path: str | Path = None) → None

  Convert an input draw.io diagram file of an ontology into RDF triples in the turtle format.

  Parameters:

    - input_path (str | Path) – The path to the draw.io file input.

    - output_path (str | Path) – The desired file path for saving the RDF triples in the turtle format.

    - onto_ref_folder (str | Path) – The path to the folder containing the reference ontologies.

    - defaults_folder (str | Path) – The path to the folder containing the turtle files of the default namespaces.

    - prefixes_path (str | Path) – The path to the json file containing prefixes.

    - log_substitution_path (str | Path, optional) – The path to a csv file containing substitution results from term matching. Defaults to None.

  Returns:

    None

cemento.rdf.turtle_to_drawio.convert_ttl_to_drawio(input_path: str | Path, output_path: str | Path, horizontal_tree: bool = False, classes_only: bool = False, onto_ref_folder: str | Path = None, defaults_folder: str | Path = None, prefixes_path: str | Path = None, set_unique_literals: bool = True) → None

  Convert RDF triples in the turtle format as an ontology diagram in a draw.io file.

  Parameters:

    - input_path (str | Path) – The path to the turtle input file.

    - output_path (str | Path) – The desired file path for saving an ontology diagram as a draw.io file.

    - horizontal_tree (bool, optional) – Whether to make the tree horizontal or stay with the default vertical layout. Defaults to False.

    - classes_only (bool, optional) – Whether to just display classes and instances (taxonomy tree). Defaults to False.

    - onto_ref_folder (str | Path, optional) – The path to the folder containing the reference ontologies. Defaults to None.

    - defaults_folder (str | Path, optional) – The path to the folder containing the turtle files of the default namespaces. Defaults to None.

    - prefixes_path (str | Path, optional) – The path to the json file containing prefixes. Defaults to None.

    - log_substitution_path (str | Path, optional) – The path to a csv file containing substitution results from term matching. Defaults to None.

  Returns:

    None

In this page add: - how to install with a conda environment - installation prerequisites (Python version etc.) - how to download the source code - instructions on CLI with details at the same degree as README - instructions on scripting directly taken from README - information about the files in README (adding references, changing defaults) - information about flags, considerations when making diagrams - drawing guide with interactive image visual