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.2.0a2.tar.gz (13.6 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.2.0a2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file ovos_markov_pipeline_plugin-0.2.0a2.tar.gz.

File metadata

File hashes

Hashes for ovos_markov_pipeline_plugin-0.2.0a2.tar.gz
Algorithm Hash digest
SHA256 184f61d7acd26b81ce94a005fb11d687c1d947f9794c7e2d135041a4e7ff251e
MD5 4674512cddf66f2306e078d2101581ab
BLAKE2b-256 7e09e2d71286a323af573726d9290d66b51ca45a038c23dfac296467a434cb8c

See more details on using hashes here.

File details

Details for the file ovos_markov_pipeline_plugin-0.2.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_markov_pipeline_plugin-0.2.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 67f6009c8540cb89a3658b98060b55fb007be7897cb3aed33016857e85d09510
MD5 05d778d8d15a8c7edb7db3ceeae37d99
BLAKE2b-256 f1a9c77c389e281f90700dd6f979df2800e15f5264c51a72d2c0594a2400e778

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