Skip to main content

Robby

Project description

Probabilities as a Service

https://img.shields.io/travis/smn/robby.svg https://img.shields.io/pypi/v/robby.svg Code Coverage Robby Documentation

Available as a docker container with docker pull sdehaan/robby. The docker container allow the for the following environment variables:

  • REDIS_HOST, defaults to 127.0.0.1

  • REDIS_PORT, defaults to 6379

  • REDIS_DB, defaults to 1

  • ROBBY_PORT, defaults to 8080

  • ROBBY_PREFIX, the prefix for Redis keys, defaults to robby

  • ROBBY_STEMMING_LANGUAGE, defaults to english

  • ROBBY_TOKENIZER, the python callable to use for tokenizing. Defaults to robby.utils.english_tokenizer, robby.utils.dumb_tokenizer is also available.

Or pip install robby and run directly:

robby \
    --redis-uri redis://127.0.0.1:6379/1 \
    --interface 0.0.0.0 \
    --port 8080 \
    --prefix robby \
    --stemming \
    --stemming-language=english \
    --tokenizer=robby.utils.english_tokenizer \
    --debug

API

To train it:

$ curl -d 'training sample' http://localhost:8080/train/category

To untrain it:

$ curl -d 'training sample' http://localhost:8080/untrain/category

To train it in batches:

$ curl -d '[{"category": "category", "content": "training sample"}]' http://localhost:8080/batch/train

To classify:

$ curl -d 'sample message' http://localhost:8080/classify
{
    "category": "category"
}

To get scoring:

$ curl -d 'sample message' http://localhost:8080/score
{
    "category": 0.01
}

To get clear the db:

$ curl -X DELETE http://localhost:8080/flush

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

robby-0.4.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

robby-0.4.0-py2-none-any.whl (10.2 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for robby-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cea199adaa00a6185bc3c16901733c60f8ce570c160172a29dca49caf502c5d1
MD5 8da0d7df957b19e05d23e6401522147e
BLAKE2b-256 1e4cbc418445b297796fc4bd79cd423f9633f61e2b48861772ec8ef13691ce00

See more details on using hashes here.

Provenance

File details

Details for the file robby-0.4.0-py2-none-any.whl.

File metadata

File hashes

Hashes for robby-0.4.0-py2-none-any.whl
Algorithm Hash digest
SHA256 17d0b51bbbe7e6afe8d62740fee820c369c38b2383cd5beed593125d50fce43d
MD5 b68b56dac8eb8359ca7105e08a6392f8
BLAKE2b-256 cef212bde30c9c4bd59a24ec13f6f8bd5eda5bb36510ae5ebe8bddc4f4cad66b

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