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.

Numbers come from numtag. Each number in a candidate gives one entry, so "twenty one and twenty" gives 21 and 20. A whole value is a JSON integer, and a decimal or a fraction ("a third") is a JSON float. An article alone before its noun, such as "uma" in "uma casa", is not written as a number.

Language coverage is the parser's, not the plugin's. numtag refuses a language it has no lexicon for, 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.1a6

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.1a6
File Size Uploaded Provenance Actions
ovos_typed_slots_transformer-0.0.1a6.tar.gz 13.2 kB Without provenance Details for ovos_typed_slots_transformer-0.0.1a6.tar.gz

Built distribution (wheel)

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

Total release size: 24.1 kB

Release files / ovos_typed_slots_transformer-0.0.1a6.tar.gz

Download URL ovos_typed_slots_transformer-0.0.1a6.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dbc1d7e064baf4cb51f4d8a2fa5abe39a8bfc8be7da5fad1cc67bb8306e68298
BLAKE2b-256 checksum
How to use checksums
d1141ed5451d243c691ff06826f33d2d84081c506c5b142e39da62b551d6f44d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

Download URL ovos_typed_slots_transformer-0.0.1a6-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d158e929f0030bacba4a89bc6f853c6b57bf2cc5302512a85b541bf12aef39d
BLAKE2b-256 checksum
How to use checksums
83c8c35185bd78ccb1ffe6734633ec21a0288bf95249311d23d7caf60a41d011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ovos-typed-slots-transformer 0.0.1a6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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