Views
No views yet
| Metric | # score |
|---|---|
| F1 | 89.27 |
| Precision | 89.44 |
| Recall | 89.11 |
1from transformers import pipeline
2
3nlp_pos_syntax = pipeline(
4 "ner",
5 model="mrm8488/bert-spanish-cased-finetuned-pos-syntax",
6 tokenizer="mrm8488/bert-spanish-cased-finetuned-pos-syntax"
7)
8
9text = 'Mis amigos están pensando viajar a Londres este verano.'
10
11nlp_pos_syntax(text)[1:len(nlp_pos_syntax(text))-1]1[
2 { "entity": "_", "score": 0.9999216794967651, "word": "Mis" },
3 { "entity": "SUJ", "score": 0.999882698059082, "word": "amigos" },
4 { "entity": "_", "score": 0.9998869299888611, "word": "están" },
5 { "entity": "ROOT", "score": 0.9980518221855164, "word": "pensando" },
6 { "entity": "_", "score": 0.9998420476913452, "word": "viajar" },
7 { "entity": "CD", "score": 0.999351978302002, "word": "a" },
8 { "entity": "_", "score": 0.999959409236908, "word": "Londres" },
9 { "entity": "_", "score": 0.9998968839645386, "word": "este" },
10 { "entity": "CC", "score": 0.99931401014328, "word": "verano" },
11 { "entity": "PUNC", "score": 0.9998534917831421, "word": "." }
12]Created by Manuel Romero/@mrm8488
Made with ♥ in Spain