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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2

File details

Details for the file django-textclassifier-1.0.tar.gz.

File metadata

File hashes

Hashes for django-textclassifier-1.0.tar.gz
Algorithm Hash digest
SHA256 0286f572ef59bbb29374b190fd78bb6a75415a0c62b6fed47b62d23f688b0018
MD5 4c749952f195be66a27565b9907b6989
BLAKE2b-256 ed94f8df423db8e9582617b5b4fbce72b42e69965d6823dec60e34709a8d0e82

See more details on using hashes here.

Provenance

File details

Details for the file django_textclassifier-1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for django_textclassifier-1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 9d89f98e9c0677db150c4971d6f6e4ff4d7d7ef5665e4b35a74fc1bfd224648c
MD5 dba7e0ec2d4a9ae246021875b1c85994
BLAKE2b-256 b17eb86a5b15d6508ade4e77274253270416ee227cbd7be9f14d0f5f83107b53

See more details on using hashes here.

Provenance

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