Skip to main content

A text classification engine using machine learning and designed as client-server architecture

Project description

OpenTC is a text classification engine using machine learning. It is designed as client-server architecture and uses python libraries scikit-learn and tensorflow for it’s machine learning algorithms. Currently following algorithms are supported:

  • Naive Bayes

  • Support Vector Machine

  • Convolutional Neural Network

In the future it will also support FastText from Facebookresearch.

The engine is running as a server listening on command and text to be classified. By default it listens on localhost port 3333, but it can be changed in the yaml configuration file.

Requirements

  • Python 3.x

  • numpy

  • pyparsing

  • PyYAML

  • scikit-learn

  • scipy

  • tensorflow 1.x

opentcd

synopsis

opentcd

Description

The daemon listens for incoming connections on TCP socket and classify files or text string on demand. It reads the configuration from /etc/opentc/opentc.yml

Commands

The command uses a newline character as the delimiter. If opentcd doesn’t recognize the command, or the command doesn’t follow the requirements specified below, it will reply with an error message, but still wait for the next commands (this behaviour can be changed in the future).

PING

Check the server’s state. It should reply with “PONG”.

VERSION

Print the program version

RELOAD

Reload the engine

LIST_CLASSIFIER

List the supported classifiers (at the moment there are three classifiers supported: Bayesian, Support Vector Machine and Convolutional Neural Network). It shows also the status of classifier, either True (enabled) or False (disabled).

SET_CLASSIFIER

Enabled or disabled the specific classifier

PREDICT_STREAM

Classify text streams. It uses a new line character as delimiter for every sentences.

PREDICT_FILE

Classify file. It uses a new line character as delimiter for every sentences

CLOSE

Close the connection

Todo

  • Multilabel classification

  • Include FastText from Facebookresearch

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

opentc-0.4.0.tar.gz (17.0 kB view details)

Uploaded Source

File details

Details for the file opentc-0.4.0.tar.gz.

File metadata

  • Download URL: opentc-0.4.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opentc-0.4.0.tar.gz
Algorithm Hash digest
SHA256 848b9a66383cf38772d61af9a521b404cd6fa7a23b4a9fd9d998cb4326db0e71
MD5 b49315426f5773f99e0b3aa333afa0e6
BLAKE2b-256 104c368d54e7903f3f1bc6b7c569435bf98458d2507d9996c6f5d1e69dd1ba72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page