Lexical Sentiment and Text Complexity Analysis in Danish
Project description
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!')
Project details
Release history Release notifications | RSS feed
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 sentm-0.2.1.tar.gz.
File metadata
- Download URL: sentm-0.2.1.tar.gz
- Upload date:
- Size: 6.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.9.9 Darwin/21.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1db463558fef46b9a386f11382ba33b2418d42ecff4bbe7efec6c23f26879955
|
|
| MD5 |
a2e157ec9d7176b213e625fcaf2698e8
|
|
| BLAKE2b-256 |
26fbcac1a7bc29f8a79a2480765d716114701af2605faa4800d5ce36f65f876c
|
File details
Details for the file sentm-0.2.1-py3-none-any.whl.
File metadata
- Download URL: sentm-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.9.9 Darwin/21.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a1fc5ba61637e3e8034cb43169c2af2f92b611f00dbda91abe2f7a3bcfd1a3a
|
|
| MD5 |
800847fa1fec60cec1e8d3fa0282337a
|
|
| BLAKE2b-256 |
92d1ec4ae2f4488b133c81ba012947b2256308cabeee18dede9147e532f93795
|