Skip to main content

OVOS intent pipeline plugin using Markov chain perplexity ensemble

Project description

ovos-markov-pipeline-plugin

An OVOS intent pipeline plugin that classifies utterances with an ensemble of per-intent Markov chains, scored by perplexity.

It trains one word-level Markov chain per intent from example utterances. At query time it computes the perplexity of the utterance under every model and picks the intent whose model is least "surprised" — lowest perplexity wins. Confidence is derived from perplexity, so the plugin slots cleanly into the OVOS high / medium / low confidence pipeline tiers.

Why a Markov pipeline?

Most OVOS intent matchers either pattern-match (Adapt, padacioso) or train a neural / SVM classifier (padatious, linha-fina). A Markov-chain language model sits in between: it is a lightweight statistical model that learns the word order of each intent's sample set, trains in milliseconds, needs no GPU, and degrades gracefully with very few samples. It is a practical baseline for small skill sets and a useful comparison point against the other matchers.

Install

pip install ovos-markov-pipeline-plugin

Optional stemming support (recommended for non-English use):

pip install ovos-markov-pipeline-plugin[stem]

Quick example

Enable the pipeline in mycroft.conf:

{
  "intents": {
    "pipeline": [
      "ovos-markov-pipeline-plugin-high",
      "ovos-markov-pipeline-plugin-medium",
      "ovos-markov-pipeline-plugin-low"
    ]
  }
}

Skills register their intents over the bus exactly as they do for padatious — no skill-side changes are required.

Documentation

Full documentation lives in docs/:

License

Apache-2.0

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

ovos_markov_pipeline_plugin-0.3.0a1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_markov_pipeline_plugin-0.3.0a1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file ovos_markov_pipeline_plugin-0.3.0a1.tar.gz.

File metadata

File hashes

Hashes for ovos_markov_pipeline_plugin-0.3.0a1.tar.gz
Algorithm Hash digest
SHA256 67c959ec71d9fce554b3a8568334d98bbbd6e84bb8a14a52fd4e50aa40bed59c
MD5 eb2eba89b7ff2e5deb936b692a566c84
BLAKE2b-256 402e611f00758f8a2ed92913b6da18d670ea9a0b04e64046847f386da40d6dd0

See more details on using hashes here.

File details

Details for the file ovos_markov_pipeline_plugin-0.3.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_markov_pipeline_plugin-0.3.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2fe762cb0ca9a52798dbbb8bb29f17933d40b4f71c830363e508ff9bbec60ee
MD5 b0b8e4897dc78e29c3da1fb7157c380c
BLAKE2b-256 e327835d87143563ed84e810cd4a9c3eac56aa3cf2015e2f806c0a5bc3bdd76e

See more details on using hashes here.

Supported by

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