Julien Chaumond
commited on
Commit
·
ec1050c
1
Parent(s):
1e3e88c
model card
Browse files
README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- flair
|
4 |
+
- token-classification
|
5 |
+
- sequence-tagger-model
|
6 |
+
language: en
|
7 |
+
---
|
8 |
+
|
9 |
+
## Flair NER model (`en-ner-conll03-v0.4.pt`)
|
10 |
+
|
11 |
+
Imported from https://nlp.informatik.hu-berlin.de/resources/models/ner/
|
12 |
+
|
13 |
+
### Demo: How to use in Flair
|
14 |
+
|
15 |
+
```python
|
16 |
+
from flair.data import Sentence
|
17 |
+
from flair.models import SequenceTagger
|
18 |
+
|
19 |
+
sentence = Sentence("My name is Julien, I currently live in Paris, I work at Hugging Face, Inc.")
|
20 |
+
|
21 |
+
tagger = SequenceTagger.load("julien-c/flair-ner")
|
22 |
+
|
23 |
+
|
24 |
+
# predict NER tags
|
25 |
+
tagger.predict(sentence)
|
26 |
+
|
27 |
+
# print sentence with predicted tags
|
28 |
+
print(sentence.to_tagged_string())
|
29 |
+
|
30 |
+
|
31 |
+
```
|
32 |
+
|
33 |
+
yields the following output:
|
34 |
+
|
35 |
+
```
|
36 |
+
My name is Julien <S-PER> , I currently live in Paris <S-LOC> , I work at Hugging <B-LOC> Face <E-LOC> .
|
37 |
+
```
|
38 |
+
|
39 |
+
### Thanks [@stefan-it](https://huggingface.co/stefan-it) for the Flair integration ❤️ 🔥
|
40 |
+
|