A sparv plugin for computing sentence sentiment.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
sparv-sbx-sentence-sentiment-kb-sent
Plugin for computing sentence sentiment as a Sparv annotation.
Install
With pipx
First, install Sparv as suggested:
pipx install sparv
Then install install sparv-sbx-sentence-sentiment-kb-sent with
pipx inject sparv sparv-sbx-sentence-sentiment-kb-sent
With uv-pipx
First, install Sparv as recommended:
uvpipx install sparv
Then install sparv-sbx-sentence-sentiment-kb-sent with
uvpipx install sparv-sbx-sentence-sentiment-kb-sent --inject sparv
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 |
Supported Python versions
This library thrives to support a Python version to End-Of-Life, and will at least bump the minor version when support for a Python version is dropped.
The following versions of this library supports these Python versions:
- v0.3: Python 3.11
- v0.2: Python 3.8
Changelog
This project keeps a changelog.
License
This repository is licensed under the MIT license.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz.
File metadata
- Download URL: sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
204c35d143af36ddf6e9f132611d2bf1afcb7903caa93e8f21923497a97d3a8d
|
|
| MD5 |
73aebbd7152f802eddbc242ffdb826c0
|
|
| BLAKE2b-256 |
9a83964370cf4a1945ce3165b1ea52d034b36c51a51f2721a8be9f122643a527
|
Provenance
The following attestation bundles were made for sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz:
Publisher:
release-sentence-sentiment-kb-sent.yml on spraakbanken/sparv-sbx-sentiment-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz -
Subject digest:
204c35d143af36ddf6e9f132611d2bf1afcb7903caa93e8f21923497a97d3a8d - Sigstore transparency entry: 582954458
- Sigstore integration time:
-
Permalink:
spraakbanken/sparv-sbx-sentiment-analysis@9cf2f1a76fdec6e41a804dbc9da80f1edf4ace1e -
Branch / Tag:
refs/tags/sentence-sentiment-kb-sent-v0.3.0 - Owner: https://github.com/spraakbanken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sentence-sentiment-kb-sent.yml@9cf2f1a76fdec6e41a804dbc9da80f1edf4ace1e -
Trigger Event:
push
-
Statement type:
File details
Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12e651091db894223bebeed01aa31ec1b40f5aaa5429a6bff05e755f0fd6fac4
|
|
| MD5 |
4b2838102cc6e90f3b215ffc96eebf59
|
|
| BLAKE2b-256 |
8a5b44a59d31a9a187be5c1fed22b3a7beafc512376334700e5f7596e133c664
|
Provenance
The following attestation bundles were made for sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl:
Publisher:
release-sentence-sentiment-kb-sent.yml on spraakbanken/sparv-sbx-sentiment-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl -
Subject digest:
12e651091db894223bebeed01aa31ec1b40f5aaa5429a6bff05e755f0fd6fac4 - Sigstore transparency entry: 582954463
- Sigstore integration time:
-
Permalink:
spraakbanken/sparv-sbx-sentiment-analysis@9cf2f1a76fdec6e41a804dbc9da80f1edf4ace1e -
Branch / Tag:
refs/tags/sentence-sentiment-kb-sent-v0.3.0 - Owner: https://github.com/spraakbanken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sentence-sentiment-kb-sent.yml@9cf2f1a76fdec6e41a804dbc9da80f1edf4ace1e -
Trigger Event:
push
-
Statement type: