Skip to content

spraakbanken/sparv-sbx-emotions-brighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sparv-sbx-emotions-brighter

A Sparv plugin for multi-label emotion classification of Swedish sentences. The model is trained on the Swedish subset of the Brigther dataset.

This plugin annotates Swedish text with emotion categories from the Brigther dataset, which includes six emotion labels:

  • Anger
  • Disgust
  • Fear
  • Joy
  • Sadness
  • Surprise

Each sentence can be assigned one or multiple emotion labels. More information about the dataset can be found here:
BRIGHTER: BRIdging the Gap in Human-Annotated Textual Emotion Recognition Datasets for 28 Languages (Muhammad et al., ACL 2025)
SemEval-2025 Task 11: Bridging the Gap in Text-Based Emotion Detection (Muhammad et al., SemEval 2025)

This plugin uses a model based on KB-BERT, which can be found here.

Example: 'Den här produkten lever inte alls upp till mina förväntningar, skäms!' Labels: |anger,0.97|disgust,0.97|surprise,0.35|

Install

  1. Install Sparv:
pipx install sparv
sparv setup
  1. Install the plugin:
sparv plugins install https://github.com/spraakbanken/sparv-sbx-emotions-brighter/archive/main.zip

In case you need to uninstall the plugin:

sparv plugins uninstall sparv-sbx-emotions-brighter

Usage

In your config.yaml file for corpus configuration, specify sbx_emotions_brighter.emotion, in order to apply the plugin on your text.

export:
  annotations:
    - <sentence>
    - <token>
    - <sentence>:sbx_emotions_brighter.emotion

About

A Sparv plugin for multi-class emotion classification on sentence-level.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages