Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Django text classifier validation

Project Description

Validators and some utility functions for validating fields using a naive bayesian text classifier, provided by TextBlob

Usage

Add this application to your Django project:

INSTALLED_APPS = [
    ...
    'textclassifier',
    ...
]

You’ll also need to set the data file source in your settings:

TEXTCLASSIFIER_DATA_FILE = '/tmp/test.json'

Note

The current implementation is very basic, only allowing for one data file. This will eventually be more configurable, but is just a POC for now.

Data file

The data file needs to be written by hand for now as well. It is read using the TextBlob JSON formatter

The file should use the labels spam and valid:

[
    {"text": "This is spam", "label": "spam"},
    {"text": "This is valid", "label": "valid"}
]
Release History

Release History

This version
History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_textclassifier-1.0-py2-none-any.whl (5.7 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Nov 22, 2015
django-textclassifier-1.0.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting