Skip to main content

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"}
]

Project details


Release history Release notifications

This version

1.0

Download files

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

Files for django-textclassifier, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size django_textclassifier-1.0-py2-none-any.whl (5.7 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size django-textclassifier-1.0.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page