Skip to main content

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

Vokal

Umlaut

aA

äÄ

oO

öÖ

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

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

TextClassifier-0.0.6.8.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file TextClassifier-0.0.6.8.tar.gz.

File metadata

File hashes

Hashes for TextClassifier-0.0.6.8.tar.gz
Algorithm Hash digest
SHA256 9d218dfb7d7569bc2fc1f47ecdd8896954949c2d0ed236030dda4c4e417ce909
MD5 c4feba418f19756cc7a3183372d81217
BLAKE2b-256 2d3990982422f7c0cc835923efc20bd2adc371620360f5ccbcdd6d730e346399

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