Skip to main content

sbx-swe-emotion_sentence-transformers-kblab_emotional_classification

Analysis citation Information

Språkbanken Text (2025). sbx-swe-emotion_sentence-transformers-kblab_emotional_classification (updated: 2025-10-17). [Analysis]. Språkbanken Text. https://doi.org/10.23695/bn3b-ht45
BibTeX Additional ways to cite the dataset.
Emotional analysis at sentence level with KBLab/emotional-classification

Emotional analysis at sentence level using transformers and KBLab/emotional-classification.

Example

This analysis is used with Sparv. Check out Sparv's quick start guide to get started!

To use this analysis, add the following line under export.annotations in the Sparv corpus configuration file:

- <sentence>:sbx_emotions_kb_emoclass.sentence-emotion--kb-emoclass  # Emotional analysis of sentence with KBLab/emotional-classification

You also need to install the following plugin: sbx_emotions_kb_emoclass.

For general information on how to install plugins, see here.

For more info on how to use Sparv, check out the Sparv documentation.

Example output:

<sentence sentence-emotion--kb-emoclass="SADNESS/DISAPPOINTMENT">
<token pos="PN">Jag</token>
<token pos="VB">är</token>
<token pos="PC">förvånad</token>
<token pos="MID">,</token>
<token pos="PC">chockad</token>
<token pos="KN">och</token>
<token pos="PC">bestört</token>
<token pos="PP">över</token>
<token pos="PN">det</token>
<token pos="AB">här</token>
<token pos="MID">,</token>
<token pos="VB">säger</token>
<token pos="PM">Anders</token>
<token pos="PM">Persson</token>
<token pos="PP">till</token>
<token pos="PM">SVT</token>
<token pos="PM">Nyheter</token>
<token pos="PM">Småland</token>
<token pos="MAD">.</token>
</sentence>

Type

  • Analysis

Task

  • emotional analysis

Unit

  • sentence

Dependencies

External tools

transformers
Apache-2.0 license

Models

KBLab/emotional-classification
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for classification of emotions in Swedish text. The model supports seven basic emotions.
Apache-2.0 license

Keyword

  • transformers
  • kb-lab

Created

2025-10-17

Updated

2025-10-17

Contact

sb-info@svenska.gu.se