|
|
|
|
|
--- |
|
|
license: mit |
|
|
language: |
|
|
- en |
|
|
tags: |
|
|
- OntoLearner |
|
|
- ontology-learning |
|
|
- chemistry |
|
|
pretty_name: Chemistry |
|
|
--- |
|
|
<div align="center"> |
|
|
<img src="https://raw.githubusercontent.com/sciknoworg/OntoLearner/main/images/logo.png" alt="OntoLearner" |
|
|
style="display: block; margin: 0 auto; width: 500px; height: auto;"> |
|
|
<h1 style="text-align: center; margin-top: 1em;">Chemistry Domain Ontologies</h1> |
|
|
<a href="https://github.com/sciknoworg/OntoLearner"><img src="https://img.shields.io/badge/GitHub-OntoLearner-blue?logo=github" /></a> |
|
|
</div> |
|
|
|
|
|
## Overview |
|
|
The chemistry domain encompasses the structured representation and formalization of chemical knowledge, including entities, reactions, processes, and methodologies. It plays a critical role in knowledge representation by enabling the integration, sharing, and computational analysis of chemical data across diverse subfields such as organic, inorganic, physical, and computational chemistry. This domain facilitates the advancement of scientific research and innovation by providing a standardized framework for the precise and interoperable exchange of chemical information. |
|
|
|
|
|
## Ontologies |
|
|
| Ontology ID | Full Name | Classes | Properties | Last Updated | |
|
|
|-------------|-----------|---------|------------|--------------| |
|
|
| AFO | Allotrope Foundation Ontology (AFO) | 3871 | 318 | 2024-06-28| |
|
|
| ChEBI | Chemical Entities of Biological Interest (ChEBI) | 220816 | 10 | 01/01/2025| |
|
|
| CHEMINF | Chemical Information Ontology (CHEMINF) | 358 | 52 | None| |
|
|
| CHIRO | CHEBI Integrated Role Ontology (CHIRO) | 13930 | 15 | 2015-11-23| |
|
|
| ChMO | Chemical Methods Ontology (ChMO) | 3202 | 27 | 2022-04-19| |
|
|
| FIX | FIX Ontology (FIX) | 1163 | 5 | 2020-04-13| |
|
|
| MassSpectrometry | Mass Spectrometry Ontology (MassSpectrometry) | 3636 | 12 | 12:02:2025| |
|
|
| MOP | Molecular Process Ontology (MOP) | 3717 | 11 | 2022-05-11| |
|
|
| NMRCV | Nuclear Magnetic Resonance Controlled Vocabulary (NMRCV) | 757 | 0 | 2017-10-19| |
|
|
| OntoKin | Chemical Kinetics Ontology (OntoKin) | 83 | 136 | 08 February 2022| |
|
|
| PROCO | PROcess Chemistry Ontology (PROCO) | 970 | 61 | 04-14-2022| |
|
|
| PSIMOD | Proteomics Standards Initiative (PSI) Protein Modifications Ontology (PSI-MOD) | 2098 | 4 | 2022-06-13| |
|
|
| REX | Physico-chemical process ontology (REX) | 552 | 6 | 2025-03-11| |
|
|
| RXNO | Reaction Ontology (RXNO) | 1109 | 14 | 2021-12-16| |
|
|
| VIBSO | Vibrational Spectroscopy Ontology (VIBSO) | 598 | 53 | 2024-09-23| |
|
|
|
|
|
## Dataset Files |
|
|
Each ontology directory contains the following files: |
|
|
1. `<ontology_id>.<format>` - 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. `<ontology_id>.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 AFO |
|
|
|
|
|
ontology = AFO() |
|
|
|
|
|
# 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 AFO, LearnerPipeline, train_test_split |
|
|
|
|
|
# Load the AFO ontology, which contains concepts related to wines, their properties, and categories |
|
|
ontology = AFO() |
|
|
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} |
|
|
} |
|
|
``` |
|
|
|