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