Skip to main content
Pre-release

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

License

Adapt Intent Parser

Adapt is a keyword and rule based intent parser. It reads an utterance and matches it to a registered intent, then extracts the entity values the intent needs. This repository provides an OVOS pipeline plugin and bundles a maintained fork of the original MycroftAI/adapt parser, from the now-defunct MycroftAI.

Three OPM pipeline entry points are exposed:

  • ovos-adapt-pipeline-plugin (AdaptPipeline), the flat pipeline. It wraps a single IntentDeterminationEngine and all skills share one trie.
  • ovos-adapt-domain-pipeline-plugin (DomainAdaptPipeline), a per-skill pipeline. It wraps DomainIntentDeterminationEngine. Each skill_id gets its own sub-engine ("domain"). At match time every domain is scored in parallel and the global argmax wins. Configure it under intents.ovos_adapt_domain_pipeline.
  • ovos-adapt-hierarchical-pipeline-plugin (HierarchicalAdaptPipeline), the same per-skill domain model, with two-stage routing. A stage-1 classifier picks one domain, then only that domain's sub-engine is scored. Configure it under intents.ovos_adapt_hierarchical_pipeline.

See Pipeline variants for when to use each.

Install

pip install ovos-adapt-parser

Usage

The adapt parser also works standalone, with no OVOS and no messagebus:

from ovos_adapt.intent import IntentBuilder
from ovos_adapt.engine import IntentDeterminationEngine

engine = IntentDeterminationEngine()

# register vocabulary: surface forms grouped by entity type
for word in ["weather", "forecast"]:
    engine.register_entity(word, "WeatherKeyword")
for city in ["Seattle", "San Francisco", "Tokyo"]:
    engine.register_entity(city, "Location")

# build an intent over those entity types
weather = IntentBuilder("WeatherIntent") \
    .require("WeatherKeyword") \
    .require("Location") \
    .build()
engine.register_intent_parser(weather)

# match
for intent in engine.determine_intent("what is the forecast in Tokyo"):
    if intent.get("confidence", 0) > 0:
        print(intent)

In a full OVOS install the plugin runs as a pipeline stage instead. Skills register vocabulary and intents over the messagebus, and the plugin matches incoming utterances automatically. More runnable examples ship in the examples/ folder.

Documentation

A full guide, from first concepts to internals, lives in docs/:

Reporting issues

Adapt is difficult to debug without full context. Include a serialized copy of the intent determination engine, using the debug dump utilities:

from ovos_adapt.engine import IntentDeterminationEngine

engine = IntentDeterminationEngine()
# load engine with vocabulary and parsers

import ovos_adapt.tools.debug as atd

atd.dump(engine, 'debug.ovos_adapt')

License

Apache License 2.0. See LICENSE.md.

Metadata

Release files for ovos-adapt-parser 1.6.3a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-adapt-parser 1.6.3a3
File Size Uploaded
ovos_adapt_parser-1.6.3a3.tar.gz 68.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovos-adapt-parser 1.6.3a3
File Interpreter ABI Platform
ovos_adapt_parser-1.6.3a3-py3-none-any.whl Python 3 none any Details

Total release size: 116.8 kB

Release files / ovos_adapt_parser-1.6.3a3.tar.gz

Download URL ovos_adapt_parser-1.6.3a3.tar.gz
Size 68.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eea14b90b381c5bac2fb3c6b4fffddc2473f8c01004f5d08411b59e188bb1693
BLAKE2b-256 checksum
How to use checksums
5827c35fb773b8d049255da15cd0ae3bf199188f54e68a061c4c2bedfad91dc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ovos_adapt_parser-1.6.3a3-py3-none-any.whl

Download URL ovos_adapt_parser-1.6.3a3-py3-none-any.whl
Size 48.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70de26263cbf8e4c28df099dd497e03fe8b7c23665f9143291f0c97ad3758b8a
BLAKE2b-256 checksum
How to use checksums
7841a3e6f7fdd1a673a1336db43d7a1e7f36fad77861a50bb4502ca5bfe10b93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.6.3a3 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page