Add metrics & link to train.py
Browse files
README.md
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
---
|
3 |
license: apache-2.0
|
4 |
library_name: span-marker
|
@@ -8,11 +7,50 @@ tags:
|
|
8 |
- ner
|
9 |
- named-entity-recognition
|
10 |
pipeline_tag: token-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
# SpanMarker for Named Entity Recognition
|
14 |
|
15 |
-
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition. In particular, this SpanMarker model uses [roberta-large](https://huggingface.co/roberta-large) as the underlying encoder.
|
16 |
|
17 |
## Usage
|
18 |
|
@@ -28,7 +66,7 @@ You can then run inference with this model like so:
|
|
28 |
from span_marker import SpanMarkerModel
|
29 |
|
30 |
# Download from the 🤗 Hub
|
31 |
-
model = SpanMarkerModel.from_pretrained("
|
32 |
# Run inference
|
33 |
entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
|
34 |
```
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
library_name: span-marker
|
|
|
7 |
- ner
|
8 |
- named-entity-recognition
|
9 |
pipeline_tag: token-classification
|
10 |
+
widget:
|
11 |
+
- text: >-
|
12 |
+
Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic
|
13 |
+
to Paris.
|
14 |
+
example_title: Amelia Earhart
|
15 |
+
- text: >-
|
16 |
+
Leonardo di ser Piero da Vinci painted the Mona Lisa based on Italian noblewoman
|
17 |
+
Lisa del Giocondo.
|
18 |
+
example_title: Leonardo da Vinci
|
19 |
+
model-index:
|
20 |
+
- name: >-
|
21 |
+
SpanMarker w. roberta-large on OntoNotes v5.0 by Tom Aarsen
|
22 |
+
results:
|
23 |
+
- task:
|
24 |
+
type: token-classification
|
25 |
+
name: Named Entity Recognition
|
26 |
+
dataset:
|
27 |
+
type: tner/ontonotes5
|
28 |
+
name: OntoNotes v5.0
|
29 |
+
split: test
|
30 |
+
revision: cf9ef57ad260810be1298ba795d83c09a915e959
|
31 |
+
metrics:
|
32 |
+
- type: f1
|
33 |
+
value: 0.9153
|
34 |
+
name: F1
|
35 |
+
- type: precision
|
36 |
+
value: 0.9116
|
37 |
+
name: Precision
|
38 |
+
- type: recall
|
39 |
+
value: 0.9191
|
40 |
+
name: Recall
|
41 |
+
datasets:
|
42 |
+
- tner/ontonotes5
|
43 |
+
language:
|
44 |
+
- en
|
45 |
+
metrics:
|
46 |
+
- f1
|
47 |
+
- recall
|
48 |
+
- precision
|
49 |
---
|
50 |
|
51 |
# SpanMarker for Named Entity Recognition
|
52 |
|
53 |
+
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition. In particular, this SpanMarker model uses [roberta-large](https://huggingface.co/roberta-large) as the underlying encoder. See [train.py](train.py) for the training script.
|
54 |
|
55 |
## Usage
|
56 |
|
|
|
66 |
from span_marker import SpanMarkerModel
|
67 |
|
68 |
# Download from the 🤗 Hub
|
69 |
+
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-ontonotes5")
|
70 |
# Run inference
|
71 |
entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
|
72 |
```
|