Awesome
OWL2Vec4OA
OWL2Vec4OA by Sevinj Teymurova
OWL2Vec4OA: Tailoring Knowledge Graph Embeddings for Ontology Alignment
Features
OWL2Vec4OA is an extension of the ontology embedding system OWL2Vec* which exposes a CLI with two subcommands after installation, which allows you to perform two main programs.
You can also run the two original python programs without installation (see the requirements in setup.py <https://github.com/KRR-Oxford/OWL2Vec-Star/blob/master/setup.py>
__).
Installation command::
$ make install
Standalone
This command will embed two ontologies and their corresponding mappings. It can be configured by the configuration file default1.cfg. See the examples and comments in default1.cfg for the usage.
Running program::
Option 1
- Install Python 3: https://python.org/downloads
- Install setuptools: https://pypi.org/project/setuptools
- Run this command in the terminal:
$ python setup.py install
- Run this command in the terminal:
$ python OWL2Vec_Standalone1.py --config_file default1.cfg
Option 2
- Install Python 3: https://python.org/downloads
- Install pip: https://pip.pypa.io/en/stable/installation
- Install library dependicies in requirements: pip install -r requirements_owl2vec.txt
- Run jupyter notebook:
jupyter_notebook_owl2vec4oa.ipynb
Note: Different from the experimental codes, the standalone command has implemented all OWL ontology relevant procedures in python with Owlready, but it also allows the user to use pre-calculated annotations/axioms/entities/projection to generate the corpus.
Parameters to change when running the code with help of configuration file
- ontology_file1
- ontology_file2
- mapping
- confidence_threshold
- seed_entities_on_mapping
- cache_dir
- walk_depth
Implementations
Code under:
OWL2Vec_Standalone1.py
andowl2vec4mappings.py
implements merging two ontologies into one single projection RDF graph, axiom/annotations/seed entities documents generation and model training. Note, the codeowl2vec4mappings.py
is used to compilejupyter_notebook_owl2vec4oa.ipynb
owl2vec_star/rdf2vec/graph.py
implements creating the Knowledge Graphowl2vec_star/lib/RDF2Vec_Embed.py
implements reading projection RDF graph, adding mapping entities and their confidence values into the Knowledge Graph(kg) to be able to extract walks for model training.owl2vec_star/rdf2vec/walkers/mapping4vec.py
implements bias sampling walking strategy over RDF graphsLogmapIntersectionAml.py
- implements Intersection of mappings produced by LogMap and AMLLogmapUnionAml.py
- implements Union of mappings produced by LogMap and AMLrdf2tsv.py
- RDF to TSVtxt2tsv.py
- TXT to TSV2023ns2nn_2.py
To run the code on HPC, using SNOMED2NCIT.NEOPLAS data with the configuration file `2023ns2nn_2.cfg. (version 0.0.1, last access: 07/2024) with revision.
Publications
-
Sevinj Teymurova, Ernesto Jimenez-Ruiz, Tillman Weyde, Jiaoyan Chen. OWL2Vec4OA: Tailoring Knowledge Graph Embeddings for Ontology Alignment. Submitted to a conference: arXiv.
-
Jiaoyan Chen, Pan Hu, Ernesto Jimenez-Ruiz, Ole Magnus Holter, Denvar Antonyrajah, and Ian Horrocks. OWL2Vec: Embedding of OWL ontologies*. Machine Learning, Springer, 2021. PDF Springer Collection Codes in package or folder
Case Studies
Experiments conducted on the OAEI's Bio-ML track.
Results
You can find the computed embeddings in our zenodo repository