CoolFace
Modelpublic

Babelscape/wsl-reader-deberta-v3-base

sourceHugging Facecc-by-nc-sa-4.0updated 2y agoView on Hugging Face
4likes474downloads
Model Card

Word Sense Linking: Disambiguating Outside the Sandbox

![Conference](https://2024.aclweb.org/) ![Paper](https://aclanthology.org/2024.findings-acl.851/) ![Hugging Face Collection](https://huggingface.co/collections/Babelscape/word-sense-linking-66ace2182bc45680964cefcb) ![GitHub](https://github.com/Babelscape/WSL)

Model Description

The Word Sense Linking model is designed to identify and disambiguate spans of text to their most suitable senses from a reference inventory. The annotations are provided as sense keys from WordNet, a large lexical database of English.

Installation

Installation from PyPI:

bash
git clone https://github.com/Babelscape/WSL
cd WSL
pip install -r requirements.txt

Usage

WSL is composed of two main components: a retriever and a reader. The retriever is responsible for retrieving relevant senses from a senses inventory (e.g WordNet), while the reader is responsible for extracting spans from the input text and link them to the retrieved documents. WSL can be used with the from_pretrained method to load a pre-trained pipeline.

python
from wsl import WSL
from wsl.inference.data.objects import WSLOutput

wsl_model = WSL.from_pretrained("Babelscape/wsl-base")
relik_out: WSLOutput = wsl_model("Bus drivers drive busses for a living.")

WSLOutput( text='Bus drivers drive busses for a living.', tokens=['Bus', 'drivers', 'drive', 'busses', 'for', 'a', 'living', '.'], id=0, spans=[ Span(start=0, end=11, label='bus driver: someone who drives a bus', text='Bus drivers'), Span(start=12, end=17, label='drive: operate or control a vehicle', text='drive'), Span(start=18, end=24, label='bus: a vehicle carrying many passengers; used for public transport', text='busses'), Span(start=31, end=37, label='living: the financial means whereby one lives', text='living') ], candidates=Candidates( candidates=[ {"text": "bus driver: someone who drives a bus", "id": "bus_driver%1:18:00::", "metadata": {}}, {"text": "driver: the operator of a motor vehicle", "id": "driver%1:18:00::", "metadata": {}}, {"text": "driver: someone who drives animals that pull a vehicle", "id": "driver%1:18:02::", "metadata": {}}, {"text": "bus: a vehicle carrying many passengers; used for public transport", "id": "bus%1:06:00::", "metadata": {}}, {"text": "living: the financial means whereby one lives", "id": "living%1:26:00::", "metadata": {}} ] ), )

Model Performance

Here you can find the performances of our model on the WSL evaluation dataset.

Validation (SE07)

ModelsPRF1
BEM_SUP67.640.951.0
BEM_HEU70.851.259.4
ConSeC_SUP76.446.557.8
ConSeC_HEU76.755.464.3
Our Model73.874.974.4

Test (ALL_FULL)

ModelsPRF1
BEM_SUP74.850.760.4
BEM_HEU76.661.268.0
ConSeC_SUP78.953.163.5
ConSeC_HEU80.464.371.5
Our Model75.276.775.9

Additional Information

Licensing Information: Contents of this repository are restricted to only non-commercial research purposes under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). Copyright of the dataset contents belongs to Babelscape. Arxiv Paper: Word Sense Linking: Disambiguating Outside the Sandbox

Citation Information

bibtex
@inproceedings{bejgu-etal-2024-wsl,
    title     = "Word Sense Linking: Disambiguating Outside the Sandbox",
    author    = "Bejgu, Andrei Stefan and Barba, Edoardo and Procopio, Luigi and Fern{\'a}ndez-Castro, Alberte and Navigli, Roberto",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
    month     = aug,
    year      = "2024",
    address   = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
}

Contributions: Thanks to @andreim14, @edobobo, @poccio and @navigli for adding this model.