Rolv-Arild
commited on
Commit
·
c72b5e5
1
Parent(s):
2dc0b66
Update README.md
Browse files
README.md
CHANGED
@@ -11,4 +11,25 @@ widget:
|
|
11 |
- text: Trond Giske har bekreftet på spørsmål fra Adresseavisen at Hansen leide et rom i hans leilighet i Trondheim.
|
12 |
---
|
13 |
|
|
|
|
|
14 |
# nb-bert-base-ner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
- text: Trond Giske har bekreftet på spørsmål fra Adresseavisen at Hansen leide et rom i hans leilighet i Trondheim.
|
12 |
---
|
13 |
|
14 |
+
**Release 1.0** (March 11, 2021)
|
15 |
+
|
16 |
# nb-bert-base-ner
|
17 |
+
|
18 |
+
## Description
|
19 |
+
NB-Bert base model fine-tuned on the Named Entity Recognition task using the [NorNE dataset](https://huggingface.co/datasets/NbAiLab/norne).
|
20 |
+
|
21 |
+
## Usage
|
22 |
+
|
23 |
+
```python
|
24 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
25 |
+
from transformers import pipeline
|
26 |
+
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained("NbAiLab/nb-bert-base-ner")
|
28 |
+
model = AutoModelForTokenClassification.from_pretrained("NbAiLab/nb-bert-base-ner")
|
29 |
+
|
30 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
31 |
+
example = "Jeg heter Kjell og bor i Oslo."
|
32 |
+
|
33 |
+
ner_results = nlp(example)
|
34 |
+
print(ner_results)
|
35 |
+
```
|