Skip to main content

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)

Source distribution for simplebayes 1.0.6
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

Release history Release notifications | RSS feed

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.5.8

4 release files

1.5.7

4 release files

1.5.6

4 release files

1.5.5

4 release files

1.5.4

4 release files

1.5.3

4 release files

1.5.2

4 release files

1.5.1

4 release files

1.5.0

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.8

1 release file

1.0.7

1 release file

This release

1.0.6 This release

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page