Skip to main content

sbx-swe-sentiment-transformers-kblab_robust_swedish_sentiment_multiclass

Analysis citation Information

Språkbanken Text (2025). sbx-swe-sentiment-transformers-kblab_robust_swedish_sentiment_multiclass (updated: 2025-10-03). [Analysis]. Språkbanken Text. https://doi.org/10.23695/wh4w-na93
BibTeX Additional ways to cite the dataset.
Sentiment analysis per sentence using KBLab/robust-swedish-sentiment-multiclass

Sentiment analysis per sentence using transformers with KBLab/robust-swedish-sentiment-multiclass.

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_sentence_sentiment_kb_sent.sentence-sentiment--kb-sent  # Sentiment analysis of sentence with KBLab/robust-swedish-sentiment-multiclass

You also need to install the following plugin: sbx_sentence_sentiment_kb_sent.

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-sentiment--kb-sent="|NEUTRAL:0.946|">
<token pos="JJ">Stora</token>
<token pos="NN">regnmängder</token>
<token pos="VB">väntas</token>
<token pos="PP">under</token>
<token pos="NN">måndagen</token>
<token pos="KN">och</token>
<token pos="PM">SMHI</token>
<token pos="VB">har</token>
<token pos="VB">utfärdat</token>
<token pos="DT">en</token>
<token pos="JJ">gul</token>
<token pos="NN">varning</token>
<token pos="PP">för</token>
<token pos="PC">skyfallsliknande</token>
<token pos="NN">regn</token>
<token pos="PP">över</token>
<token pos="JJ">stora</token>
<token pos="NN">delar</token>
<token pos="PP">av</token>
<token pos="NN">landets</token>
<token pos="JJ">södra</token>
<token pos="JJ">halva</token>
<token pos="MAD">.</token>
</sentence>

Type

  • Analysis

Task

  • sentiment analysis

Unit

  • sentence

Dependencies

External tools

transformers
Apache-2.0 license

Models

KBLab/robust-swedish-sentiment-multiclass
KBLab presents a robust, multi-label sentiment classifier trained on Swedish texts. The model is robust in the sense that it is trained on multiple datasets of different text types and allows labeling of neutral as well positive and negative texts.
Apache-2.0 license

Keyword

  • transformers
  • kb-lab

Created

2024-05-28

Updated

2025-10-03

Contact

sb-info@svenska.gu.se