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'

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 | RSS feed

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.

Source Distribution

django-textclassifier-1.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

django_textclassifier-1.0-py2-none-any.whl (5.7 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page