{"id":15460546,"url":"https://github.com/izuna385/jel","last_synced_at":"2025-04-22T10:43:44.152Z","repository":{"id":48459361,"uuid":"345716105","full_name":"izuna385/jel","owner":"izuna385","description":"Japanese Entity Linker. ","archived":false,"fork":false,"pushed_at":"2021-07-25T04:01:46.000Z","size":49213,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-12T10:23:08.057Z","etag":null,"topics":["allennlp","entity-linking","jel","natural-language-processing","python","pytorch","question-answering","transformers"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/jel/","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/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":"2021-03-08T16:14:17.000Z","updated_at":"2024-05-29T08:06:32.000Z","dependencies_parsed_at":"2022-08-24T06:10:08.327Z","dependency_job_id":null,"html_url":"https://github.com/izuna385/jel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2Fjel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2Fjel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2Fjel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izuna385%2Fjel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izuna385","download_url":"https://codeload.github.com/izuna385/jel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230744789,"owners_count":18274001,"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","entity-linking","jel","natural-language-processing","python","pytorch","question-answering","transformers"],"created_at":"2024-10-01T23:22:30.082Z","updated_at":"2024-12-21T17:18:57.361Z","avatar_url":"https://github.com/izuna385.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"20%\" src=\"docs/jel-logo.png\"\u003e\u003c/p\u003e\n\n# jel: Japanese Entity Linker\n* jel - Japanese Entity Linker - is Bi-encoder based entity linker for japanese.\n\n# Usage\n* Currently, `link` and `question` methods are supported.\n\n## `el.link`\n* This returnes named entity and its candidate ones from Wikipedia titles.\n```python\nfrom jel import EntityLinker\nel = EntityLinker()\n\nel.link('今日は東京都のマックにアップルを買いに行き、スティーブジョブスとドナルドに会い、堀田区に引っ越した。')\n\u003e\u003e [\n    {\n        \"text\": \"東京都\",\n        \"label\": \"GPE\",\n        \"span\": [\n            3,\n            6\n        ],\n        \"predicted_normalized_entities\": [\n            [\n                \"東京都庁\",\n                0.1084\n            ],\n            [\n                \"東京\",\n                0.0633\n            ],\n            [\n                \"国家地方警察東京都本部\",\n                0.0604\n            ],\n            [\n                \"東京都\",\n                0.0598\n            ],\n            ...\n        ]\n    },\n    {\n        \"text\": \"アップル\",\n        \"label\": \"ORG\",\n        \"span\": [\n            11,\n            15\n        ],\n        \"predicted_normalized_entities\": [\n            [\n                \"アップル\",\n                0.2986\n            ],\n            [\n                \"アップル インコーポレイテッド\",\n                0.1792\n            ],\n            …\n        ]\n    }\n```\n\n## `el.question`\n* This returnes candidate entity for any question from Wikipedia titles.\n```python\n\u003e\u003e\u003e linker.question('日本の総理大臣は？')\n[('菅内閣', 0.05791765857101555), ('枢密院', 0.05592481946602986), ('党', 0.05430194711042564), ('総選挙', 0.052795400668513175)]\n```\n\n## Setup\n```\n$ pip install jel\n$ python -m spacy download ja_core_news_md\n```\n\n## Run as API\n```\n$ uvicorn jel.api.server:app --reload --port 8000 --host 0.0.0.0 --log-level trace\n```\n\n### Example\n```\n# link\n$ curl localhost:8000/link -X POST -H \"Content-Type: application/json\" \\\n    -d '{\"sentence\": \"日本の総理は菅総理だ。\"}'\n\n# question\n$ curl localhost:8000/question -X POST -H \"Content-Type: application/json\" \\\n    -d '{\"sentence\": \"日本で有名な総理は？\"}\n```\n\n## Test\n`$ python pytest`\n\n## Notes\n* faiss==1.5.3 from pip causes error _swigfaiss. \n* To solve this, see [this issue](https://github.com/facebookresearch/faiss/issues/821#issuecomment-573531694).\n\n## LICENSE\nApache 2.0 License.\n\n## CITATION\n```\n@INPROCEEDINGS{manabe2019chive,\n    author    = {真鍋陽俊, 岡照晃, 海川祥毅, 髙岡一馬, 内田佳孝, 浅原正幸},\n    title     = {複数粒度の分割結果に基づく日本語単語分散表現},\n    booktitle = \"言語処理学会第25回年次大会(NLP2019)\",\n    year      = \"2019\",\n    pages     = \"NLP2019-P8-5\",\n    publisher = \"言語処理学会\",\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizuna385%2Fjel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizuna385%2Fjel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizuna385%2Fjel/lists"}