A sparv plugin for computing sentence sentiment.
Project description
sparv-sbx-sentence-sentiment-kb-sent
Plugin for computing sentence sentiment as a Sparv annotation.
Install
First, install Sparv as suggested:
pipx install sparv-pipeline
Then install install sparv-sbx-sentence-sentiment-kb-sent
with
pipx inject sparv-pipeline sparv-sbx-sentence-sentiment-kb-sent
Usage
Depending on how many explicit exports of annotations you have you can decide to use this
annotation exclusively by adding it as the only annotation to export under xml_export
:
xml_export:
annotations:
- <sentence>:sbx_sentence_sentiment_kb_sent.sentence-sentiment--kb-sent
To use it together with other annotations you might add it under export
:
export:
annotations:
- <sentence>:sbx_sentence_sentiment_kb_sent.sentence-sentiment--kb-sent
...
Configuration
You can configure this plugin in the following way.
Number of Decimals
The number of decimals defaults to 3
but can be configured in config.yaml
:
sbx_sentence_sentiment_kb_sent:
num_decimals: 3
[!NOTE] This also controls the cut-off, so all values where the score round to 0.000 (or the number of decimals) is discarded.
Metadata
Model
Type | HuggingFace Model | Revision |
---|---|---|
Model | KBLab/robust-swedish-sentiment-multiclass |
b0ec32dca56aa6182a6955c8f12129bbcbc7fdbd |
Tokenizer | KBLab/megatron-bert-large-swedish-cased-165k |
90c57ab49e27b820bd85308a488409dfea25600d |
Changelog
This project keeps a changelog.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.2.0.tar.gz
.
File metadata
- Download URL: sparv_sbx_sentence_sentiment_kb_sent-0.2.0.tar.gz
- Upload date:
- Size: 61.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d57e54d0ab2c904f5317b4f0f1785b6b7019295519bcb0d093289088af95bcf6 |
|
MD5 | 5bfaf330f2e770e369e63a36810f3357 |
|
BLAKE2b-256 | 3d63ecd7a0ecdf9892c6bd0e17d4aeeee5a611224f771b62d5ded3e03d5e1667 |
File details
Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: sparv_sbx_sentence_sentiment_kb_sent-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e800177d2cef7ca834053f3127b57450217b597bfd7f814302701343cc8cd9 |
|
MD5 | ded748e9e7cbf54809239ae1ff3f3c8f |
|
BLAKE2b-256 | 8030fc34c4c490f5d54894d8813322c774fe933683393651ce70dcc9f3461665 |