File size: 4,203 Bytes
afa7452 8b3dcb1 24f28c6 afa7452 24f28c6 afa7452 24f28c6 afa7452 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | ---
license: apache-2.0
language:
- en
pretty_name: CQ2Onto
size_categories:
- n<1K
task_categories:
- text-generation
tags:
- ontology-engineering
- ontology-generation
- term-extraction
- benchmark
configs:
- config_name: cq2onto
data_files:
- split: wine
path: wine/cq_to_onto_wine.json
- split: awo
path: awo/cq_to_onto_awo.json
- split: odrl
path: odrl/cq_to_onto_odrl.json
- split: water
path: water/cq_to_onto_water.json
- split: vgo
path: vgo/cq_to_onto_vgo.json
- split: swo
path: swo/cq_to_onto_swo.json
- config_name: cq2term
data_files:
- split: wine
path: wine/cq_to_terms_wine.json
- split: awo
path: awo/cq_to_terms_awo.json
- split: odrl
path: odrl/cq_to_terms_odrl.json
- split: water
path: water/cq_to_terms_water.json
- split: vgo
path: vgo/cq_to_terms_vgo.json
- split: swo
path: swo/cq_to_terms_swo.json
---
# CQ2Onto Benchmark & Dataset
Benchmark for evaluating LLM-assisted ontology generation from competency questions, across six domains. For each domain the dataset provides a gold OWL ontology, two CQ files (one per evaluation task), and the annotation spreadsheet used during construction. Each Ontology contains a set of CQs for `CQ2Term`, a set of CQs for `CQ2Onto`, a owl source file that representing all CQs for `CQ2Onto`, and an excel contains all annotation process. More details can be found [here](https://github.com/oeg-upm/OntologyEngineeringBenchmark).
Two tasks:
- **CQ2Term**: given a CQ, extract all possible classes and properties.
- **CQ2Onto**: given a set of CQs, produce a full OWL ontology.
## Dataset Construction
We have selected six ontologies in three diferent scales:
| Ontology | Tier | Source CQs | Retained | New ⋆ | CQ2Onto set | CQ2Term set |
|----------|------|-----------:|---------:|------:|------------:|------------:|
| Wine | small | 7 | 4 | 1 | 5 | 5 |
| AWO | small | 14 | 7 | 0 | 7 | 7 |
| ODRL | medium | 35 | 13 | 6 | 19 | 19 |
| Water | medium | 43 | 21 | 0 | 21 | 20 |
| VGO | large | 68 | 30 | 1 | 31 | 22 |
| SWO | large | 88 | 35 | 0 | 35 | 26 |
All sources of the selected ontologies:
- **wine**: [Wine Ontology](https://github.com/UCDavisLibrary/wine-ontology)
- **awo**: [African Wildlife Ontology](https://people.cs.uct.ac.za/~mkeet/OEbook/ontologies/AfricanWildlifeOntology1.owl)
- **odrl**: [ODRL Vocabulary Ontology](https://www.w3.org/ns/odrl/2/)
- **water**: [SAREF4WATR Ontology](https://saref.etsi.org/saref4watr/v1.1.1/)
- **vgo**: [Video Game Ontology](https://vocab.linkeddata.es/vgo/)
- **swo**: [Software Ontology](https://obofoundry.org/ontology/swo.html)
## File formats
### Annotation Records:
**`<Domain>_CQs_Annotations.xlsx`**: annotation process with per-CQ class and property splits, plus axioms.
### CQ2Onto Task:
**`cq_to_onto_<domain>.json`** (CQ2Onto Input): list of CQs. Gold standard is the ontology, corresponding to `.owl` file.
```json
[
{"id": "CQ1", "value": "Which wine characteristics should I consider when choosing a wine?"}
]
```
**`sub_<domain>.owl`** (CQ2Onto Gold Standard): OWL source code in RDF/XML. CQ-driven restriction of the source ontology, retaining only what's required to satisfy the CQs.
### CQ2Term Task:
**`cq_to_terms_<domain>.json`** (CQ2Term Input & Gold Standard): list of CQs, with the gold standard class and property labels.
```json
[
{
"id": "CQ1",
"question": "Which wine characteristics should I consider when choosing a wine?", # Input Competency Question
"classes": ["Wine", "WineDescriptor"], # Gold Standard Classes
"properties": ["hasWineDescriptor"] # Gold Standard Properties
}
]
```
## Loading
```python
from huggingface_hub import hf_hub_download
import json, rdflib
# CQ2Term: Load Dataset
path = hf_hub_download("oeg/CQ2Onto", "wine/cq_to_terms_wine.json", repo_type="dataset")
cqs = json.load(open(path))
# CQ2Onto
path = hf_hub_download("oeg/CQ2Onto", "wine/sub_wine.owl", repo_type="dataset")
g = rdflib.Graph().parse(path)
```
## License
Apache 2.0. |