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

Neural Network to classify short strings

Project Description

Char Classifier

Given a short phrase, train a neural network to classify it based on the characters that it contains.

The trainer takes in a file of phrases (separated by new line) and a file of target values (separated by new line).

To train on the sample data (parts of speech classification):

from phrase_classifier import PhraseClassificationTrainer, PhraseClassifier
p = PhraseClassificationTrainer("sample/words", "sample/parts-of-speech")
p.train([100, 100], 20, 100)"sample", "example-run")

This will save a trained model with the tag 'example-run' in the sample directory. To use that model, run:

k = PhraseClassifier("sample", "example-run")
print k.classify("dog")

Release History

This version
History Node


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
(6.5 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Feb 26, 2016
(5.7 kB) Copy SHA256 Hash SHA256
Source None Feb 26, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate