Skip to main content

A sparv plugin for computing sentence sentiment.

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

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


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

File hashes

Hashes for sparv_sbx_sentence_sentiment_kb_sent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d57e54d0ab2c904f5317b4f0f1785b6b7019295519bcb0d093289088af95bcf6
MD5 5bfaf330f2e770e369e63a36810f3357
BLAKE2b-256 3d63ecd7a0ecdf9892c6bd0e17d4aeeee5a611224f771b62d5ded3e03d5e1667

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparv_sbx_sentence_sentiment_kb_sent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e800177d2cef7ca834053f3127b57450217b597bfd7f814302701343cc8cd9
MD5 ded748e9e7cbf54809239ae1ff3f3c8f
BLAKE2b-256 8030fc34c4c490f5d54894d8813322c774fe933683393651ce70dcc9f3461665

See more details on using hashes here.

Supported by

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