Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
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):

```
import chClassifier
p = chClassifier.Trainer("sample/words", "sample/parts-of-speech")
p.train([100, 100], 20, 100)
p.save("sample", "example-run")
```

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

```
import chClassifier
k = chClassifier.Classifier("sample", "example-run")
print k.classify("dog")
```

This will return an array of tuples of original label + likelyhood that the label is correct, like so:

```
>> print k.classify("dog")
[(u'VB', 0.050349433), (u'NN', 3.8027303)]
```

The higher the number, the more sure we are of the classification (`dog` is definitely a noun, for example, and probably not a verb).
Release History

Release History

This version
History Node

0.6.4

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
chClassifier-0.6.4-py2.py3-none-any.whl (10.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Mar 11, 2016
chClassifier-0.6.4.tar.gz (5.8 kB) Copy SHA256 Checksum SHA256 Source Mar 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting