Metadata-Version: 2.4
Name: oquarekg
Version: 0.1.1
Summary: OQuaRE-KG is a quality evaluation framework for assessing knowledge graphs, based on OQuaRE
Author-email: Belen Juanes Cortes <belen.juanesc@um.es>
License-Expression: MIT
Project-URL: Homepage, https://github.com/tecnomod-um/oquare-kg/tree/main/oquarekg_package
Project-URL: Repository, https://github.com/tecnomod-um/oquare-kg
Keywords: knowledge-graph,rdf,semantic-web,quality-assessment
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rdflib
Requires-Dist: pandas
Requires-Dist: requests
Dynamic: license-file

# OQuaRE-KG

OQuaRE-KG is a quality evaluation framework for assessing knowledge graphs based on OQuaRE.

## Installation

From PyPi

```bash
pip install oquarekg
```

From PyPi (specifying version)

```bash
pip install oquarekg==0.1.1
```

From GitHub

```bash
pip install git+https://github.com/tecnomod-um/oquare-kg.git#subdirectory=oquarekg_package
```

# Usage

## Command-line execution

**Complete workflow**

```bash
oquarekg graph.ttl --domain-uri http://example.org
```

**Calculate metrics**

```bash
oquarekg-evaluate graph.ttl --domain-uri http://example.org
```

**Calculate scores**

```bash
oquarekg-scores --input_dir results --outdir results
```

## Command-line parameters

* graph_file: name of the file that contains the graph to evaluate (supported formats: `.ttl (Turtle)`, `.nt (N-Triples)`, and other RDF formats supported by [RDFLib](https://rdflib.readthedocs.io/)).
* domain_uri: namespace URI of the graph to evaluate.
* input_dir: direc. This parameter is only needed when running for calculating the scores only. This is the directory that stores the metrics generated by OQuaRE-KG.
* output_dir: directory for saving the files generated by the OQUARE-KG execution.

# Sample code

## Complete workflow

```Python
from oquarekg import run_oquarekg

run_oquarekg(

    graph_file="graph.ttl",

    domain_uri="http://example.org"

)
```

## Evaluation only

```Python
from oquarekg import evaluate

evaluate(

    graph_file="graph.ttl",

    domain_uri="http://example.org"

)
```

## Scoring only

```Python
from oquarekg import scoring
scoring(
    input_dir="results",
    output_dir="results"
)
```
