cosmetic changes to docs
Browse files
README.md
CHANGED
|
@@ -9,19 +9,13 @@ tags:
|
|
| 9 |
- industry
|
| 10 |
pretty_name: Industry
|
| 11 |
---
|
| 12 |
-
<div>
|
| 13 |
<img src="https://raw.githubusercontent.com/sciknoworg/OntoLearner/main/images/logo.png" alt="OntoLearner"
|
| 14 |
style="display: block; margin: 0 auto; width: 500px; height: auto;">
|
| 15 |
<h1 style="text-align: center; margin-top: 1em;">Industry Domain Ontologies</h1>
|
|
|
|
| 16 |
</div>
|
| 17 |
|
| 18 |
-
<div align="center">
|
| 19 |
-
|
| 20 |
-
[](https://github.com/sciknoworg/OntoLearner)
|
| 21 |
-
[](https://pypi.org/project/OntoLearner/)
|
| 22 |
-
[](https://ontolearner.readthedocs.io/benchmarking/benchmark.html)
|
| 23 |
-
|
| 24 |
-
</div>
|
| 25 |
|
| 26 |
## Overview
|
| 27 |
The industry domain encompasses ontologies that systematically represent and model the complex structures, processes, and interactions inherent in industrial settings, including manufacturing systems, smart infrastructure, and equipment lifecycle management. This domain is pivotal in advancing knowledge representation by enabling interoperability, enhancing data integration, and facilitating automation across diverse industrial sectors. Through precise semantic frameworks, it supports the optimization of industrial operations and the development of innovative technologies.
|
|
@@ -39,7 +33,7 @@ The industry domain encompasses ontologies that systematically represent and mod
|
|
| 39 |
## Dataset Files
|
| 40 |
Each ontology directory contains the following files:
|
| 41 |
1. `<ontology_id>.<format>` - The original ontology file
|
| 42 |
-
2. `term_typings.json` - Dataset of term
|
| 43 |
3. `taxonomies.json` - Dataset of taxonomic relations
|
| 44 |
4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
|
| 45 |
5. `<ontology_id>.rst` - Documentation describing the ontology
|
|
@@ -47,15 +41,31 @@ Each ontology directory contains the following files:
|
|
| 47 |
## Usage
|
| 48 |
These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
|
| 49 |
|
| 50 |
-
``
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
ontology.load()
|
| 57 |
|
| 58 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
data = ontology.extract()
|
| 60 |
|
| 61 |
# Split into train and test sets
|
|
@@ -63,10 +73,10 @@ train_data, test_data = train_test_split(data, test_size=0.2)
|
|
| 63 |
|
| 64 |
# Create a learning pipeline (for RAG-based learning)
|
| 65 |
pipeline = LearnerPipeline(
|
| 66 |
-
task="term-typing", # Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
|
| 67 |
-
retriever_id="sentence-transformers/all-MiniLM-L6-v2",
|
| 68 |
-
llm_id="mistralai/Mistral-7B-Instruct-v0.1",
|
| 69 |
-
hf_token="your_huggingface_token" # Only needed for gated models
|
| 70 |
)
|
| 71 |
|
| 72 |
# Train and evaluate
|
|
@@ -78,5 +88,23 @@ results, metrics = pipeline.fit_predict_evaluate(
|
|
| 78 |
)
|
| 79 |
```
|
| 80 |
|
| 81 |
-
For more detailed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
|
|
|
| 9 |
- industry
|
| 10 |
pretty_name: Industry
|
| 11 |
---
|
| 12 |
+
<div align="center">
|
| 13 |
<img src="https://raw.githubusercontent.com/sciknoworg/OntoLearner/main/images/logo.png" alt="OntoLearner"
|
| 14 |
style="display: block; margin: 0 auto; width: 500px; height: auto;">
|
| 15 |
<h1 style="text-align: center; margin-top: 1em;">Industry Domain Ontologies</h1>
|
| 16 |
+
<a href="https://github.com/sciknoworg/OntoLearner"><img src="https://img.shields.io/badge/GitHub-OntoLearner-blue?logo=github" /></a>
|
| 17 |
</div>
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Overview
|
| 21 |
The industry domain encompasses ontologies that systematically represent and model the complex structures, processes, and interactions inherent in industrial settings, including manufacturing systems, smart infrastructure, and equipment lifecycle management. This domain is pivotal in advancing knowledge representation by enabling interoperability, enhancing data integration, and facilitating automation across diverse industrial sectors. Through precise semantic frameworks, it supports the optimization of industrial operations and the development of innovative technologies.
|
|
|
|
| 33 |
## Dataset Files
|
| 34 |
Each ontology directory contains the following files:
|
| 35 |
1. `<ontology_id>.<format>` - The original ontology file
|
| 36 |
+
2. `term_typings.json` - A Dataset of term-to-type mappings
|
| 37 |
3. `taxonomies.json` - Dataset of taxonomic relations
|
| 38 |
4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
|
| 39 |
5. `<ontology_id>.rst` - Documentation describing the ontology
|
|
|
|
| 41 |
## Usage
|
| 42 |
These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
|
| 43 |
|
| 44 |
+
First of all, install the `OntoLearner` library via PiP:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
pip install ontolearner
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
**How to load an ontology or LLM4OL Paradigm tasks datasets?**
|
| 51 |
+
``` python
|
| 52 |
+
from ontolearner import AUTO
|
| 53 |
+
|
| 54 |
+
ontology = AUTO()
|
| 55 |
|
| 56 |
+
# Load an ontology.
|
| 57 |
+
ontology.load()
|
| 58 |
|
| 59 |
+
# Load (or extract) LLMs4OL Paradigm tasks datasets
|
| 60 |
+
data = ontology.extract()
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
**How use the loaded dataset for LLM4OL Paradigm task settings?**
|
| 64 |
+
``` python
|
| 65 |
+
from ontolearner import AUTO, LearnerPipeline, train_test_split
|
| 66 |
+
|
| 67 |
+
ontology = AUTO()
|
| 68 |
+
ontology.load()
|
| 69 |
data = ontology.extract()
|
| 70 |
|
| 71 |
# Split into train and test sets
|
|
|
|
| 73 |
|
| 74 |
# Create a learning pipeline (for RAG-based learning)
|
| 75 |
pipeline = LearnerPipeline(
|
| 76 |
+
task = "term-typing", # Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
|
| 77 |
+
retriever_id = "sentence-transformers/all-MiniLM-L6-v2",
|
| 78 |
+
llm_id = "mistralai/Mistral-7B-Instruct-v0.1",
|
| 79 |
+
hf_token = "your_huggingface_token" # Only needed for gated models
|
| 80 |
)
|
| 81 |
|
| 82 |
# Train and evaluate
|
|
|
|
| 88 |
)
|
| 89 |
```
|
| 90 |
|
| 91 |
+
For more detailed documentation, see the [](https://ontolearner.readthedocs.io)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
## Citation
|
| 95 |
+
|
| 96 |
+
If you find our work helpful, feel free to give us a cite.
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
```bibtex
|
| 100 |
+
@inproceedings{babaei2023llms4ol,
|
| 101 |
+
title={LLMs4OL: Large language models for ontology learning},
|
| 102 |
+
author={Babaei Giglou, Hamed and D’Souza, Jennifer and Auer, S{\"o}ren},
|
| 103 |
+
booktitle={International Semantic Web Conference},
|
| 104 |
+
pages={408--427},
|
| 105 |
+
year={2023},
|
| 106 |
+
organization={Springer}
|
| 107 |
+
}
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
|