simplebayes
A memory-based, non-persistent naïve bayesian text classifier.
This work is heavily inspired by the python "redisbayes" module found here: [https://github.com/jart/redisbayes] and [https://pypi.python.org/pypi/redisbayes] I've elected to write this to alleviate the network/time requirements when using the bayesian classifier to classify large sets of text, or when attempting to train with very large sets of sample data.
Installation
PIP:
sudo pip install simplebayes
GIT:
sudo pip install git+git://github.com/hickeroar/simplebayes.git
Basic Usage
import simplebayes
bayes = simplebayes.SimpleBayes()
bayes.train('good', 'sunshine drugs love sex lobster sloth')
bayes.train('bad', 'fear death horror government zombie')
assert bayes.classify('sloths are so cute i love them') == 'good'
assert bayes.classify('i would fear a zombie and love the government') == 'bad'
print bayes.score('i fear god and love the government')
Metadata
Release files for simplebayes 1.0.6
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 |
|---|---|---|---|---|
| simplebayes-1.0.6.tar.gz | 4.0 kB | Without provenance | Details for simplebayes-1.0.6.tar.gz |
Release files / simplebayes-1.0.6.tar.gz
| Download URL | simplebayes-1.0.6.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef86a79d60f24cbb9ab9e105915febec2be4457061d1841c76e6b64bc94f6815
|
|
BLAKE2b-256 checksum How to use checksums |
7fde7bb65ccb39b1d4350bcba38efc271ca02f18e96b6d0c4d60cc628fdf5e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simplebayes 1.0.6
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.