cosmetic changes to docs
Browse files
README.md
CHANGED
|
@@ -9,12 +9,14 @@ tags:
|
|
| 9 |
- scholarly_knowledge
|
| 10 |
pretty_name: Agricultural
|
| 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;">Scholarly Knowledge Domain Ontologies</h1>
|
|
|
|
| 16 |
</div>
|
| 17 |
|
|
|
|
| 18 |
## Overview
|
| 19 |
The scholarly_knowledge domain encompasses ontologies that systematically model the intricate structures, processes, and administrative mechanisms underlying scholarly research, publications, and associated infrastructures. This domain plays a critical role in the formal representation and organization of academic knowledge, facilitating interoperability, data sharing, and enhanced understanding across diverse research disciplines. By providing a structured framework for capturing the complexities of scholarly activities, these ontologies support the advancement of research methodologies and the dissemination of scientific knowledge.
|
| 20 |
|
|
@@ -49,11 +51,76 @@ The scholarly_knowledge domain encompasses ontologies that systematically model
|
|
| 49 |
## Dataset Files
|
| 50 |
Each ontology directory contains the following files:
|
| 51 |
1. `<ontology_id>.<format>` - The original ontology file
|
| 52 |
-
2. `term_typings.json` - Dataset of term
|
| 53 |
3. `taxonomies.json` - Dataset of taxonomic relations
|
| 54 |
4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
|
| 55 |
5. `<ontology_id>.rst` - Documentation describing the ontology
|
| 56 |
|
| 57 |
## Usage
|
| 58 |
-
These datasets are intended for ontology learning research and applications.
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
- scholarly_knowledge
|
| 10 |
pretty_name: Agricultural
|
| 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;">Scholarly Knowledge 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 scholarly_knowledge domain encompasses ontologies that systematically model the intricate structures, processes, and administrative mechanisms underlying scholarly research, publications, and associated infrastructures. This domain plays a critical role in the formal representation and organization of academic knowledge, facilitating interoperability, data sharing, and enhanced understanding across diverse research disciplines. By providing a structured framework for capturing the complexities of scholarly activities, these ontologies support the advancement of research methodologies and the dissemination of scientific knowledge.
|
| 22 |
|
|
|
|
| 51 |
## Dataset Files
|
| 52 |
Each ontology directory contains the following files:
|
| 53 |
1. `<ontology_id>.<format>` - The original ontology file
|
| 54 |
+
2. `term_typings.json` - A Dataset of term-to-type mappings
|
| 55 |
3. `taxonomies.json` - Dataset of taxonomic relations
|
| 56 |
4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
|
| 57 |
5. `<ontology_id>.rst` - Documentation describing the ontology
|
| 58 |
|
| 59 |
## Usage
|
| 60 |
+
These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
|
| 61 |
+
|
| 62 |
+
First of all, install the `OntoLearner` library via PiP:
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
pip install ontolearner
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
**How to load an ontology or LLM4OL Paradigm tasks datasets?**
|
| 69 |
+
``` python
|
| 70 |
+
from ontolearner import AIISO
|
| 71 |
+
|
| 72 |
+
ontology = AIISO()
|
| 73 |
+
|
| 74 |
+
# Load an ontology.
|
| 75 |
+
ontology.load()
|
| 76 |
+
|
| 77 |
+
# Load (or extract) LLMs4OL Paradigm tasks datasets
|
| 78 |
+
data = ontology.extract()
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
**How use the loaded dataset for LLM4OL Paradigm task settings?**
|
| 82 |
+
``` python
|
| 83 |
+
from ontolearner import AIISO, LearnerPipeline, train_test_split
|
| 84 |
+
|
| 85 |
+
ontology = AIISO()
|
| 86 |
+
ontology.load()
|
| 87 |
+
data = ontology.extract()
|
| 88 |
+
|
| 89 |
+
# Split into train and test sets
|
| 90 |
+
train_data, test_data = train_test_split(data, test_size=0.2)
|
| 91 |
+
|
| 92 |
+
# Create a learning pipeline (for RAG-based learning)
|
| 93 |
+
pipeline = LearnerPipeline(
|
| 94 |
+
task = "term-typing", # Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
|
| 95 |
+
retriever_id = "sentence-transformers/all-MiniLM-L6-v2",
|
| 96 |
+
llm_id = "mistralai/Mistral-7B-Instruct-v0.1",
|
| 97 |
+
hf_token = "your_huggingface_token" # Only needed for gated models
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
# Train and evaluate
|
| 101 |
+
results, metrics = pipeline.fit_predict_evaluate(
|
| 102 |
+
train_data=train_data,
|
| 103 |
+
test_data=test_data,
|
| 104 |
+
top_k=3,
|
| 105 |
+
test_limit=10
|
| 106 |
+
)
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
For more detailed documentation, see the [](https://ontolearner.readthedocs.io)
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
## Citation
|
| 113 |
+
|
| 114 |
+
If you find our work helpful, feel free to give us a cite.
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
```bibtex
|
| 118 |
+
@inproceedings{babaei2023llms4ol,
|
| 119 |
+
title={LLMs4OL: Large language models for ontology learning},
|
| 120 |
+
author={Babaei Giglou, Hamed and D’Souza, Jennifer and Auer, S{\"o}ren},
|
| 121 |
+
booktitle={International Semantic Web Conference},
|
| 122 |
+
pages={408--427},
|
| 123 |
+
year={2023},
|
| 124 |
+
organization={Springer}
|
| 125 |
+
}
|
| 126 |
+
```
|