Skip to main content
Pre-release

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

ovos-typed-slots-transformer

The reference typed-slots transformer for OVOS. It reads the candidate utterances and returns the typed-slots map of OVOS-INTENT-1 §5.6: for each type it was asked for, a list of {"span": [start, end], "surface", "value"} entries whose offsets are half-open code-point positions, so utterance[start:end] == surface always holds. It computes four types with the OVOS parsers — number as a JSON number, date as (an RFC 3339 timestamp in the session's zone, taken from location.tz and falling back to the deployment zone), duration (seconds) and color (a {"hex": "#rrggbb", "name"} pair). It never touches the utterances or the message context, and every map it returns is checked against the spec before it leaves the plugin. A type whose entries fail validation is logged and dropped rather than raised.

The orchestrator loads one typed-slots transformer, hands it the set of types the registered intents declared, and carries the resulting map to intent matching. Because the plugin sees every candidate utterance and computes over all of them, an entry's span indexes the candidate it was read from, and the surface invariant is what lets a consumer tell which candidate an entry belongs to. The map carries only types with at least one entry, never an empty list: a key is present exactly when extraction produced something. A type is therefore absent whether its parser found no such expression, is not installed, does not cover the session language, or raised, and a consumer reads absence as "no slots of this type" without having to distinguish those cases. All three parsers are hard dependencies, so a normal install can compute all four types, and the lazy per-type imports only matter to someone who has pruned one of them out.

Language coverage is the parser's, not the plugin's. The number parser refuses a language it does not implement, so nothing is written for number under one. The date parser instead answers any language by falling back to an English-driven parser, so its results for an uncovered language are only as good as that fallback.

Configuration

Under typed_slots_transformers in mycroft.conf:

{
  "typed_slots_transformers": {
    "ovos-typed-slots-transformer": {
      "priority": 50,
      "all_types": false
    }
  }
}

all_types computes all four supported types regardless of what the intents declared, which is useful when something downstream of intent matching wants the slots. It costs time on every utterance and is off by default.

Cost

Extraction is per type and per candidate utterance, so the price is the sum of the declared types times the number of candidates. On a ten-word English sentence the date and duration parsers dominate at roughly 8 ms each, numbers cost under 2 ms, and colours are effectively free at well under a millisecond. Asking for all four costs under 20 ms. Declaring only the types an intent actually needs is the cheapest thing a skill can do here.

Metadata

Release files for ovos-typed-slots-transformer 0.0.1a4

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-typed-slots-transformer 0.0.1a4
File Size Uploaded
ovos_typed_slots_transformer-0.0.1a4.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovos-typed-slots-transformer 0.0.1a4
File Interpreter ABI Platform
ovos_typed_slots_transformer-0.0.1a4-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / ovos_typed_slots_transformer-0.0.1a4.tar.gz

Download URL ovos_typed_slots_transformer-0.0.1a4.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cad4ab8c88eab7ba0fdbda6742654fcf9eff693f824878bdf87457ff4b3d7c32
BLAKE2b-256 checksum
How to use checksums
8fb589a6bfbd4654b3eab19bf43b8a5306d946c99a9c5da19984aff1a5fdd4fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ovos_typed_slots_transformer-0.0.1a4-py3-none-any.whl

Download URL ovos_typed_slots_transformer-0.0.1a4-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
064703eb9836f4b22070d4485a582fe124f9bc4debd94b3f48f51c909cd7b903
BLAKE2b-256 checksum
How to use checksums
e1a6a2a9abd41f37c78bda06691cc769871d3e2d4166a2ba174928b13b7bde25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
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