Downloads · 30 days
15.5K
3% of all-time downloads
tblard/tf-allocine
tf-allocine is a text classification model from tblard. Use it when you need a label for a piece of text. It is set up for transformers.
A french sentiment analysis model, based on CamemBERT, and finetuned on a large-scale dataset scraped from Allociné.fr user reviews.
Downloads · 30 days
15.5K
3% of all-time downloads
All-time downloads
595K
Public
Repo size
446 MB
Likes
12
Public
Click a slice to open those files.
.h5445 MB · 100%
From the Hugging Face model README
A french sentiment analysis model, based on CamemBERT, and finetuned on a large-scale dataset scraped from Allociné.fr user reviews.
| Validation Accuracy | Validation F1-Score | Test Accuracy | Test F1-Score |
|---|---|---|---|
| 97.39 | 97.36 | 97.44 | 97.34 |
The dataset and the evaluation code are available on this repo.
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("tblard/tf-allocine")
model = TFAutoModelForSequenceClassification.from_pretrained("tblard/tf-allocine")
nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
print(nlp("Alad'2 est clairement le meilleur film de l'année 2018.")) # POSITIVE
print(nlp("Juste whoaaahouuu !")) # POSITIVE
print(nlp("NUL...A...CHIER ! FIN DE TRANSMISSION.")) # NEGATIVE
print(nlp("Je m'attendais à mieux de la part de Franck Dubosc !")) # NEGATIVE
Théophile Blard – :email: theophile.blard@gmail.com
If you use this work (code, model or dataset), please cite as:
Théophile Blard, French sentiment analysis with BERT, (2020), GitHub repository, https://github.com/TheophileBlard/french-sentiment-analysis-with-bert