Back to all models
token-classification mask_token: [MASK]
Query this model
🔥 This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint
								curl -X POST \
-H "Authorization: Bearer YOUR_ORG_OR_USER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '"json encoded string"' \
Share Copied link to clipboard

Monthly model downloads

mrm8488/bert-spanish-cased-finetuned-pos mrm8488/bert-spanish-cased-finetuned-pos
last 30 days



Contributed by

mrm8488 Manuel Romero
118 models

How to use this model directly from the 🤗/transformers library:

Copy to clipboard
from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("mrm8488/bert-spanish-cased-finetuned-pos") model = AutoModelForTokenClassification.from_pretrained("mrm8488/bert-spanish-cased-finetuned-pos")

Spanish BERT (BETO) + POS

This model is a fine-tuned on Spanish CONLL CORPORA version of the Spanish BERT cased (BETO) for POS (Part of Speech tagging) downstream task.

Details of the downstream task (POS) - Dataset

I preprocessed the dataset and splitted it as train / dev (80/20)

Dataset # Examples
Train 340 K
Dev 50 K
AO, AQ, CC, CS, DA, DD, DE, DI, DN, DP, DT, Faa, Fat, Fc, Fd, Fe, Fg, Fh, Fia, Fit, Fp, Fpa, Fpt, Fs, Ft, Fx, Fz, I, NC, NP, P0, PD, PI, PN, PP, PR, PT, PX, RG, RN, SP, VAI, VAM, VAN, VAP, VAS, VMG, VMI, VMM, VMN, VMP, VMS, VSG, VSI, VSM, VSN, VSP, VSS, Y and Z

Metrics on evaluation set:

Metric # score
F1 90.06
Precision 89.46
Recall 90.67

Model in action

Fast usage with pipelines:

from transformers import pipeline

nlp_pos = pipeline(
        {"use_fast": False}

text = 'Mis amigos están pensando en viajar a Londres este verano'


[{'entity': 'NC', 'score': 0.7792173624038696, 'word': '[CLS]'},
 {'entity': 'DP', 'score': 0.9996283650398254, 'word': 'Mis'},
 {'entity': 'NC', 'score': 0.9999253749847412, 'word': 'amigos'},
 {'entity': 'VMI', 'score': 0.9998560547828674, 'word': 'están'},
 {'entity': 'VMG', 'score': 0.9992249011993408, 'word': 'pensando'},
 {'entity': 'SP', 'score': 0.9999602437019348, 'word': 'en'},
 {'entity': 'VMN', 'score': 0.9998666048049927, 'word': 'viajar'},
 {'entity': 'SP', 'score': 0.9999545216560364, 'word': 'a'},
 {'entity': 'VMN', 'score': 0.8722310662269592, 'word': 'Londres'},
 {'entity': 'DD', 'score': 0.9995203614234924, 'word': 'este'},
 {'entity': 'NC', 'score': 0.9999248385429382, 'word': 'verano'},
 {'entity': 'NC', 'score': 0.8802427649497986, 'word': '[SEP]'}]

model in action

16 POS tags version also available here

Created by Manuel Romero/@mrm8488

Made with in Spain