senTM
Pronounced "sen-T-M".
senTM is a lexical approach to sentiment analysis in Danish. The approach is inspired by the afinn package, but using the Danish Sentiment Lexicon version 0.2 (2022-12-20).
The approach use the part-of-speech (POS) model from Spacy and then matches any tokens from the Danish Sentiment Lexicon.
License: Same as Danish Sentiment Lexicon version 0.2 (2022-12-20): CC-BY-SA 4.0 International https://creativecommons.org/licenses/by-sa/4.0/
Installation
Install from pip:
pip install sentm
Quickstart
First initialize model.
from sentm.sentm import senTM
sentm_model = senTM()
You can both get sentiment score:
sentm_model.score('Du er en kæmpe idiot!')
You can also use it as a classifier. Here, the labels are determined by:
- Score larger than 1: "positiv"
- Score between -1 and 1: "neutral"
- Score lower than -1: "negativ"
sentm_model.classify('Du er en kæmpe idiot!')
Metadata
Release files for sentm 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sentm-0.2.1.tar.gz | 6.5 MB | Without provenance | Details for sentm-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sentm-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for sentm-0.2.1-py3-none-any.whl |
Total release size: 13.1 MB
Release files / sentm-0.2.1.tar.gz
| Download URL | sentm-0.2.1.tar.gz |
|---|---|
| Size | 6.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1db463558fef46b9a386f11382ba33b2418d42ecff4bbe7efec6c23f26879955
|
|
BLAKE2b-256 checksum How to use checksums |
26fbcac1a7bc29f8a79a2480765d716114701af2605faa4800d5ce36f65f876c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.9.9 Darwin/21.1.0
|
Release files / sentm-0.2.1-py3-none-any.whl
| Download URL | sentm-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a1fc5ba61637e3e8034cb43169c2af2f92b611f00dbda91abe2f7a3bcfd1a3a
|
|
BLAKE2b-256 checksum How to use checksums |
92d1ec4ae2f4488b133c81ba012947b2256308cabeee18dede9147e532f93795
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.9.9 Darwin/21.1.0
|
Security for sentm 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.