{"id":15460465,"url":"https://github.com/izuna385/zero-shot-entity-linking","last_synced_at":"2025-04-22T10:37:11.172Z","repository":{"id":54152236,"uuid":"284029605","full_name":"izuna385/Zero-Shot-Entity-Linking","owner":"izuna385","description":"Zero-shot Entity Linking with blitz start in 3 minutes. Hard negative mining and encoder for all entities are also included in this implementation.","archived":false,"fork":false,"pushed_at":"2023-06-12T21:28:34.000Z","size":217,"stargazers_count":31,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T10:36:40.905Z","etag":null,"topics":["allennlp","approximate-nearest-neighbor-search","bert","entity-linking","faiss","natural-language-processing","zero-shot-learning","zero-shot-retrieval"],"latest_commit_sha":null,"homepage":"","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/izuna385.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":"2020-07-31T12:16:27.000Z","updated_at":"2024-08-05T05:30:08.000Z","dependencies_parsed_at":"2022-08-13T07:40:52.663Z","dependency_job_id":null,"html_url":"https://github.com/izuna385/Zero-Shot-Entity-Linking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2FZero-Shot-Entity-Linking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2FZero-Shot-Entity-Linking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2FZero-Shot-Entity-Linking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2FZero-Shot-Entity-Linking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izuna385","download_url":"https://codeload.github.com/izuna385/Zero-Shot-Entity-Linking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221871,"owners_count":21394778,"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","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":["allennlp","approximate-nearest-neighbor-search","bert","entity-linking","faiss","natural-language-processing","zero-shot-learning","zero-shot-retrieval"],"created_at":"2024-10-01T23:22:00.133Z","updated_at":"2025-04-22T10:37:11.124Z","avatar_url":"https://github.com/izuna385.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dual-Encoder-Based Zero-Shot Entity Linking\n## Quick Starts in 3 minutes\n\n```\ngit clone https://github.com/izuna385/Zero-Shot-Entity-Linking.git\ncd Zero-Shot-Entity-Linking\npython -m spacy download en_core_web_sm\n\n# ~ Multiprocessing Sentence Boundary Detection takes about 2 hours under 8 core CPUs.\nsh preprocessing.sh\npython3 ./src/train.py -num_epochs 1\n```\nFor further speednizing to check entire script, run the following command.\n\n`python3 ./src/train.py -num_epochs 1 -debug True`\n\nalso, multi-gpu is supported.\n\n`CUDA_VISIBLE_DEVICES=0,1 python3 ./src/train.py -num_epochs 1 -cuda_devices 0,1`\n\n## Descriptions\n\n* This experiments aim to confirm whether fine-tuning pretraind BERT (more specifically, encoders for mention and entity) is effective even to the unknown domains.\n\n  * Following [[Logeswaran et al., '19]](https://github.com/lajanugen/zeshel), entities are not shared between train-dev and train-test.\n\n  * If you are interested in what this repository does, see the original paper, or unofficial slides.\n\n    * [Original paper](https://arxiv.org/abs/1911.03814)\n\n    * [Unofficial slides](https://speakerdeck.com/izuna385/zero-shot-entity-linking-with-dense-entity-retrieval-unofficial-slides-and-entity-linking-future-directions)\n\n# Requirements\n* `torch`,`allennlp`,`transformers`, and `faiss` are required. See also `requirements.txt`.\n\n* ~3 GB CPU and ~1.1GB GPU are necessary for running script.\n\n# How to run experiments\n\n## 1. Preprocessing\n\n* Run `sh preprocessing.sh` at this directory.\n\n  * The Datasets are derived from [[Logeswaran et al., '19]](https://github.com/lajanugen/zeshel).\n\n## 2. Training and Evaluate Bi-Encoder Model\n\n* `python3 ./src/train.py`\n\n  * This script trains encoder for mention and entity.\n\n  []()\n  \u003cdiv align=\"center\"\u003e\u003cimg src=\"./img/dual_encoder.png\" width=70%\u003e\u003c/div\u003e\n\n## 3. Logging Each Experiment\n\n* See `./src/experiment_logdir/`.\n\n  * Log directory is named after when the experiment starts.\n\n\n## TODO\n\n* Preprocess with more strict sentence boundary.\n\n# LICENSE\n\n* MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizuna385%2Fzero-shot-entity-linking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizuna385%2Fzero-shot-entity-linking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizuna385%2Fzero-shot-entity-linking/lists"}