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 | |
|---|---|---|---|
| simplebayes-1.0.6.tar.gz | 4.0 kB | Details |
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 |