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 notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size & hash SHA256 hash help | File type | Python version | Upload date |
---|---|---|---|
django_textclassifier-1.0-py2-none-any.whl (5.7 kB) Copy SHA256 hash SHA256 | Wheel | 2.7 | Nov 22, 2015 |
django-textclassifier-1.0.tar.gz (3.4 kB) Copy SHA256 hash SHA256 | Source | None | Nov 22, 2015 |