---
license: mit
language:
- en
tags:
- OntoLearner
- ontology-learning
- general-knowledge
pretty_name: General Knowledge
---
General Knowledge Domain Ontologies
## Overview
The general knowledge domain encompasses broad-scope ontologies and upper vocabularies designed for cross-disciplinary semantic modeling and knowledge representation. This domain is pivotal in facilitating interoperability and data integration across diverse fields by providing a foundational framework for organizing and linking information. Its significance lies in enabling the seamless exchange and understanding of knowledge across varied contexts, thereby supporting advanced data analysis, information retrieval, and decision-making processes.
## Ontologies
| Ontology ID | Full Name | Classes | Properties | Last Updated |
|-------------|-----------|---------|------------|--------------|
| CCO | Common Core Ontologies (CCO) | 1539 | 277 | 2024-11-06|
| DBpedia | DBpedia Ontology (DBpedia) | 790 | 3029 | 2008-11-17|
| DublinCore | Dublin Core Vocabulary (DublinCore) | 11 | 0 | February 17, 2017|
| EDAM | The ontology of data analysis and management (EDAM) | 3513 | 12 | 24.09.2024|
| GIST | GIST Upper Ontology (GIST) | 199 | 113 | 2024-Feb-27|
| IAO | Information Artifact Ontology (IAO) | 292 | 57 | 2022-11-07|
| PROV | PROV Ontology (PROV-O) | 39 | 50 | 2013-04-30|
| RO | Relation Ontology (RO) | 88 | 673 | 2024-04-24|
| SchemaOrg | Schema.org Ontology (SchemaOrg) | 3881 | 1485 | 2024-11-22|
| UMBEL | Upper Mapping and Binding Exchange Layer Vocabulary (UMBEL) | 99 | 42 | May 10, 2016|
| YAGO | YAGO Ontology (YAGO) | N/A | N/A | April, 2024|
## Dataset Files
Each ontology directory contains the following files:
1. `.` - The original ontology file
2. `term_typings.json` - A Dataset of term-to-type mappings
3. `taxonomies.json` - Dataset of taxonomic relations
4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
5. `.rst` - Documentation describing the ontology
## Usage
These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
First of all, install the `OntoLearner` library via PiP:
```bash
pip install ontolearner
```
**How to load an ontology or LLM4OL Paradigm tasks datasets?**
``` python
from ontolearner import CCO
ontology = CCO()
# Load an ontology.
ontology.load()
# Load (or extract) LLMs4OL Paradigm tasks datasets
data = ontology.extract()
```
**How use the loaded dataset for LLM4OL Paradigm task settings?**
``` python
# Import core modules from the OntoLearner library
from ontolearner import CCO, LearnerPipeline, train_test_split
# Load the CCO ontology, which contains concepts related to wines, their properties, and categories
ontology = CCO()
ontology.load() # Load entities, types, and structured term annotations from the ontology
data = ontology.extract()
# Split into train and test sets
train_data, test_data = train_test_split(data, test_size=0.2, random_state=42)
# Initialize a multi-component learning pipeline (retriever + LLM)
# This configuration enables a Retrieval-Augmented Generation (RAG) setup
pipeline = LearnerPipeline(
retriever_id='sentence-transformers/all-MiniLM-L6-v2', # Dense retriever model for nearest neighbor search
llm_id='Qwen/Qwen2.5-0.5B-Instruct', # Lightweight instruction-tuned LLM for reasoning
hf_token='...', # Hugging Face token for accessing gated models
batch_size=32, # Batch size for training/prediction if supported
top_k=5 # Number of top retrievals to include in RAG prompting
)
# Run the pipeline: training, prediction, and evaluation in one call
outputs = pipeline(
train_data=train_data,
test_data=test_data,
evaluate=True, # Compute metrics like precision, recall, and F1
task='term-typing' # Specifies the task
# Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
)
# Print final evaluation metrics
print("Metrics:", outputs['metrics'])
# Print the total time taken for the full pipeline execution
print("Elapsed time:", outputs['elapsed_time'])
# Print all outputs (including predictions)
print(outputs)
```
For more detailed documentation, see the [](https://ontolearner.readthedocs.io)
## Citation
If you find our work helpful, feel free to give us a cite.
```bibtex
@inproceedings{babaei2023llms4ol,
title={LLMs4OL: Large language models for ontology learning},
author={Babaei Giglou, Hamed and D’Souza, Jennifer and Auer, S{\"o}ren},
booktitle={International Semantic Web Conference},
pages={408--427},
year={2023},
organization={Springer}
}
```