Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

palavreado

Keyword-based intent parser for OVOS voice assistants — the drop-in replacement for Adapt.

Palavreado matches natural-language utterances against named intents built from required and optional keyword slots. Each slot holds a list of vocabulary words; if the right words are present in the utterance, the intent fires. Optional regex and simplematch autoregex patterns enable entity extraction.


Install

pip install palavreado

For the OVOS pipeline plugin:

pip install "palavreado[ovos]"

Quick start

from palavreado import IntentContainer, IntentCreator

container = IntentContainer()

intent = (
    IntentCreator("lights_off")
    .require("off",   ["off", "disable", "shutdown"])
    .require("light", ["light", "lights", "lamp"])
)
container.add_intent(intent)

result = container.calc_intent("turn off the lights")
print(result["name"])      # lights_off
print(result["conf"])      # 0.9438
print(result["keywords"])  # {'off': ['off'], 'light': ['light']}
print(result["utterance_remainder"])  # 'turn the'

An intent only fires when every required slot has at least one keyword match in the utterance.

Optional slots

intent = (
    IntentCreator("lights_off")
    .require("off",   ["off", "disable"])
    .require("light", ["light", "lights"])
    .optionally("room", ["kitchen", "bedroom", "bathroom"])
)
container.add_intent(intent)

result = container.calc_intent("turn off the bedroom lights")
print(result["keywords"]["room"])  # ['bedroom']

Autoregex / entity extraction

intent = (
    IntentCreator("buy")
    .require_autoregex("item", ["buy {item}", "purchase {item}", "get {item}"])
)
container.add_intent(intent)

result = container.calc_intent("buy some milk")
print(result["keywords"]["item"])  # ['some milk']

OVOS pipeline plugin

Palavreado ships an OVOS pipeline plugin that replaces Adapt as the keyword intent engine. It responds to the same bus events (register_vocab, register_intent, detach_intent, detach_skill) so existing skills need no changes.

Configure in mycroft.conf:

{
  "intents": {
    "palavreado": {
      "conf_high": 0.65,
      "conf_med":  0.45,
      "conf_low":  0.25
    }
  }
}

Entry point: palavreado.opm:PalavreadoPipeline


Documentation

Page Description
Quickstart 5-minute guide: keyword intents, optional slots, autoregex
Intent API Full IntentCreator and IntentContainer reference
Confidence Scoring How scores are calculated: formula, penalties, bonuses
Normalisation Apostrophe handling, whitespace, plural/singular lemmatizer
Context Gating Require / exclude contexts, worked examples
OVOS Pipeline Plugin Bus events, confidence tiers, migration from Adapt
Configuration All config keys with types, defaults, and effect
Benchmark Accuracy results and how to reproduce them
Troubleshooting Common issues and fixes

Benchmark

Evaluated on a keyword-intent dataset of 284 cases (217 match utterances across 22 intents, 67 no-match utterances).

Engine Accuracy Precision Recall F1 TN / no-match FP Median latency
palavreado 81.7% 80.6% 94.0% 0.868 28 / 67 49 0.58 ms
adapt 80.3% 81.0% 90.3% 0.854 32 / 67 46 0.20 ms
python benchmark/compare.py

Credits

Originally an experimental research project by TigreGóticoLda, polished and donated to OpenVoiceOS. Its modernization, integration into OpenVoiceOS, and intent benchmarking were funded by the NGI0 Commons Fund.

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.


License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

palavreado-1.7.1a1.tar.gz (101.1 kB view details)

Uploaded Source

Built Distribution

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

palavreado-1.7.1a1-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

Details for the file palavreado-1.7.1a1.tar.gz.

File metadata

  • Download URL: palavreado-1.7.1a1.tar.gz
  • Upload date:
  • Size: 101.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for palavreado-1.7.1a1.tar.gz
Algorithm Hash digest
SHA256 4d9732be8eff03baad58eab6cb6d853ca1fe4b0ec1a03233ef2b5804068a1b87
MD5 bb0d8bed687c33f528a0cc9a04179f6d
BLAKE2b-256 59377bfe67c0daa0dd1210a25a21e5b9c4010b4c30be04d236d64c5186dc6660

See more details on using hashes here.

File details

Details for the file palavreado-1.7.1a1-py3-none-any.whl.

File metadata

  • Download URL: palavreado-1.7.1a1-py3-none-any.whl
  • Upload date:
  • Size: 84.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for palavreado-1.7.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e979fc2a99ffd3dccf40632bde5d0770736b91d6643a6ed1e2a2eb67d7d2260
MD5 4c19ad4c30291adddbfdf92a08ed2c87
BLAKE2b-256 7db8214e17898dc429e46a3cf55243eefda00c3a923892d2d8760a6cd67ca915

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 Sentry Error logging StatusPage Status page