model update
Browse files
README.md
CHANGED
|
@@ -77,6 +77,24 @@ For F1 scores, the confidence interval is obtained by bootstrap as below:
|
|
| 77 |
Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric.json)
|
| 78 |
and [metric file of entity span](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric_span.json).
|
| 79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
### Training hyperparameters
|
| 82 |
|
|
|
|
| 77 |
Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric.json)
|
| 78 |
and [metric file of entity span](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric_span.json).
|
| 79 |
|
| 80 |
+
### Usage
|
| 81 |
+
This model can be used through the transformers library by
|
| 82 |
+
```python
|
| 83 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 84 |
+
tokenizer = AutoTokenizer.from_pretrained("tner/roberta-large-bc5cdr")
|
| 85 |
+
model = AutoModelForTokenClassification.from_pretrained("tner/roberta-large-bc5cdr")
|
| 86 |
+
```
|
| 87 |
+
but, since transformers do not support CRF layer, it is recommended to use the model via `T-NER` library.
|
| 88 |
+
Install the library via pip
|
| 89 |
+
```shell
|
| 90 |
+
pip install tner
|
| 91 |
+
```
|
| 92 |
+
and activate model as below.
|
| 93 |
+
```
|
| 94 |
+
from tner import TransformersNER
|
| 95 |
+
model = TransformersNER("tner/roberta-large-bc5cdr")
|
| 96 |
+
model.predict("Jacob Collier is a Grammy awarded English artist from London".split(" "))
|
| 97 |
+
```
|
| 98 |
|
| 99 |
### Training hyperparameters
|
| 100 |
|