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

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