pietruszkowiec
commited on
Commit
•
f8cd472
1
Parent(s):
0f52716
Update README.md
Browse files
README.md
CHANGED
@@ -1,47 +1,26 @@
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
3 |
-
tags:
|
4 |
-
- generated_from_trainer
|
5 |
datasets:
|
6 |
- wikiann
|
7 |
-
|
8 |
-
-
|
9 |
-
-
|
10 |
-
|
11 |
-
-
|
12 |
-
|
13 |
-
-
|
14 |
-
results:
|
15 |
-
- task:
|
16 |
-
name: Token Classification
|
17 |
-
type: token-classification
|
18 |
-
dataset:
|
19 |
-
name: wikiann
|
20 |
-
type: wikiann
|
21 |
-
config: pl
|
22 |
-
split: validation
|
23 |
-
args: pl
|
24 |
-
metrics:
|
25 |
-
- name: Precision
|
26 |
-
type: precision
|
27 |
-
value: 0.8885878330430295
|
28 |
-
- name: Recall
|
29 |
-
type: recall
|
30 |
-
value: 0.905945803735859
|
31 |
-
- name: F1
|
32 |
-
type: f1
|
33 |
-
value: 0.8971828692395376
|
34 |
-
- name: Accuracy
|
35 |
-
type: accuracy
|
36 |
-
value: 0.9568532096363909
|
37 |
---
|
38 |
|
39 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
40 |
-
should probably proofread and complete it, then remove this comment. -->
|
41 |
|
42 |
# herbert-base-ner
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
It achieves the following results on the evaluation set:
|
46 |
- Loss: 0.2006
|
47 |
- Precision: 0.8886
|
@@ -49,43 +28,59 @@ It achieves the following results on the evaluation set:
|
|
49 |
- F1: 0.8972
|
50 |
- Accuracy: 0.9569
|
51 |
|
52 |
-
## Model description
|
53 |
-
|
54 |
-
More information needed
|
55 |
|
56 |
## Intended uses & limitations
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
|
|
|
|
3 |
datasets:
|
4 |
- wikiann
|
5 |
+
language:
|
6 |
+
- pl
|
7 |
+
pipeline_tag: token-classification
|
8 |
+
widget:
|
9 |
+
- text: "Jestem Krzysiek i pracuję w Ministerstwie Sportu"
|
10 |
+
- text: "Wiktoria pracuje w Krakowie, na AGH"
|
11 |
+
- text: "Nazywam się Grzegorz Jasiński, pochodzę ze Szczebrzeszyna"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
---
|
13 |
|
|
|
|
|
14 |
|
15 |
# herbert-base-ner
|
16 |
|
17 |
+
## Model description
|
18 |
+
|
19 |
+
**herbert-base-ner** is a fine-tuned HerBERT model that can be used for **Named Entity Recognition** .
|
20 |
+
It has been trained to recognize three types of entities: person (PER), location (LOC) and organization (ORG).
|
21 |
+
|
22 |
+
Specifically, this model is an [*allegro/herbert-base-cased*](https://huggingface.co/allegro/herbert-base-cased) model that was fine-tuned on the Polish subset of *wikiann* dataset.
|
23 |
+
|
24 |
It achieves the following results on the evaluation set:
|
25 |
- Loss: 0.2006
|
26 |
- Precision: 0.8886
|
|
|
28 |
- F1: 0.8972
|
29 |
- Accuracy: 0.9569
|
30 |
|
|
|
|
|
|
|
31 |
|
32 |
## Intended uses & limitations
|
33 |
|
34 |
+
#### How to use
|
35 |
+
|
36 |
+
You can use this model with Transformers *pipeline* for NER.
|
37 |
+
|
38 |
+
```python
|
39 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
40 |
+
from transformers import pipeline
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained("pietruszkowiec/herbert-base-ner")
|
42 |
+
model = AutoModelForTokenClassification.from_pretrained("pietruszkowiec/herbert-base-ner")
|
43 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
44 |
+
example = "Nazywam się Grzegorz Jasiński, pochodzę ze Szczebrzeszyna"
|
45 |
+
ner_results = nlp(example)
|
46 |
+
print(ner_results)
|
47 |
+
```
|
48 |
+
|
49 |
+
### BibTeX entry and citation info
|
50 |
+
|
51 |
+
```
|
52 |
+
@inproceedings{mroczkowski-etal-2021-herbert,
|
53 |
+
title = "{H}er{BERT}: Efficiently Pretrained Transformer-based Language Model for {P}olish",
|
54 |
+
author = "Mroczkowski, Robert and
|
55 |
+
Rybak, Piotr and
|
56 |
+
Wr{\\'o}blewska, Alina and
|
57 |
+
Gawlik, Ireneusz",
|
58 |
+
booktitle = "Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing",
|
59 |
+
month = apr,
|
60 |
+
year = "2021",
|
61 |
+
address = "Kiyv, Ukraine",
|
62 |
+
publisher = "Association for Computational Linguistics",
|
63 |
+
url = "https://www.aclweb.org/anthology/2021.bsnlp-1.1",
|
64 |
+
pages = "1--10",
|
65 |
+
}
|
66 |
+
```
|
67 |
+
```
|
68 |
+
@inproceedings{pan-etal-2017-cross,
|
69 |
+
title = "Cross-lingual Name Tagging and Linking for 282 Languages",
|
70 |
+
author = "Pan, Xiaoman and
|
71 |
+
Zhang, Boliang and
|
72 |
+
May, Jonathan and
|
73 |
+
Nothman, Joel and
|
74 |
+
Knight, Kevin and
|
75 |
+
Ji, Heng",
|
76 |
+
booktitle = "Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
|
77 |
+
month = jul,
|
78 |
+
year = "2017",
|
79 |
+
address = "Vancouver, Canada",
|
80 |
+
publisher = "Association for Computational Linguistics",
|
81 |
+
url = "https://www.aclweb.org/anthology/P17-1178",
|
82 |
+
doi = "10.18653/v1/P17-1178",
|
83 |
+
pages = "1946--1958",
|
84 |
+
abstract = "The ambitious goal of this work is to develop a cross-lingual name tagging and linking framework for 282 languages that exist in Wikipedia. Given a document in any of these languages, our framework is able to identify name mentions, assign a coarse-grained or fine-grained type to each mention, and link it to an English Knowledge Base (KB) if it is linkable. We achieve this goal by performing a series of new KB mining methods: generating {``}silver-standard{''} annotations by transferring annotations from English to other languages through cross-lingual links and KB properties, refining annotations through self-training and topic selection, deriving language-specific morphology features from anchor links, and mining word translation pairs from cross-lingual links. Both name tagging and linking results for 282 languages are promising on Wikipedia data and on-Wikipedia data.",
|
85 |
+
}
|
86 |
+
```
|