hamedbabaeigiglou commited on
Commit
7f932dd
·
verified ·
1 Parent(s): 5048192

cosmetic changes to docs

Browse files
Files changed (1) hide show
  1. README.md +49 -22
README.md CHANGED
@@ -9,19 +9,13 @@ tags:
9
  - education
10
  pretty_name: Education
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;">Education Domain Ontologies</h1>
 
16
  </div>
17
 
18
- <div align="center">
19
-
20
- [![GitHub](https://img.shields.io/badge/GitHub-OntoLearner-blue?logo=github)](https://github.com/sciknoworg/OntoLearner)
21
- [![PyPI](https://img.shields.io/badge/PyPI-OntoLearner-blue?logo=pypi)](https://pypi.org/project/OntoLearner/)
22
- [![Documentation](https://img.shields.io/badge/Docs-ReadTheDocs-blue)](https://ontolearner.readthedocs.io/benchmarking/benchmark.html)
23
-
24
- </div>
25
 
26
  ## Overview
27
  The education domain encompasses ontologies that systematically represent and organize knowledge related to learning content, educational programs, competencies, and teaching resources. This domain plays a critical role in facilitating semantic interoperability and enhancing the precision of information retrieval and management within educational contexts. By providing a structured framework for the representation of educational concepts and relationships, it supports the development of intelligent systems that can effectively process and utilize educational data.
@@ -36,23 +30,40 @@ The education domain encompasses ontologies that systematically represent and or
36
  ## Dataset Files
37
  Each ontology directory contains the following files:
38
  1. `<ontology_id>.<format>` - The original ontology file
39
- 2. `term_typings.json` - Dataset of term to type mappings
40
  3. `taxonomies.json` - Dataset of taxonomic relations
41
  4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
42
  5. `<ontology_id>.rst` - Documentation describing the ontology
43
 
 
44
  ## Usage
45
  These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
46
 
47
- ```python
48
- from ontolearner.ontology import Wine
49
- from ontolearner.utils.train_test_split import train_test_split
50
- from ontolearner.learner_pipeline import LearnerPipeline
51
 
52
- ontology = Wine()
53
- ontology.load() # Automatically downloads from Hugging Face
 
 
 
 
 
 
 
54
 
55
- # Extract the dataset
 
 
 
 
 
 
 
 
 
 
 
 
56
  data = ontology.extract()
57
 
58
  # Split into train and test sets
@@ -60,10 +71,10 @@ train_data, test_data = train_test_split(data, test_size=0.2)
60
 
61
  # Create a learning pipeline (for RAG-based learning)
62
  pipeline = LearnerPipeline(
63
- task="term-typing", # Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
64
- retriever_id="sentence-transformers/all-MiniLM-L6-v2",
65
- llm_id="mistralai/Mistral-7B-Instruct-v0.1",
66
- hf_token="your_huggingface_token" # Only needed for gated models
67
  )
68
 
69
  # Train and evaluate
@@ -75,5 +86,21 @@ results, metrics = pipeline.fit_predict_evaluate(
75
  )
76
  ```
77
 
78
- For more detailed examples, see the [OntoLearner documentation](https://ontolearner.readthedocs.io/).
79
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - education
10
  pretty_name: Education
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;">Education 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 education domain encompasses ontologies that systematically represent and organize knowledge related to learning content, educational programs, competencies, and teaching resources. This domain plays a critical role in facilitating semantic interoperability and enhancing the precision of information retrieval and management within educational contexts. By providing a structured framework for the representation of educational concepts and relationships, it supports the development of intelligent systems that can effectively process and utilize educational data.
 
30
  ## Dataset Files
31
  Each ontology directory contains the following files:
32
  1. `<ontology_id>.<format>` - The original ontology file
33
+ 2. `term_typings.json` - A Dataset of term-to-type mappings
34
  3. `taxonomies.json` - Dataset of taxonomic relations
35
  4. `non_taxonomic_relations.json` - Dataset of non-taxonomic relations
36
  5. `<ontology_id>.rst` - Documentation describing the ontology
37
 
38
+
39
  ## Usage
40
  These datasets are intended for ontology learning research and applications. Here's how to use them with OntoLearner:
41
 
42
+ First of all, install the `OntoLearner` library via PiP:
 
 
 
43
 
44
+ ```bash
45
+ pip install ontolearner
46
+ ```
47
+
48
+ **How to load an ontology or LLM4OL Paradigm tasks datasets?**
49
+ ``` python
50
+ from ontolearner import BIBFRAME
51
+
52
+ ontology = BIBFRAME()
53
 
54
+ # Load an ontology.
55
+ ontology.load()
56
+
57
+ # Load (or extract) LLMs4OL Paradigm tasks datasets
58
+ data = ontology.extract()
59
+ ```
60
+
61
+ **How use the loaded dataset for LLM4OL Paradigm task settings?**
62
+ ``` python
63
+ from ontolearner import BIBFRAME, LearnerPipeline, train_test_split
64
+
65
+ ontology = BIBFRAME()
66
+ ontology.load()
67
  data = ontology.extract()
68
 
69
  # Split into train and test sets
 
71
 
72
  # Create a learning pipeline (for RAG-based learning)
73
  pipeline = LearnerPipeline(
74
+ task = "term-typing", # Other options: "taxonomy-discovery" or "non-taxonomy-discovery"
75
+ retriever_id = "sentence-transformers/all-MiniLM-L6-v2",
76
+ llm_id = "mistralai/Mistral-7B-Instruct-v0.1",
77
+ hf_token = "your_huggingface_token" # Only needed for gated models
78
  )
79
 
80
  # Train and evaluate
 
86
  )
87
  ```
88
 
89
+ For more detailed documentation, see the [![Documentation](https://img.shields.io/badge/Documentation-ontolearner.readthedocs.io-blue)](https://ontolearner.readthedocs.io)
90
+
91
+
92
+ ## Citation
93
+
94
+ If you find our work helpful, feel free to give us a cite.
95
+
96
+
97
+ ```bibtex
98
+ @inproceedings{babaei2023llms4ol,
99
+ title={LLMs4OL: Large language models for ontology learning},
100
+ author={Babaei Giglou, Hamed and D’Souza, Jennifer and Auer, S{\"o}ren},
101
+ booktitle={International Semantic Web Conference},
102
+ pages={408--427},
103
+ year={2023},
104
+ organization={Springer}
105
+ }
106
+ ```