Update README.md
Browse files
README.md
CHANGED
|
@@ -1,138 +1,144 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
- cc-by-nc-sa-4.0
|
| 4 |
-
source_datasets:
|
| 5 |
-
- original
|
| 6 |
-
task_ids:
|
| 7 |
-
- word-sense-disambiguation
|
| 8 |
-
pretty_name: word-sense-linking-dataset
|
| 9 |
-
tags:
|
| 10 |
-
- word-sense-linking
|
| 11 |
-
- word-sense-disambiguation
|
| 12 |
-
- lexical-semantics
|
| 13 |
-
size_categories:
|
| 14 |
-
- 10K<n<100K
|
| 15 |
-
extra_gated_fields:
|
| 16 |
-
Email: text
|
| 17 |
-
Company: text
|
| 18 |
-
Country: country
|
| 19 |
-
I want to use this dataset for:
|
| 20 |
-
type: select
|
| 21 |
-
options:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
I agree to use this dataset for non-commercial use ONLY: checkbox
|
| 27 |
-
extra_gated_heading:
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
from
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
|
| 111 |
-
|
| 112 |
-
|
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
**Contributions**: Thanks to [@andreim14](https://github.com/andreim14), [@edobobo](https://github.com/edobobo), [@poccio](https://github.com/poccio) and [@navigli](https://github.com/navigli) for adding this model.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license:
|
| 3 |
+
- cc-by-nc-sa-4.0
|
| 4 |
+
source_datasets:
|
| 5 |
+
- original
|
| 6 |
+
task_ids:
|
| 7 |
+
- word-sense-disambiguation
|
| 8 |
+
pretty_name: word-sense-linking-dataset
|
| 9 |
+
tags:
|
| 10 |
+
- word-sense-linking
|
| 11 |
+
- word-sense-disambiguation
|
| 12 |
+
- lexical-semantics
|
| 13 |
+
size_categories:
|
| 14 |
+
- 10K<n<100K
|
| 15 |
+
extra_gated_fields:
|
| 16 |
+
Email: text
|
| 17 |
+
Company: text
|
| 18 |
+
Country: country
|
| 19 |
+
I want to use this dataset for:
|
| 20 |
+
type: select
|
| 21 |
+
options:
|
| 22 |
+
- Research
|
| 23 |
+
- Education
|
| 24 |
+
- label: Other
|
| 25 |
+
value: other
|
| 26 |
+
I agree to use this dataset for non-commercial use ONLY: checkbox
|
| 27 |
+
extra_gated_heading: >-
|
| 28 |
+
Acknowledge our [Creative Commons Attribution-NonCommercial-ShareAlike 4.0
|
| 29 |
+
International License (CC BY-NC-SA
|
| 30 |
+
4.0)](https://github.com/Babelscape/WSL/wsl_data_license.txt) to access the
|
| 31 |
+
repository
|
| 32 |
+
extra_gated_description: Our team may take 2-3 days to process your request
|
| 33 |
+
extra_gated_button_content: Acknowledge license
|
| 34 |
+
datasets:
|
| 35 |
+
- Babelscape/wsl
|
| 36 |
+
---
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
# Word Sense Linking: Disambiguating Outside the Sandbox
|
| 41 |
+
|
| 42 |
+
[](https://2024.aclweb.org/)
|
| 43 |
+
[](https://aclanthology.org/)
|
| 44 |
+
[](https://huggingface.co/collections/Babelscape/word-sense-linking-66ace2182bc45680964cefcb)
|
| 45 |
+
|
| 46 |
+
## Model Description
|
| 47 |
+
|
| 48 |
+
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.
|
| 49 |
+
|
| 50 |
+
## Installation
|
| 51 |
+
|
| 52 |
+
Installation from PyPI:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
git clone https://github.com/Babelscape/WSL
|
| 56 |
+
cd WSL
|
| 57 |
+
pip install -r requirements.txt
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
## Usage
|
| 63 |
+
|
| 64 |
+
WSL is composed of two main components: a retriever and a reader.
|
| 65 |
+
The retriever is responsible for retrieving relevant senses from a senses inventory (e.g WordNet),
|
| 66 |
+
while the reader is responsible for extracting spans from the input text and link them to the retrieved documents.
|
| 67 |
+
WSL can be used with the `from_pretrained` method to load a pre-trained pipeline.
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
from wsl import WSL
|
| 71 |
+
from wsl.inference.data.objects import WSLOutput
|
| 72 |
+
|
| 73 |
+
wsl_model = WSL.from_pretrained("Babelscape/wsl-base")
|
| 74 |
+
relik_out: WSLOutput = wsl_model("Bus drivers drive busses for a living.")
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
WSLOutput(
|
| 78 |
+
text='Bus drivers drive busses for a living.',
|
| 79 |
+
tokens=['Bus', 'drivers', 'drive', 'busses', 'for', 'a', 'living', '.'],
|
| 80 |
+
id=0,
|
| 81 |
+
spans=[
|
| 82 |
+
Span(start=0, end=11, label='bus driver: someone who drives a bus', text='Bus drivers'),
|
| 83 |
+
Span(start=12, end=17, label='drive: operate or control a vehicle', text='drive'),
|
| 84 |
+
Span(start=18, end=24, label='bus: a vehicle carrying many passengers; used for public transport', text='busses'),
|
| 85 |
+
Span(start=31, end=37, label='living: the financial means whereby one lives', text='living')
|
| 86 |
+
],
|
| 87 |
+
candidates=Candidates(
|
| 88 |
+
candidates=[
|
| 89 |
+
{"text": "bus driver: someone who drives a bus", "id": "bus_driver%1:18:00::", "metadata": {}},
|
| 90 |
+
{"text": "driver: the operator of a motor vehicle", "id": "driver%1:18:00::", "metadata": {}},
|
| 91 |
+
{"text": "driver: someone who drives animals that pull a vehicle", "id": "driver%1:18:02::", "metadata": {}},
|
| 92 |
+
{"text": "bus: a vehicle carrying many passengers; used for public transport", "id": "bus%1:06:00::", "metadata": {}},
|
| 93 |
+
{"text": "living: the financial means whereby one lives", "id": "living%1:26:00::", "metadata": {}}
|
| 94 |
+
]
|
| 95 |
+
),
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
## Model Performance
|
| 101 |
+
|
| 102 |
+
Here you can find the performances of our model on the [WSL evaluation dataset](https://huggingface.co/datasets/Babelscape/wsl).
|
| 103 |
+
|
| 104 |
+
### Validation (SE07)
|
| 105 |
+
|
| 106 |
+
| Models | P | R | F1 |
|
| 107 |
+
|--------------|------|--------|--------|
|
| 108 |
+
| BEM_SUP | 67.6 | 40.9 | 51.0 |
|
| 109 |
+
| BEM_HEU | 70.8 | 51.2 | 59.4 |
|
| 110 |
+
| ConSeC_SUP | 76.4 | 46.5 | 57.8 |
|
| 111 |
+
| ConSeC_HEU | **76.7** | 55.4 | 64.3 |
|
| 112 |
+
| **Our Model**| 73.8 | **74.9** | **74.4** |
|
| 113 |
+
|
| 114 |
+
### Test (ALL_FULL)
|
| 115 |
+
|
| 116 |
+
| Models | P | R | F1 |
|
| 117 |
+
|--------------|------|--------|--------|
|
| 118 |
+
| BEM_SUP | 74.8 | 50.7 | 60.4 |
|
| 119 |
+
| BEM_HEU | 76.6 | 61.2 | 68.0 |
|
| 120 |
+
| ConSeC_SUP | 78.9 | 53.1 | 63.5 |
|
| 121 |
+
| ConSeC_HEU | **80.4** | 64.3 | 71.5 |
|
| 122 |
+
| **Our Model**| 75.2 | **76.7** | **75.9** |
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
## Additional Information
|
| 127 |
+
**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)](https://creativecommons.org/licenses/by-nc-sa/4.0/). Copyright of the dataset contents belongs to Babelscape.
|
| 128 |
+
|
| 129 |
+
## Citation Information
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
```bibtex
|
| 133 |
+
@inproceedings{bejgu-etal-2024-wsl,
|
| 134 |
+
title = "Word Sense Linking: Disambiguating Outside the Sandbox",
|
| 135 |
+
author = "Bejgu, Andrei Stefan and Barba, Edoardo and Procopio, Luigi and Fern{\'a}ndez-Castro, Alberte and Navigli, Roberto",
|
| 136 |
+
booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
|
| 137 |
+
month = aug,
|
| 138 |
+
year = "2024",
|
| 139 |
+
address = "Bangkok, Thailand",
|
| 140 |
+
publisher = "Association for Computational Linguistics",
|
| 141 |
+
}
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
**Contributions**: Thanks to [@andreim14](https://github.com/andreim14), [@edobobo](https://github.com/edobobo), [@poccio](https://github.com/poccio) and [@navigli](https://github.com/navigli) for adding this model.
|