Instructions to use TextToKids/CamemBERT-base-EmoTextToKids with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TextToKids/CamemBERT-base-EmoTextToKids with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TextToKids/CamemBERT-base-EmoTextToKids")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("TextToKids/CamemBERT-base-EmoTextToKids") model = AutoModelForSequenceClassification.from_pretrained("TextToKids/CamemBERT-base-EmoTextToKids", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: cc-by-sa-4.0 | |
| # CamemBERT-EmoTextToKids | |
| Classification model for | |
| - input: a sentence + the previous and following sentences | |
| - output: 20 labels | |
| - is emotional | |
| - mode of expression | |
| - type of emotion(s) (basic, complex) | |
| - category of emotion(s) | |
| ## Input format | |
| The prompt template is: | |
| ```before:{previous_sentence}</s>current: {target_sentence}</s>after:{next_sentence}</s>``` | |
| ## Output format | |
| Labels are returned in the following order: | |
| 0. sentence is emotional | |
| 1. mode is behavioral | |
| 2. mode is labeled | |
| 3. mode is displayed | |
| 4. mode is suggested | |
| 5. type is basic | |
| 6. type is complex | |
| 7. category is admiration | |
| 8. category is other | |
| 9. category is anger | |
| 10. category is guilt | |
| 11. category is disgust | |
| 12. category is embarassement | |
| 13. category is pride | |
| 14. category is jealousy | |
| 15. category is fear | |
| 16. category is joy | |
| 17. categoy is fear | |
| 18. category is surprise | |
| 19. category is sadness | |
| See the [original paper](https://arxiv.org/pdf/2405.14385) for details about training. | |
| ## Dataset | |
| See [EmoTextToKids-sentences](https://huggingface.co/datasets/TextToKids/EmoTextToKids-sentences) | |
| ## Citation information | |
| ```bibtex | |
| @inproceedings{etienne2024emotion, | |
| title={Emotion Identification for French in Written Texts: Considering Modes of Emotion Expression as a Step Towards Text Complexity Analysis}, | |
| author={{\'E}tienne, Aline and Battistelli, Delphine and Lecorv{\'e}, Gw{\'e}nol{\'e}}, | |
| booktitle={Proceedings of the 14th ACL Workshop on Computational Approaches to Subjectivity, Sentiment & Social Media Analysis (WASSA)}, | |
| year={2024} | |
| } | |
| ``` |