Downloads · 30 days
44
2% of all-time downloads
sagorsarker/codeswitch-spaeng-ner-lince
codeswitch-spaeng-ner-lince is a token classification model from sagorsarker. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
This is a pretrained model for Name Entity Recognition of spanish-english code-mixed data used from LinCE
Downloads · 30 days
44
2% of all-time downloads
All-time downloads
2.3K
Public
Parameters
178M
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin712 MB · 33%
How the weights are stored.
F32178M · 100%
From the Hugging Face model README
This is a pretrained model for Name Entity Recognition of spanish-english code-mixed data used from LinCE
This model is trained for this below repository.
https://github.com/sagorbrur/codeswitch
To install codeswitch:
pip install codeswitch
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-ner-lince")
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-spaeng-ner-lince")
ner_model = pipeline('ner', model=model, tokenizer=tokenizer)
ner_model("put any spanish english code-mixed sentence")
from codeswitch.codeswitch import NER
ner = NER('spa-eng')
text = "" # your mixed sentence
result = ner.tag(text)
print(result)