Sentimental Onix
Sentiment Analysis using onnx for python with a focus on being spacy compatible and EEEEEASY to use.
Features
- English sentiment analysis
- Spacy pipeline component
- Sentiment model downloading from github
Install
$ pip install sentimental_onix
# download english sentiment model
$ python -m sentimental_onix download en
Usage
import spacy
from sentimental_onix import pipeline
nlp = spacy.load("en_core_web_sm")
nlp.add_pipe("sentencizer")
nlp.add_pipe("sentimental_onix", after="sentencizer")
sentences = [
(sent.text, sent._.sentiment)
for doc in nlp.pipe(
[
"i hate pasta on tuesdays",
"i like movies on wednesdays",
"i find your argument ridiculous",
"soda with straws are my favorite",
]
)
for sent in doc.sents
]
assert sentences == [
("i hate pasta on tuesdays", "Negative"),
("i like movies on wednesdays", "Positive"),
("i find your argument ridiculous", "Negative"),
("soda with straws are my favorite", "Positive"),
]
Benchmark
| library | result |
|---|---|
| spacytextblob | 58.9% |
| sentimental_onix | 69% |
See ./benchmark/ for info
Dev setup / testing
expand
Install
install the dev package and pyenv versions
$ pip install -e ".[dev]"
$ python -m spacy download en_core_web_sm
$ python -m sentimental_onix download en
Run tests
$ black .
$ pytest -vvl
Packaging and publishing
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload dist/*
Metadata
Release files for sentimental-onix 0.0.2
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 |
|---|---|---|---|---|
| sentimental-onix-0.0.2.tar.gz | 10.9 kB | Without provenance | Details for sentimental-onix-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sentimental_onix-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for sentimental_onix-0.0.2-py3-none-any.whl |
Total release size: 21.5 kB
Release files / sentimental-onix-0.0.2.tar.gz
| Download URL | sentimental-onix-0.0.2.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe7604b86d3258aa3766aa7aa3c481511cd2e4c3f150954197d900ea28c8505a
|
|
BLAKE2b-256 checksum How to use checksums |
6f1f5dfc2d38a498f3429a01a2fd627fc9d2741c4ee69ccb4480c3e89f3d269c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / sentimental_onix-0.0.2-py3-none-any.whl
| Download URL | sentimental_onix-0.0.2-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a0a2e164042b0d2079e7ea6019ef778b889eb43875204211fd3ae18e8ae1388
|
|
BLAKE2b-256 checksum How to use checksums |
095db90febf1cb286b1fde87560b5366622f39c6cc2411e4e3497ab2c0902ead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for sentimental-onix 0.0.2
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.