OWL2Vec4OA by Sevinj Teymurova
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
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.
- 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
- 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
Code under:
OWL2Vec_Standalone1.pyandowl2vec4mappings.pyimplements merging two ontologies into one single projection RDF graph, axiom/annotations/seed entities documents generation and model training. Note, the codeowl2vec4mappings.pyis used to compilejupyter_notebook_owl2vec4oa.ipynbowl2vec_star/rdf2vec/graph.pyimplements creating the Knowledge Graphowl2vec_star/lib/RDF2Vec_Embed.pyimplements 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.pyimplements 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.pyTo 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.
-
Sevinj Teymurova, Ernesto Jimenez-Ruiz, Tillman Weyde, Jiaoyan Chen. OWL2Vec4OA: Tailoring Knowledge Graph Embeddings for Ontology Alignment. In 6th Knowledge Graph and Semantic Web Conference (long paper) & 19th Ontology Matching Workshop (poster paper). (PDF) (Slides) (GitHub)
-
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
Experiments conducted on the OAEI's Bio-ML track.
You can find the computed embeddings in our zenodo repository