Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
library_name: span_marker
|
4 |
+
tags:
|
5 |
+
- span_marker
|
6 |
+
- token-classification
|
7 |
+
- ner
|
8 |
+
- named-entity-recognition
|
9 |
+
pipeline_tag: token-classification
|
10 |
+
datasets:
|
11 |
+
- conll2003
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
---
|
15 |
+
|
16 |
+
# SpanMarker for Named Entity Recognition
|
17 |
+
|
18 |
+
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition. In particular, this SpanMarker model uses [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) as the underlying encoder.
|
19 |
+
|
20 |
+
## Usage
|
21 |
+
|
22 |
+
To use this model for inference, first install the `span_marker` library:
|
23 |
+
|
24 |
+
```bash
|
25 |
+
pip install span_marker
|
26 |
+
```
|
27 |
+
|
28 |
+
You can then run inference as follows:
|
29 |
+
|
30 |
+
```python
|
31 |
+
from span_marker import SpanMarkerModel
|
32 |
+
|
33 |
+
# Download from Hub and run inference
|
34 |
+
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-bert-tiny-conll03")
|
35 |
+
# Run inference
|
36 |
+
entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
|
37 |
+
```
|
38 |
+
|
39 |
+
See the [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) repository for documentation and additional information on this model framework.
|