tomaarsen HF staff commited on
Commit
cec1de4
1 Parent(s): 7c36947

Add metrics & info on document-level context

Browse files
Files changed (1) hide show
  1. README.md +40 -2
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.
 
 
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 CoNLL++ with document-level context by Tom Aarsen
19
+ results:
20
+ - task:
21
+ type: token-classification
22
+ name: Named Entity Recognition
23
+ dataset:
24
+ type: conllpp
25
+ name: CoNLL++ w. document context
26
+ split: test
27
+ revision: 3e6012875a688903477cca9bf1ba644e65480bd6
28
+ metrics:
29
+ - type: f1
30
+ value: 0.9554
31
+ name: F1
32
+ - type: precision
33
+ value: 0.9600
34
+ name: Precision
35
+ - type: recall
36
+ value: 0.9509
37
+ name: Recall
38
+ datasets:
39
+ - conllpp
40
+ - tomaarsen/conllpp
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-conllpp-doc-context")
70
  # Run inference
71
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
72
  ```