Views
No views yet
| Dataset | # Examples |
|---|---|
| Train | 716 K |
| Dev | 85 K |
ADJ
ADP
ADV
AUX
CCONJ
DET
INTJ
NOUN
NUM
PART
PRON
PROPN
PUNCT
SCONJ
SYM
VERB
X| Metric | # score |
|---|---|
| F1 | 97.25 |
| Precision | 97.15 |
| Recall | 97.36 |
1from transformers import pipeline
2
3nlp_pos = pipeline(
4 "ner",
5 model="sachaarbonel/bert-italian-cased-finetuned-pos",
6 tokenizer=(
7 'sachaarbonel/bert-spanish-cased-finetuned-pos',
8 {"use_fast": False}
9))
10
11
12text = 'Roma è la Capitale d'Italia.'
13
14nlp_pos(text)
15
16'''
17Output:
18--------
19[{'entity': 'PROPN', 'index': 1, 'score': 0.9995346665382385, 'word': 'roma'},
20 {'entity': 'AUX', 'index': 2, 'score': 0.9966597557067871, 'word': 'e'},
21 {'entity': 'DET', 'index': 3, 'score': 0.9994786977767944, 'word': 'la'},
22 {'entity': 'NOUN',
23 'index': 4,
24 'score': 0.9995198249816895,
25 'word': 'capitale'},
26 {'entity': 'ADP', 'index': 5, 'score': 0.9990894198417664, 'word': 'd'},
27 {'entity': 'PART', 'index': 6, 'score': 0.57159024477005, 'word': "'"},
28 {'entity': 'PROPN',
29 'index': 7,
30 'score': 0.9994804263114929,
31 'word': 'italia'},
32 {'entity': 'PUNCT', 'index': 8, 'score': 0.9772886633872986, 'word': '.'}]
33'''Created by Sacha Arbonel/@sachaarbonel | LinkedIn
Made with ♥ in Paris