{"id":22213280,"url":"https://github.com/benhid/logmap-embeddings","last_synced_at":"2025-09-03T02:42:42.747Z","repository":{"id":41066623,"uuid":"506510550","full_name":"benhid/logmap-embeddings","owner":"benhid","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-28T05:39:40.000Z","size":28534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:23:50.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benhid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-23T05:39:01.000Z","updated_at":"2022-06-28T05:47:48.000Z","dependencies_parsed_at":"2022-08-26T09:20:26.690Z","dependency_job_id":null,"html_url":"https://github.com/benhid/logmap-embeddings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benhid/logmap-embeddings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhid%2Flogmap-embeddings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhid%2Flogmap-embeddings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhid%2Flogmap-embeddings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhid%2Flogmap-embeddings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benhid","download_url":"https://codeload.github.com/benhid/logmap-embeddings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhid%2Flogmap-embeddings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273381913,"owners_count":25095327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-02T21:09:15.774Z","updated_at":"2025-09-03T02:42:42.702Z","avatar_url":"https://github.com/benhid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogMap-ML Embeddings\n\n[![DOI](https://img.shields.io/badge/DOI-10.1007%2F978--3--030--77385--4__23-blue)](https://openaccess.city.ac.uk/id/eprint/25810/1/ESWC2021_ontology_alignment_LogMap_ML.pdf)\n![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n\u003e Work in Progress!\n\nCheck out the parent project [LogMap matcher](https://github.com/ernestojimenezruiz/logmap-matcher/).\n\n## Get started\n\n### Setup \n\n```console\n$ python3 -m venv .venv\n\n$ source .venv/bin/activate\n\n$ python -m pip install -r requirements.txt\n```\n\n### Usage\n\n#### Pre-process: Run the original system\n\nRun LogMap 4.0:\n\n```console\n$ mkdir logmap_output_oaei_22_bioml\n\n$ java -jar logmap/logmap-matcher-4.0.jar MATCHER \\\n   file:$(pwd)/use_cases/oaei_22_bioml/fma.body.owl file:$(pwd)/use_cases/oaei_22_bioml/snomed.body.owl $(pwd)/logmap_output_oaei_22_bioml/ true\n```\n\nThis leads to LogMap initial set of candidate mappings or _anchors_\n(\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\mathcal{M}_a\"\u003e)\nand\nover-estimation class mappings\n(\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\mathcal{M}_o\"\u003e).\n\n#### Get Embedding Models\n\nYou can either download the word2vec embedding by gensim (the one trained with a corpus of Wikipedia articles from 2018-[download](https://drive.google.com/file/d/1rm9uJEKG25PJ79zxbZUWuaUroWeoWbFR/view?usp=sharing)) or use the ontology-tailored [OWL2Vec\\*](https://github.com/KRR-Oxford/OWL2Vec-Star) embedding. The ontologies use one common embedding model.\n\n```bash\n$ python deepwalk.py use_cases/oaei_22_bioml/merged_with_mappings.owl --walk-number 10 --walk-length 2 --output deepwalk_model/\n```\n\n#### Prepare Dataset\n\nUse the provided [standalone](standalone.py) script:\n\n```bash\n$ python standalone.py --cache-dir cache_standalone-dist_bioml --config default_bioml.cfg \n```\n\nLogMap-ML will extract the class labels for each class in both ontologies and generate high-confidence train mappings\n(_seed mappings_ \u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\mathcal{M}_s\"\u003e)\nfor training.\n\nIt will also create a samples dataset from a set of high recall candidate mappings (LogMap’s over-estimation mappings \u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\mathcal{M}_o\"\u003e) for evaluation.\n\n#### Evaluate\n\nAssuming that gold standards (complete ground truth mappings) are given, Precision and Recall can be directly calculated by:\n\n```bash\n$ python evaluate.py --cache-dir cache_standalone-dist_bioml/ --reference use_cases/oaei_22_bioml/reference.txt --distances cache_standalone-dist_bioml/distances.txt --mappings logmap_output_oaei_22_bioml/logmap2_mappings.txt\n```\n\n## Publications\n\n* Jiaoyan Chen, Ernesto Jimenez-Ruiz, Ian Horrocks, Denvar Antonyrajah, Ali Hadian, Jaehun Lee. **Augmenting Ontology Alignment by Semantic Embedding and Distant Supervision**. European Semantic Web Conference, ESWC 2021. ([PDF](https://openaccess.city.ac.uk/id/eprint/25810/1/ESWC2021_ontology_alignment_LogMap_ML.pdf))\n\n## License\n\nThis project is licensed under the terms of the MIT - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhid%2Flogmap-embeddings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenhid%2Flogmap-embeddings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhid%2Flogmap-embeddings/lists"}