Skip to main content

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

PyPI version PyPI - Python Version PyPI - Downloads

Maturity badge - level 2 Stage

CI(release)

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

sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz.

File metadata

File hashes

Hashes for sparv_sbx_sentence_sentiment_kb_sent-0.3.0.tar.gz
Algorithm Hash digest
SHA256 204c35d143af36ddf6e9f132611d2bf1afcb7903caa93e8f21923497a97d3a8d
MD5 73aebbd7152f802eddbc242ffdb826c0
BLAKE2b-256 9a83964370cf4a1945ce3165b1ea52d034b36c51a51f2721a8be9f122643a527

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sparv_sbx_sentence_sentiment_kb_sent-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12e651091db894223bebeed01aa31ec1b40f5aaa5429a6bff05e755f0fd6fac4
MD5 4b2838102cc6e90f3b215ffc96eebf59
BLAKE2b-256 8a5b44a59d31a9a187be5c1fed22b3a7beafc512376334700e5f7596e133c664

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page