semvec/pypi-packages huggingface dataset:
redisbayes 0.1.3
Naïve Bayesian Text Classifier on Redis
License: MIT

.. -*-rst-*-

============
 redisbayes
============

: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')
django-bosssearch 1.1
Search with Yahoo BOSS!
License: MIT

=================
django-bosssearch
=================

Search the web or a specific domain in your Django project using the
Yahoo BOSS API.

Installation
============

First, add ``djangobosssearch`` to ``INSTALLED_APPS``

Using the BOSS API requires a key and a secret. Get them
from http://developer.yahoo.com/search/boss/ and add them to your
projects settings::

    BOSS_API_KEY = ''
    BOSS_API_SECRET = ''

Then include the views in your projects urlconf::

    urlpatterns = patterns('',
        url(r'^search/$', include('djangobosssearch.bosssearch_urls')),
    )

If you want the search to be limited to a certain domain add the following
to the settings::

    BOSS_SITE_SEARCH_DOMAIN = 'example.com'

Templates
=========

The templates provided are just an example. Pagination on the results page
(`bosssearch/results.html`) is done using
`django-pagination <http://pypi.python.org/pypi/django-pagination>`_.

Configuration
=============

Besides the previously mentioned configuration keys, the following options
are also useful if you use the provided urlpatterns and view.

``BOSS_SEARCH_MARKET``
The region (country) to search in (default: 'en-us').

``BOSS_RESULTS_PER_PAGE``
The number of results per page (default: 50).

Changes
=======

1.1 (2012-07-02)
----------------

- Fixed UnicodeEncodeError caused by oauth request to_url


1.0 (2012-05-11)
----------------

- Initial release