Skip to content

Features dev #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9be6270
:sparkles: update ontology documentation, fixed ontology ids
aioaneia Apr 24, 2025
3a2f2c2
:sparkles: update ontology documentation, fixed ontology ids
aioaneia Apr 24, 2025
e9572c5
:sparkles: added battinfo ontology. fixed GEO ontology
aioaneia Apr 25, 2025
b8f1312
:sparkles: added HF integration, added PRIMA ontology
aioaneia Apr 29, 2025
349db1b
:sparkles: added plots
aioaneia Apr 29, 2025
b44e94f
:sparkles: add functions to load ontologies and datasets from Hugging…
aioaneia Apr 30, 2025
31c3a76
:sparkles: refactor Hugging Face integration for domain-based
aioaneia May 2, 2025
aeab9a3
Merge remote-tracking branch 'origin/bugs&features' into bugs&features
aioaneia May 2, 2025
23f01b9
:sparkles: refactor Hugging Face integration for domain-based
aioaneia May 2, 2025
1b2d507
:sparkles: refactor Hugging Face integration for domain-based
aioaneia May 2, 2025
e0cd19b
:sparkles: refactor Hugging Face integration for domain-based
aioaneia May 3, 2025
7f9e633
:bug: fix save path formatting for ontology datasets
aioaneia May 3, 2025
212ae0c
:sparkles: replaced '&' with 'and' in the ontology domain names
aioaneia May 3, 2025
16004e8
:sparkles: refactored _is_valid_non_taxonomic_triple
aioaneia May 3, 2025
68398cc
:sparkles: updated documentation
aioaneia May 3, 2025
3a48a94
:sparkles: refactor ontology directory handling
aioaneia May 3, 2025
9f641f1
:memo: Update requirements.txt
HamedBabaei May 3, 2025
f48c75a
:sparkles: enhance blank node validation in ontology.py
aioaneia May 3, 2025
6494402
:sparkles: update ontology loading path to support dynamic format
aioaneia May 3, 2025
0b77cd4
:sparkles: enhance blank node validation for GO-specific patterns in …
aioaneia May 3, 2025
0afb84d
:sparkles: update ontology documentation and datasets for agricultura…
aioaneia May 5, 2025
5c103cd
:sparkles: update ontology documentation and datasets for arts humani…
aioaneia May 5, 2025
001eb74
:sparkles: update ontology metrics
aioaneia May 5, 2025
6fdad36
:pencil2: update ontology metrics for chemistry domain
aioaneia May 5, 2025
ed10ffc
:pencil2: update ontology metrics for chemistry domain
aioaneia May 5, 2025
1cec6c0
:pencil2: update ontology metrics for ecology, education events, fina…
aioaneia May 5, 2025
23093ce
:pencil2: update ontology metrics for general knowledge domain
aioaneia May 5, 2025
cdc831c
:pencil2: update ontology metrics for geography, industry, library an…
aioaneia May 5, 2025
7b836ab
:pencil2: update ontology metrics for material science and engineering
aioaneia May 6, 2025
e7c7a83
:pencil2: update ontology metrics for medicine domain
aioaneia May 6, 2025
14732c8
:pencil2: update ontology metrics for news and media domain
aioaneia May 6, 2025
8bc4f74
:pencil2: update ontology metrics for scholarly knowledge and social …
aioaneia May 6, 2025
47f7ca5
:pencil2: update ontology metrics for upper ontology, units and measu…
aioaneia May 6, 2025
8f8baf8
:pencil2: enhance base ontology by adding additional label patterns
aioaneia May 6, 2025
7ec04d7
:pencil2: add functionality to load ontology from Hugging Face reposi…
aioaneia May 6, 2025
bd72b9d
refactor: refactored ontology loading process from Hugging Face and l…
aioaneia May 7, 2025
0123a6e
:pencil2: update ontology full names, add doc for adding a new ontology
aioaneia May 8, 2025
f8b2b0d
:pencil2: update ontology documentation
aioaneia May 8, 2025
d0e2818
Merge pull request #227 from sciknoworg/bugs&features
HamedBabaei May 8, 2025
8d60cf7
Merge branch 'dev' into features-dev
HamedBabaei May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ sphinx_autodoc_typehints
myst-parser
sphinx_markdown_tables
sphinx-copybutton
sphinx_inline_tabs
sphinxcontrib-mermaid
sphinx-panels
sphinx-design
sphinx-tabs
sphinx-inline-tabs
snowballstemmer
68 changes: 68 additions & 0 deletions docs/source/_templates/ontology.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{{ ontology_name }}
========================================================================================================================

Overview
--------
{{ description }}

:Domain: {{ domain }}
:Category: {{ category }}
:Current Version: {{ version }}
:Last Updated: {{ last_updated }}
:Creator: {{ creator }}
:License: {{ license }}
:Format: {{ format }}
:Download: `{{ ontology_name }} Homepage <{{ download_url }}>`_

Graph Metrics
-------------
- **Total Nodes**: {{ total_nodes }}
- **Total Edges**: {{ total_edges }}
- **Root Nodes**: {{ root_nodes }}
- **Leaf Nodes**: {{ leaf_nodes }}

Knowledge coverage
------------------
- Classes: {{ num_classes }}
- Individuals: {{ num_individuals }}
- Properties: {{ num_properties }}

Hierarchical metrics
--------------------
- **Maximum Depth**: {{ max_depth }}
- **Minimum Depth**: {{ min_depth }}
- **Average Depth**: {{ avg_depth }}
- **Depth Variance**: {{ depth_variance }}

Breadth metrics
------------------
- **Maximum Breadth**: {{ max_breadth }}
- **Minimum Breadth**: {{ min_breadth }}
- **Average Breadth**: {{ avg_breadth }}
- **Breadth Variance**: {{ breadth_variance }}

Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: {{ num_term_types }}
- **Taxonomic Relations**: {{ num_taxonomic_relations }}
- **Non-taxonomic Relations**: {{ num_non_taxonomic_relations }}
- **Average Terms per Type**: {{ avg_terms_per_type }}

Usage Example
-------------
.. code-block:: python

from ontolearner.ontology import {{ class_name }}

# Initialize and load ontology
ontology = {{ class_name }}()
ontology.load("path/to/ontology.{{ format }}")

# Extract datasets
data = ontology.extract()

# Access specific relations
term_types = data.term_typings
taxonomic_relations = data.type_taxonomies
non_taxonomic_relations = data.type_non_taxonomic_relations
122 changes: 122 additions & 0 deletions docs/source/_templates/ontology2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{{ ontology_name }}
==============================================================================

Overview
--------
{{ description }}

.. container:: metadata-columns

.. container:: left-column

:Domain: {{ domain }}
:Category: {{ category }}
:Current Version: {{ version }}
:Last Updated: {{ last_updated }}
:Creator: {{ creator }}
:License: {{ license }}
:Format: {{ format }}

.. container:: right-column

.. container:: download-button

`Download {{ ontology_name }} <{{ download_url }}>`_

Metrics & Statistics
-------------------

.. tabs::

.. tab:: Graph Metrics

.. list-table::
:widths: 50 50
:header-rows: 0

* - **Total Nodes**
- {{ total_nodes }}
* - **Total Edges**
- {{ total_edges }}
* - **Root Nodes**
- {{ root_nodes }}
* - **Leaf Nodes**
- {{ leaf_nodes }}

.. tab:: Knowledge Coverage

.. list-table::
:widths: 50 50
:header-rows: 0

* - **Classes**
- {{ num_classes }}
* - **Individuals**
- {{ num_individuals }}
* - **Properties**
- {{ num_properties }}

.. tab:: Hierarchical Metrics

.. list-table::
:widths: 50 50
:header-rows: 0

* - **Maximum Depth**
- {{ max_depth }}
* - **Minimum Depth**
- {{ min_depth }}
* - **Average Depth**
- {{ avg_depth }}
* - **Depth Variance**
- {{ depth_variance }}

.. tab:: Breadth Metrics

.. list-table::
:widths: 50 50
:header-rows: 0

* - **Maximum Breadth**
- {{ max_breadth }}
* - **Minimum Breadth**
- {{ min_breadth }}
* - **Average Breadth**
- {{ avg_breadth }}
* - **Breadth Variance**
- {{ breadth_variance }}

.. tab:: Dataset Statistics

**Generated Benchmarks**:

.. list-table::
:widths: 50 50
:header-rows: 0

* - **Term Types**
- {{ num_term_types }}
* - **Taxonomic Relations**
- {{ num_taxonomic_relations }}
* - **Non-taxonomic Relations**
- {{ num_non_taxonomic_relations }}
* - **Average Terms per Type**
- {{ avg_terms_per_type }}

Usage Example
-------------
.. code-block:: python

from ontolearner.ontology import {{ class_name }}

# Initialize and load ontology
ontology = {{ class_name }}()
ontology.load("path/to/ontology.owl")

# Extract datasets
data = ontology.extract()

# Access specific relations
term_types = data.term_typings
taxonomic_relations = data.type_taxonomies
non_taxonomic_relations = data.type_non_taxonomic_relations
16 changes: 8 additions & 8 deletions docs/source/benchmarking/agricultural/agrovoc.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AGROVOC Multilingual Thesaurus
===================================
AGROVOC Multilingual Thesaurus (AGROVOC)
========================================================================================================================

Overview
--------
Expand All @@ -14,8 +14,8 @@ indexing processes and making searches more efficient.
:Last Updated: August 12, 2024
:Creator: Food and Agriculture Organization of the United Nations
:License: Creative Commons 4.0
:Format: RDF, SKOS
:Download: `AGROVOC Multilingual Thesaurus Homepage <https://agroportal.lirmm.fr/ontologies/AGROVOC>`_
:Format: RDF
:Download: `AGROVOC Multilingual Thesaurus (AGROVOC) Homepage <https://agroportal.lirmm.fr/ontologies/AGROVOC>`_

Graph Metrics
-------------
Expand Down Expand Up @@ -47,10 +47,10 @@ Breadth metrics
Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: 1234769
- **Taxonomic Relations**: 13
- **Term Types**: 12
- **Taxonomic Relations**: 11
- **Non-taxonomic Relations**: 7
- **Average Terms per Type**: 47491.12
- **Average Terms per Type**: 3.00

Usage Example
-------------
Expand All @@ -60,7 +60,7 @@ Usage Example

# Initialize and load ontology
ontology = AGROVOC()
ontology.load("path/to/ontology.owl")
ontology.load("path/to/ontology.RDF")

# Extract datasets
data = ontology.extract()
Expand Down
10 changes: 5 additions & 5 deletions docs/source/benchmarking/agricultural/foodon.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Food Ontology (FoodON)
==========================
========================================================================================================================

Overview
--------
Expand Down Expand Up @@ -49,9 +49,9 @@ Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: 16
- **Taxonomic Relations**: 98513
- **Non-taxonomic Relations**: 7924
- **Average Terms per Type**: 0.94
- **Taxonomic Relations**: 76235
- **Non-taxonomic Relations**: 2072
- **Average Terms per Type**: 8.00

Usage Example
-------------
Expand All @@ -61,7 +61,7 @@ Usage Example

# Initialize and load ontology
ontology = FoodOn()
ontology.load("path/to/ontology.owl")
ontology.load("path/to/ontology.OWL")

# Extract datasets
data = ontology.extract()
Expand Down
10 changes: 5 additions & 5 deletions docs/source/benchmarking/agricultural/po.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Plant Ontology (PO)
==========================
========================================================================================================================

Overview
--------
Expand All @@ -12,7 +12,7 @@ morphology and growth and development to plant genomics data.
:Last Updated: None
:Creator: None
:License: Creative Commons 4.0
:Format: OWL, TTL, CSV, NT
:Format: OWL
:Download: `Plant Ontology (PO) Homepage <https://github.com/Planteome/plant-ontology>`_

Graph Metrics
Expand Down Expand Up @@ -46,8 +46,8 @@ Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: 0
- **Taxonomic Relations**: 5288
- **Non-taxonomic Relations**: 117
- **Taxonomic Relations**: 2866
- **Non-taxonomic Relations**: 36
- **Average Terms per Type**: 0.00

Usage Example
Expand All @@ -58,7 +58,7 @@ Usage Example

# Initialize and load ontology
ontology = PO()
ontology.load("path/to/ontology.owl")
ontology.load("path/to/ontology.OWL")

# Extract datasets
data = ontology.extract()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Chord Ontology
==========================
Chord Ontology (ChordOntology)
========================================================================================================================

Overview
--------
The Chord Ontology is an ontology for describing chords in musical pieces.

:Domain: Arts & Humanities
:Domain: Arts and Humanities
:Category: Musical Works
:Current Version: 1.0
:Last Updated: 2007-10-25
:Creator: Yves Raimond, Samer Abdallah, Centre for Digital Music, Queen Mary, University of London
:License: Creative Commons 3.0
:Format: RDF/XML
:Download: `Chord Ontology Homepage <https://github.com/motools/chordontology>`_
:Format: RDF
:Download: `Chord Ontology (ChordOntology) Homepage <https://github.com/motools/chordontology>`_

Graph Metrics
-------------
Expand Down Expand Up @@ -44,10 +44,10 @@ Breadth metrics
Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: 108
- **Term Types**: 42
- **Taxonomic Relations**: 4
- **Non-taxonomic Relations**: 0
- **Average Terms per Type**: 5.68
- **Average Terms per Type**: 10.50

Usage Example
-------------
Expand All @@ -57,7 +57,7 @@ Usage Example

# Initialize and load ontology
ontology = ChordOntology()
ontology.load("path/to/ontology.owl")
ontology.load("path/to/ontology.RDF")

# Extract datasets
data = ontology.extract()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Icon Ontology (ICON)
==========================
========================================================================================================================

Overview
--------
The ICON ontology deals with high granularity art interpretation. It was developed by conceptualizing
Panofsky's theory of levels of interpretation, therefore artworks can be described according
to Pre-iconographical, Iconographical and Iconological information.

:Domain: Arts & Humanities
:Domain: Arts and Humanities
:Category: Art History, Cultural Heritage
:Current Version: 2.1.0
:Last Updated: April 26th, 2024
Expand Down Expand Up @@ -47,7 +47,7 @@ Dataset Statistics
------------------
Generated Benchmarks:
- **Term Types**: 0
- **Taxonomic Relations**: 126
- **Taxonomic Relations**: 65
- **Non-taxonomic Relations**: 4
- **Average Terms per Type**: 0.00

Expand All @@ -59,7 +59,7 @@ Usage Example

# Initialize and load ontology
ontology = ICON()
ontology.load("path/to/ontology.owl")
ontology.load("path/to/ontology.OWL")

# Extract datasets
data = ontology.extract()
Expand Down
Loading