Multilingual Entity Linking model by BELA model
Project description
MultiEL
Multilingual Entity Linking model by BELA model
This project want to create easy-to-use Multilingual Entity Linking model by BELA model.
Origin Project
- Bi-encoder Entity Linking Architecture (BELA): https://github.com/facebookresearch/BELA
Install
pip install multiel
Usage
from multiel import BELA
bela_run = BELA(device="cuda")
print(bela_run.process_batch(["นายกประยุทธ์ประกาศจัดการเลือกตั้ง"]))
output:
[{'offsets': [0], 'lengths': [12], 'entities': ['Q2108126'], 'md_scores': [0.22365164756774902], 'el_scores': [0.6967974901199341]}]
API
from multiel import BELA
BELA(
md_threshold:float=0.2,
el_threshold:float=0.4,
checkpoint_name: str="wiki",
device: str="cuda:0",
config_name:str="joint_el_mel_new",
repo:str="wannaphong/BELA"
)
- md_threshold: md threshold
- el_threshold: Entity Linking threshold
- checkpoint_name: checkpoint name (wiki, aida, mewsli, and e2e) or your file name with extension
- device: device
- config_name: config name (in the BELA project)
- repo: Huggingface Hub repo (Default wannaphong/BELA)
Predict
BELA.process_batch([str, str])
License
MIT license and the model is MIT license. (BELA is MIT licensed)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MultiEL-0.5.tar.gz
(4.1 MB
view details)
Built Distribution
MultiEL-0.5-py3-none-any.whl
(4.2 MB
view details)
File details
Details for the file MultiEL-0.5.tar.gz
.
File metadata
- Download URL: MultiEL-0.5.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aee992a50cb1632323bc327288f4f6c14e444f12cb7af4dd5f1790641e82718 |
|
MD5 | b80dec996a94c97ed11a7955b0f522a4 |
|
BLAKE2b-256 | 497947ab743a239de6ff22795b884aff8be8e1029aa9b66aea58d538420e20af |
File details
Details for the file MultiEL-0.5-py3-none-any.whl
.
File metadata
- Download URL: MultiEL-0.5-py3-none-any.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c036e85f7f048339bdcdcf8401beca484351bbf9440d80cbf5ac8000ec465ec2 |
|
MD5 | 7e413b4676f07ef0faf3030b8723df87 |
|
BLAKE2b-256 | 9a5753c07bf769067c8ebdb352d356fa75040aa7a91226aca4504e6c07ad9767 |