andreim14 commited on
Commit
d34d209
1 Parent(s): 6b95e98

Update README.md

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