- name:
redisbayes
- description:
Naïve Bayesian Text Classifier on Redis
- Copyright:
- © 2012 Justine Alexandra Roberts Tunney
- license:
MIT
What Is This?
It’s a spam filter. I wrote this to filter spammy comments from a high traffic forum website and it worked pretty well. It can work for you too :) It’s not tied to any particular format like email, it just deals with the raw text.
This is probably the only spam filtering library you’ll find for Python that’s simple (170 lines of code), works (30 lines of test code), and doesn’t suck.
Installation
From folder:
sudo python setup.py install
From cheeseshop:
sudo pip install redisbayes
From git:
sudo pip install git+git://github.com/jart/redisbayes.git
Basic Usage
import redis, redisbayes
rb = redisbayes.RedisBayes(redis=redis.Redis())
rb.train('good', 'sunshine drugs love sex lobster sloth')
rb.train('bad', 'fear death horror government zombie god')
assert rb.classify('sloths are so cute i love them') == 'good'
assert rb.classify('i fear god and love the government') == 'bad'
print rb.score('i fear god and love the government')
rb.untrain('good', 'sunshine drugs love sex lobster sloth')
rb.untrain('bad', 'fear death horror government zombie god')
Metadata
Release files for redisbayes 0.1.3
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 | |
|---|---|---|---|---|
| redisbayes-0.1.3.tar.gz | 9.8 kB | Without provenance | Details |
Release files / redisbayes-0.1.3.tar.gz
| Download URL | redisbayes-0.1.3.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cda0a35bd5892a8215bf60eb1e8d49f80bc8571b83417a583092199f78e0fb1
|
|
BLAKE2b-256 checksum How to use checksums |
cc67744d4b8241acf42663e90421727874659814dc3e2e4b21cbf17f37f3cf67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for redisbayes 0.1.3
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.