Skip to main content

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

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

Project details


Download files

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

Source Distribution

chClassifier-0.6.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

chClassifier-0.6.1-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file chClassifier-0.6.1.tar.gz.

File metadata

File hashes

Hashes for chClassifier-0.6.1.tar.gz
Algorithm Hash digest
SHA256 3997afd195aa0fd9239274dd0634678fe287d41e43bea37bae204a80e0182942
MD5 8d50f25ad5abb0d146c5897849f5123f
BLAKE2b-256 452d2f92edc18fbf1925cac45790f5ffb1f8707007ad9f743f42914f58e3e5dd

See more details on using hashes here.

File details

Details for the file chClassifier-0.6.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for chClassifier-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 543cc066790fe2068395b5b704ae068adad856695c1ca1e75289a38a69642ec0
MD5 a9642a3fd397df0e033d3793828b2588
BLAKE2b-256 2127f305a061dc10a718c8c58aae70bacdd6bf8cbd3cd79f25c7d16f67d7ac0e

See more details on using hashes here.

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