Downloads · 30 days
37
0% of all-time downloads
sagorsarker/codeswitch-spaeng-sentiment-analysis-lince
codeswitch-spaeng-sentiment-analysis-lince is a text classification model from sagorsarker. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This is a pretrained model for Sentiment Analysis of spanish-english code-mixed data used from LinCE
Downloads · 30 days
37
0% of all-time downloads
All-time downloads
18.1K
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 Sentiment Analysis 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, AutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-sentiment-analysis-lince")
model = AutoModelForSequenceClassification.from_pretrained("sagorsarker/codeswitch-spaeng-sentiment-analysis-lince")
nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
sentence = "El perro le ladraba a La Gatita .. .. lol #teamlagatita en las playas de Key Biscayne este Memorial day"
nlp(sentence)
from codeswitch.codeswitch import SentimentAnalysis
sa = SentimentAnalysis('spa-eng')
sentence = "El perro le ladraba a La Gatita .. .. lol #teamlagatita en las playas de Key Biscayne este Memorial day"
result = sa.analyze(sentence)
print(result)