Short text Classifier based on Numpy,scikit-learn,Pandas,Matplotlib
Project description
A simple, efficient short-text classification tool based on Numpy,scikit-learn,Pandas,Matplotlib.
Train Data Format
type |
Text |
---|---|
game |
The LoL champions pro players would ban forever |
society |
In Beijing you should keep the rules |
etc. |
etc. |
Sample Usage
>>> import TextClassifier
>>> tc = TextClassifier.classifier_container()
>>> tc.load_Data('../data/Train.txt')
>>> tc.train()
>>> print tc.predict('Faker is the first League of Legends player to earn over $1 million in prize money')
>>> [u'game']
>>> print tc.predict(['Faker is the first League of Legends player to earn over $1 million in prize money',
'18-year-old youth killed 88-year-old veteran',
'Take you into the real North Korea'])
>>> [u'game',u'society',u'world']
Installation
$ pip install TextClassifier
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file TextClassifier-0.0.6.7.tar.gz
.
File metadata
- Download URL: TextClassifier-0.0.6.7.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318020453c45764ba0a2c0c94600aab66076047c575ce62a9f17617f718b3fa3 |
|
MD5 | 9e237260bd661503834d6995067b6dec |
|
BLAKE2b-256 | 31c3915e6126e3885f1a1bc73e59af96bcb7b678ab093dde970a4fd00c804b35 |