{"id":49338721,"url":"https://github.com/sciknoworg/OntoAligner","last_synced_at":"2026-05-13T12:00:51.827Z","repository":{"id":265281539,"uuid":"866078155","full_name":"sciknoworg/OntoAligner","owner":"sciknoworg","description":"OntoAligner: A Python Toolkit for Ontology Alignment https://pypi.org/project/OntoAligner/","archived":false,"fork":false,"pushed_at":"2026-03-22T11:42:53.000Z","size":2376,"stargazers_count":66,"open_issues_count":17,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-28T16:05:59.460Z","etag":null,"topics":["large-language-models","ontology","ontology-alignment","ontology-engineering","ontology-matching","python-library"],"latest_commit_sha":null,"homepage":"https://ontoaligner.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sciknoworg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-01T15:58:53.000Z","updated_at":"2026-03-21T09:16:32.000Z","dependencies_parsed_at":"2024-12-17T22:32:18.954Z","dependency_job_id":"382e2318-bd22-46db-9859-0d58df6e56cb","html_url":"https://github.com/sciknoworg/OntoAligner","commit_stats":null,"previous_names":["sciknoworg/ontoaligner"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/sciknoworg/OntoAligner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciknoworg%2FOntoAligner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciknoworg%2FOntoAligner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciknoworg%2FOntoAligner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciknoworg%2FOntoAligner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sciknoworg","download_url":"https://codeload.github.com/sciknoworg/OntoAligner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciknoworg%2FOntoAligner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32981543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T11:31:52.688Z","status":"ssl_error","status_checked_at":"2026-05-13T11:31:52.072Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["large-language-models","ontology","ontology-alignment","ontology-engineering","ontology-matching","python-library"],"created_at":"2026-04-27T03:00:20.681Z","updated_at":"2026-05-13T12:00:51.819Z","avatar_url":"https://github.com/sciknoworg.png","language":"Python","funding_links":[],"categories":["Alignment \u0026 Matching"],"sub_categories":["Vocabularies"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/sciknoworg/OntoAligner/main/images/logo-with-background.png\" alt=\"OntoAligner Logo\"/\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![PyPI version](https://badge.fury.io/py/OntoAligner.svg)](https://badge.fury.io/py/OntoAligner)\n[![PyPI Downloads](https://static.pepy.tech/badge/ontoaligner)](https://pepy.tech/projects/ontoaligner)\n![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![Documentation Status](https://readthedocs.org/projects/ontoaligner/badge/?version=main)](https://ontoaligner.readthedocs.io/)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](MAINTANANCE.md)\n [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14533133.svg)](https://doi.org/10.5281/zenodo.14533133)\n\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003eOntoAligner: A Comprehensive Modular and Robust Python Toolkit for Ontology Alignment\u003c/h3\u003e\n\n**OntoAligner** is a Python library designed to simplify ontology alignment and matching for researchers, practitioners, and developers. With a modular architecture and robust features, OntoAligner provides powerful tools to bridge ontologies effectively.\n\n📘 **Explore the OntoAligner tutorial [here](tutorial/README.md).**\n\n## 🧪 Installation\n\nYou can install **OntoAligner** from PyPI using `pip`:\n\n```bash\npip install ontoaligner\n```\n\nAlternatively, to get the latest version directly from the source, use the following commands:\n\n```bash\ngit clone git@github.com:sciknoworg/OntoAligner.git\npip install ./ontoaligner\n```\n\nNext, verify the installation:\n\n```python\nimport ontoaligner\n\nprint(ontoaligner.__version__)\n```\n\n## 📚 Documentation\n\nComprehensive documentation for OntoAligner, including detailed guides and examples, is available at **[ontoaligner.readthedocs.io](https://ontoaligner.readthedocs.io/)**. Below are some key tutorials with links to both the documentation and the corresponding example codes.\n\n\n\n| Example                        | Tutorial                                                                                                |                                            Script                                             |\n|:-------------------------------|:--------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------:|\n| Lightweight                    | [📚 Fuzzy Matching](https://ontoaligner.readthedocs.io/aligner/lightweight.html)                        |   [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/fuzzy_matching.py)   |\n| Retrieval                      | [📚 Retrieval Aligner](https://ontoaligner.readthedocs.io/aligner/retriever.html)                       | [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/retriever_matching.py) |\n| Large Language Models          | [📚 LLM Aligner](https://ontoaligner.readthedocs.io/aligner/llm.html)                                   |    [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/llm_matching.py)    |\n| Retrieval Augmented Generation | [📚 RAG Aligner](https://ontoaligner.readthedocs.io/aligner/rag.html)                                   |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/rag_matching.py)|\n| FewShot                        | [📚 FewShot-RAG Aligner](https://ontoaligner.readthedocs.io/aligner/rag.html#fewshot-rag)               |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/rag_matching.py)\n| In-Context Vectors Learning    | [📚 In-Context Vectors RAG](https://ontoaligner.readthedocs.io/aligner/rag.html#in-context-vectors-rag) |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/icv_rag_matching.py)\n| Knowledge Graph Embedding      | [📚 KGE Aligner](https://ontoaligner.readthedocs.io/aligner/kge.html)                                   |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/kge.py)\n| Property Alignment             | [📚 PropMatch Aligner](https://ontoaligner.readthedocs.io/aligner/propmatch.html)                       |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/main/examples/property_alignment)\n| eCommerce  | [📚 Product Alignment in eCommerce](https://ontoaligner.readthedocs.io/usecases/ecommerce.html)                  |       [📝 Code](https://github.com/sciknoworg/OntoAligner/blob/dev/examples/ecommerce_product_alignment.py)\n\n## 🚀 Quick Tour\n\nBelow is an example of using Retrieval-Augmented Generation (RAG) step-by-step approach for ontology matching:\n\n```python\nfrom ontoaligner.ontology import MaterialInformationMatOntoOMDataset\nfrom ontoaligner.utils import metrics, xmlify\nfrom ontoaligner.aligner import MistralLLMBERTRetrieverRAG\nfrom ontoaligner.encoder import ConceptParentRAGEncoder\nfrom ontoaligner.postprocess import rag_hybrid_postprocessor\n\n# Step 1: Initialize the dataset object for MaterialInformation MatOnto dataset\ntask = MaterialInformationMatOntoOMDataset()\nprint(\"Test Task:\", task)\n\n# Step 2: Load source and target ontologies along with reference matchings\ndataset = task.collect(\n    source_ontology_path=\"assets/MI-MatOnto/mi_ontology.xml\",\n    target_ontology_path=\"assets/MI-MatOnto/matonto_ontology.xml\",\n    reference_matching_path=\"assets/MI-MatOnto/matchings.xml\"\n)\n\n# Step 3: Encode the source and target ontologies\nencoder_model = ConceptParentRAGEncoder()\nencoded_ontology = encoder_model(source=dataset['source'], target=dataset['target'])\n\n# Step 4: Define configuration for retriever and LLM\nretriever_config = {\"device\": 'cuda', \"top_k\": 5}\nllm_config = {\"device\": \"cuda\", \"max_length\": 300, \"max_new_tokens\": 10, \"batch_size\": 15}\n\n# Step 5: Initialize Generate predictions using RAG-based ontology matcher\nmodel = MistralLLMBERTRetrieverRAG(retriever_config=retriever_config, llm_config=llm_config)\nmodel.load(llm_path = \"mistralai/Mistral-7B-v0.3\", ir_path=\"all-MiniLM-L6-v2\")\npredicts = model.generate(input_data=encoded_ontology)\n\n# Step 6: Apply hybrid postprocessing\nhybrid_matchings, hybrid_configs = rag_hybrid_postprocessor(predicts=predicts,\n                                                            ir_score_threshold=0.1,\n                                                            llm_confidence_th=0.8)\n\nevaluation = metrics.evaluation_report(predicts=hybrid_matchings, references=dataset['reference'])\nprint(\"Hybrid Matching Evaluation Report:\", evaluation)\n\n# Step 7: Convert matchings to XML format and save the XML representation\nxml_str = xmlify.xml_alignment_generator(matchings=hybrid_matchings)\nopen(\"matchings.xml\", \"w\", encoding=\"utf-8\").write(xml_str)\n```\n\nOntology alignment pipeline using RAG method:\n\n```python\nimport ontoaligner\n\npipeline = ontoaligner.OntoAlignerPipeline(\n    task_class=ontoaligner.ontology.MouseHumanOMDataset,\n    source_ontology_path=\"assets/MI-MatOnto/mi_ontology.xml\",\n    target_ontology_path=\"assets/MI-MatOnto/matonto_ontology.xml\",\n    reference_matching_path=\"assets/MI-MatOnto/matchings.xml\"\n)\n\nmatchings, evaluation = pipeline(\n    method=\"rag\",\n    encoder_model=ontoaligner.encoder.ConceptRAGEncoder(),\n    model_class=ontoaligner.aligner.MistralLLMBERTRetrieverRAG,\n    postprocessor=ontoaligner.postprocess.rag_hybrid_postprocessor,\n    llm_path='mistralai/Mistral-7B-v0.3',\n    retriever_path='all-MiniLM-L6-v2',\n    llm_threshold=0.5,\n    ir_rag_threshold=0.7,\n    top_k=5,\n    max_length=512,\n    max_new_tokens=10,\n    device='cuda',\n    batch_size=32,\n    return_matching=True,\n    evaluate=True\n)\n\nprint(\"Matching Evaluation Report:\", evaluation)\n```\n## 👥 Contact \u0026 Contributions\n\nWe welcome contributions to enhance OntoAligner and make it even better! Please review our contribution guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) before getting started. You are also welcome to assist with the ongoing maintenance by referring to [MAINTENANCE.md](MAINTENANCE.md). Your support is greatly appreciated.\n\n\nIf you encounter any issues or have questions, please submit them in the [GitHub issues tracker](https://github.com/sciknoworg/OntoAligner/issues).\n\n\n## 📚 Citing this Work\n\nIf you use OntoAligner in your work or research, please cite the following preprint:\n\n- OntoAligner Library:\n    \u003e Babaei Giglou, H., D’Souza, J., Karras, O., Auer, S. (2025). OntoAligner: A Comprehensive Modular and Robust Python Toolkit for Ontology Alignment. In: Curry, E., et al. The Semantic Web. ESWC 2025. Lecture Notes in Computer Science, vol 15719. Springer, Cham. https://doi.org/10.1007/978-3-031-94578-6_10\n\n    📌 BibTeX\n    ```bibtex\n    @InProceedings{10.1007/978-3-031-94578-6_10,\n        author=\"Babaei Giglou, Hamed and D'Souza, Jennifer and Karras, Oliver and Auer, S{\\\"o}ren\",\n        editor=\"Curry, Edward and Acosta, Maribel and Poveda-Villal{\\'o}n, Maria and van Erp, Marieke and Ojo, Adegboyega and Hose, Katja and Shimizu, Cogan and Lisena, Pasquale\",\n        title=\"OntoAligner: A Comprehensive Modular and Robust Python Toolkit for Ontology Alignment\",\n        booktitle=\"The Semantic Web\",\n        year=\"2025\",\n        publisher=\"Springer Nature Switzerland\",\n        address=\"Cham\",\n        pages=\"174--191\"\n    }\n    ```\n\n- LLMs4OM (for RAG module)\n    \u003e   Babaei Giglou, H., D’Souza, J., Engel, F., Auer, S. (2025). LLMs4OM: Matching Ontologies with Large Language Models. In: Meroño Peñuela, A., et al. The Semantic Web: ESWC 2024 Satellite Events. ESWC 2024. Lecture Notes in Computer Science, vol 15344. Springer, Cham. https://doi.org/10.1007/978-3-031-78952-6_3\n\n    📌 BibTeX\n    ```bibtex\n    @InProceedings{10.1007/978-3-031-78952-6_3,\n      author=\"Babaei Giglou, Hamed and D'Souza, Jennifer and Engel, Felix and Auer, S{\\\"o}ren\",\n      editor=\"Mero{\\~{n}}o Pe{\\~{n}}uela, Albert and Corcho, Oscar and Groth, Paul and Simperl, Elena and Tamma, Valentina and Nuzzolese, Andrea Giovanni and Poveda-Villal{\\'o}n, Maria and Sabou, Marta and Presutti, Valentina and Celino, Irene and Revenko, Artem and Raad, Joe and Sartini, Bruno and Lisena, Pasquale\",\n      title=\"LLMs4OM: Matching Ontologies with Large Language Models\",\n      booktitle=\"The Semantic Web: ESWC 2024 Satellite Events\",\n      year=\"2025\",\n      publisher=\"Springer Nature Switzerland\",\n      address=\"Cham\",\n      pages=\"25--35\",\n      isbn=\"978-3-031-78952-6\"\n      }\n    ```\n\n## 📃 License\n\nThis software is licensed under [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0).\n\n[//]: # (This work is licensed under a MIT License)\n[//]: # (is archived in Zenodo under the DOI [![DOI]\u0026#40;https://zenodo.org/badge/DOI/10.5281/zenodo.14533133.svg\u0026#41;]\u0026#40;https://doi.org/10.5281/zenodo.14533133\u0026#41; and )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciknoworg%2FOntoAligner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsciknoworg%2FOntoAligner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciknoworg%2FOntoAligner/lists"}