Skip to content

Commit 2cef2d0

Browse files
committed
Update README and co
1 parent 983683d commit 2cef2d0

File tree

4 files changed

+36
-25
lines changed

4 files changed

+36
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HMTL (Hierarchical Multi-Task Learning model)
22

3-
*A Hierarchical Multi-Task Approach for Learning Embeddings from Semantic Tasks*\
3+
__A Hierarchical Multi-Task Approach for Learning Embeddings from Semantic Tasks__\
44
Victor SANH, Thomas WOLF, Sebastian RUDER\
55
AAAI 2019
66

demo/HMTL_demo.png

247 KB
Loading

demo/README.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,29 @@
22

33
## Introduction
44

5-
HuggingNLP is an open-source library for resolving four fundamental tasks in NLP, namely Named Entity Recognition, Entity Mention Detection, Relation Extraction and Coreference Resolution.
5+
HMTL is an open-source library for resolving four fundamental tasks in NLP, namely Named Entity Recognition, Entity Mention Detection, Relation Extraction and Coreference Resolution using multi-task learning.
66

7-
## Setup
7+
For a brief introduction to multi-task learning, you can refer to our blog post (LINK TO COME). Each of the four tasks considered is detailed in the following section.
88

9-
Adapt and launch `machine_setup.sh`.
9+
The web interface for the demo can be found here () for you to try and play with it. HMTL comes with the web visualization client if you prefer to run it on your own.
1010

11-
## Launch a server
11+
<img src="https://github.com/huggingface/hmtl/demo/blob/master/HMTL_demo.png" alt="HMTL Demo" width="600"/>
1212

13-
We also release three pre-trained HMTL models.
13+
## Setup
1414

15-
| Model Name | NER (F1) | EMD (F1) | RE (F1) | CR(F1 on CoNLL2012) |
16-
| --- | --- | --- | --- | --- |
17-
| conll_small_elmo | 85.73 | 83.51 | 58.40 | 62.85 |
18-
| conll_medium_elmo | 86.41 | 84.02 | 58.78 | 61.62 |
19-
| conll_full_elmo _(default model)_ | 86.40 | 85.59 | 61.37 | 62.26 |
15+
The demo (LINK TO COME) is based on Python 3.6 and [AllenNLP](https://github.com/allenai/allennlp).
2016

21-
To launch a specific model (please make sure to be in a valid environment before: `source pyhuggingnlp/bin/activate`):
17+
The easiest way to setup a clean and working environment with the necessary dependencies is to refer to the setup section in the [parent folder](https://github.com/huggingface/hmtl#dependecies-and-installation).
18+
A few supplementary dependecies are listed in `requirements.txt` and are required to run the demo.
2219

23-
```bash
24-
gunicorn -w 2 -b:8000 'server:build_app(model_name="<model_name>", mode="<demo_or_prod>")'
25-
```
20+
We also release three pre-trained HMTL models.
2621

27-
or launching the default model and mode:
22+
| Model Name | NER (F1) | EMD (F1) | RE (F1) | CR(F1 on CoNLL2012) | Description |
23+
| --- | --- | --- | --- | --- | --- |
24+
| conll_small_elmo | 85.73 | 83.51 | 58.40 | 62.85 | Small version of ELMo |
25+
| conll_medium_elmo | 86.41 | 84.02 | 58.78 | 61.62 | Medium version of ELMo |
26+
| conll_full_elmo _(default model)_ | 86.40 | 85.59 | 61.37 | 62.26 | Original version of ELMo |
2827

29-
```bash
30-
gunicorn -w 2 -b:8000 'server:build_app()'
31-
```
3228

3329
## Description of the tasks
3430

@@ -40,7 +36,7 @@ The different types of relation are the following:
4036

4137
| Shortname | Full Name | Description | Example |
4238
| --- | --- | -- | -- |
43-
| ART | Artifact | User-Owner-Inventor-Manufacturer | {Pablo Picasso painted the Joconde., ARG1 = Pablo Picasso, ARG2 = Joconde} |
39+
| ART | Artifact | User-Owner-Inventor-Manufacturer | {Leonard de Vinci painted the Joconde., ARG1 = Leonard de Vinci, ARG2 = Joconde} |
4440
| GEN-AFF | Gen-Affiliation | Citizen-Resident-Religion-Ethnicity, Org-Location | {The people of Iraq., ARG1 = The people, ARG2 = Iraq} |
4541
| ORG-AFF | Org-Affiliation | Employment, Founder, Ownership, Student-Alum, Sports-Affiliation, Investor-Shareholder, Membership | {Martin Geisler, ITV News, Safwan southern Iraq., ARG1 = Martin Geisler, ARG2 = ITV News} |
4642
| PART-WHOLE | Part-whole | Artifact, Geographical, Subsidiary | {They could safeguard the fields in Iraq., ARG1 = the fields, ARG2 = Iraq} |
@@ -53,8 +49,23 @@ For more details, please refer to the [dataset release notes](https://pdfs.seman
5349
### Coreference Resolution (CR)
5450

5551

56-
## Performance of the model
52+
## Using HMTL as a server
53+
54+
To launch a specific model (please make sure to be in a valid environment before: `source .env/bin/activate`):
5755

58-
| NER | EMD | RE | CR |
59-
| --- | --- | -- | ---|
60-
| | | | |
56+
```bash
57+
gunicorn -w 2 -t 60 -b:8000 'server:build_app(model_name="<model_name>")'
58+
```
59+
60+
or launching the default model:
61+
62+
```bash
63+
gunicorn -w 2 -b:8000 'server:build_app()'
64+
```
65+
66+
## References
67+
68+
```
69+
@article{
70+
}
71+
```

scripts/machine_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
### Install git-lfs ###
3+
### Install git-lfs (only necessary to download pre-trained models) ###
44
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
55
sudo apt-get install git-lfs
66
git lfs install

0 commit comments

Comments
 (0)