Sentimentanalys per mening med KBLab/robust-swedish-sentiment-multiclass
Sentimentanalys per mening med transformers och KBLab/robust-swedish-sentiment-multiclass.
Sentimentanalys per mening med transformers och KBLab/robust-swedish-sentiment-multiclass.
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>