tomaarsen HF staff commited on
Commit
768dd46
1 Parent(s): 2c5e490

Add metrics & info on document-level context

Browse files
Files changed (1) hide show
  1. README.md +39 -1
README.md CHANGED
@@ -8,11 +8,49 @@ 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 [xlm-roberta-large](https://huggingface.co/xlm-roberta-large) as the underlying encoder. See [train.py](train.py) for the training script.
 
 
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("span_marker_model_name")
32
  # Run inference
33
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
34
  ```
 
8
  - ner
9
  - named-entity-recognition
10
  pipeline_tag: token-classification
11
+ widget:
12
+ - text: >-
13
+ Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic
14
+ to Paris.
15
+ example_title: Amelia Earhart
16
+ model-index:
17
+ - name: >-
18
+ SpanMarker w. xlm-roberta-large on CoNLL03 with document-level context by Tom Aarsen
19
+ results:
20
+ - task:
21
+ type: token-classification
22
+ name: Named Entity Recognition
23
+ dataset:
24
+ type: conll2003
25
+ name: CoNLL03 w. document context
26
+ split: test
27
+ revision: 01ad4ad271976c5258b9ed9b910469a806ff3288
28
+ metrics:
29
+ - type: f1
30
+ value: 0.9442
31
+ name: F1
32
+ - type: precision
33
+ value: 0.9411
34
+ name: Precision
35
+ - type: recall
36
+ value: 0.9473
37
+ name: Recall
38
+ datasets:
39
+ - conll2003
40
+ - tomaarsen/conll2003
41
+ language:
42
+ - en
43
+ metrics:
44
+ - f1
45
+ - recall
46
+ - precision
47
  ---
48
 
49
  # SpanMarker for Named Entity Recognition
50
 
51
  This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition. In particular, this SpanMarker model uses [xlm-roberta-large](https://huggingface.co/xlm-roberta-large) as the underlying encoder. See [train.py](train.py) for the training script.
52
+ Note that this model was trained with document-level context, i.e. it will primarily perform well when provided with enough context. It is recommended to call `model.predict` with a 🤗 Dataset with `tokens`, `document_id` and `sentence_id` columns.
53
+ See the [documentation](https://tomaarsen.github.io/SpanMarkerNER/api/span_marker.modeling.html#span_marker.modeling.SpanMarkerModel.predict) of the `model.predict` method for more information.
54
 
55
  ## Usage
56
 
 
66
  from span_marker import SpanMarkerModel
67
 
68
  # Download from the 🤗 Hub
69
+ model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-xlm-roberta-large-conll03-doc-context")
70
  # Run inference
71
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
72
  ```