# Error using pretraining tokenizer for spanish biomedical ner

**URL:** <https://discuss.huggingface.co/t/error-using-pretraining-tokenizer-for-spanish-biomedical-ner/18022>\
**Category:** Beginners\
**Created:** [May 16, 2022, 8:42pm UTC](https://discuss.huggingface.co/t/error-using-pretraining-tokenizer-for-spanish-biomedical-ner/18022 "2022-05-16T20:42:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Durango](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/durango/32/3753_2.png) [@Durango](https://discuss.huggingface.co/u/Durango)\
**Post date:** [May 16, 2022, 8:42pm UTC](https://discuss.huggingface.co/t/error-using-pretraining-tokenizer-for-spanish-biomedical-ner/18022/1 "2022-05-16T20:42:27Z")

</div>

Hi, guys, I’m working with NLP and with spanish electronic healt records, I’d like to know what I’m doing wrong when I use the tokenizer, the variable returned me the tokens so weird, please, can u give a hand? thanks a lot!!  
I’m using this amazing model: [PlanTL-GOB-ES/bsc-bio-ehr-es · Hugging Face](https://huggingface.co/PlanTL-GOB-ES/bsc-bio-ehr-es)

This is the code:

```auto
import transformers

from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline

BERT_PATH="bsc-bio-es"
MODEL_PATH="bsc-bio-es/pytorch_model.bin"
bert=transformers.BertModel.from_pretrained(BERT_PATH)

parameters=bert.num_parameters()

tokenizer=AutoTokenizer.from_pretrained(BERT_PATH)
text=[ "paciente de 84 años de edad presenta hépatisis con cáncer persistente",
"Hola estoy es una prueba para determinar como este modelo está haciendo la tokenización"] 

tokens=tokenizer.tokenize(text)

```

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/5/5ac8cb42d35685ae8157fccd53379285cc094482.png)
