Skip to content

Commit a20920f

Browse files
committed
✏️ kge docs minor fix
1 parent 05f3a71 commit a20920f

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/source/aligner/kge.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ OntoAligner's KGE-based alignment process involves several key components that w
2626

2727
Usage
2828
------------
29+
30+
.. sidebar::
31+
32+
Full code is available at `OntoAligner Repository. <https://github.com/sciknoworg/OntoAligner/blob/main/examples/kge.py>`_
33+
34+
2935
This module guides you through a step-by-step process for performing ontology alignment using a KGEs and the OntoAligner library. By the end, you’ll understand how to preprocess data, encode ontologies, generate alignments, evaluate results, and save the outputs in XML and JSON formats.
3036

37+
3138
.. tab:: ➡️ 1: Parser
3239

3340
The first step is to prepare the ontology data for the KGE model. The **Parser** transforms raw ontology information into a structured format suitable for KGE models.
@@ -86,7 +93,7 @@ This module guides you through a step-by-step process for performing ontology al
8693

8794
.. code-block:: python
8895
89-
from ontoaligner.aligner import CovEAligner
96+
from ontoaligner.aligner import ConvEAligner
9097
9198
kge_params = {
9299
'device': 'cpu', # str: Device to use for training ('cpu' or 'cuda')
@@ -124,7 +131,9 @@ This module guides you through a step-by-step process for performing ontology al
124131

125132
The following code will compare the generated alignments with reference matchings. Then save the matchings in both XML and JSON formats for further analysis or use. Feel free to use any of the techniques.
126133

127-
.. code-block::
134+
.. code-block:: python
135+
136+
from ontoaligner.utils import metrics
128137
129138
evaluation = metrics.evaluation_report(predicts=matchings, references=dataset['reference'])
130139
print("Matching Evaluation Report:\n", evaluation)
@@ -151,9 +160,17 @@ This module guides you through a step-by-step process for performing ontology al
151160
json.dump(processed_matchings, json_file, indent=4, ensure_ascii=False)
152161
::
153162

163+
164+
165+
166+
167+
168+
154169
KGE Aligners
155170
----------------------
156171

172+
173+
157174
The ``ontoaligner.aligner.graph`` module provides a suite of graph embedding-based aligners built on top of popular KGE models. These aligners leverage link prediction objectives and low-dimensional vector spaces to learn semantic representations of entities, facilitating accurate ontology alignment even across heterogeneous structures. Each aligner wraps a specific KGE model implemented through the PyKEEN framework, allowing plug-and-play integration and consistent similarity scoring across models. Some models include custom similarity functions to better capture semantic distance in complex embedding spaces (e.g., complex numbers or quaternions).
158175

159176
The following table lists the available KGE aligners:

0 commit comments

Comments
 (0)