Skip to main content
Pre-release

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

ovos-utterance-normalizer

ovos-utterance-normalizer is an OVOS plugin that normalizes utterances before intent parsing. It expands contractions, converts spoken numbers to digits, strips punctuation, and applies other language-specific cleanup so that intent parsers get a consistent input.

The plugin also fixes text encoding errors with python-ftfy.

It is enabled by default in mycroft.conf.

Install

pip install ovos-utterance-normalizer

Usage

ovos-utterance-normalizer registers as an OVOS PHAL opm.transformer.text plugin, named ovos-utterance-normalizer. ovos-core loads it automatically when it is installed and enabled in the configuration.

For each utterance, the plugin produces up to three variants: the utterance with contractions expanded, the original utterance, and the normalized utterance. Punctuation is stripped from each variant, and duplicates are removed while keeping the original order.

Supported configuration options, under the plugin name in mycroft.conf:

Option Default Description
lang en-us Fallback language, used when no language is given in the utterance context
fix_encoding_errors true Fix encoding errors with ftfy before normalizing
strip_punctuation true Strip punctuation from each output variant

Normalization is language-specific. English, Portuguese, Ukrainian, Catalan, Czech, Azerbaijani, Russian, and German each have a dedicated normalizer. Other languages fall back to the generic normalizer.

Related projects

  • ovos-plugin-manager, which loads and runs this plugin as an opm.transformer.text transformer.
  • ovos-config, which ships the default mycroft.conf that enables this plugin.
  • ovos-core, the assistant runtime that calls transformer plugins before intent parsing.

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

ovos_utterance_normalizer-0.2.5a2.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

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

ovos_utterance_normalizer-0.2.5a2-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file ovos_utterance_normalizer-0.2.5a2.tar.gz.

File metadata

File hashes

Hashes for ovos_utterance_normalizer-0.2.5a2.tar.gz
Algorithm Hash digest
SHA256 2025f956a76e6d4d764a6dbcf7b96134301a97499329d4558f47c5c8c75a3e62
MD5 cf788a4b08e8ec3a050aa5a9f957d7c1
BLAKE2b-256 a3754783fb296493e67b672236e8db95196911fcaf0a2676f5a088a9e8f172c0

See more details on using hashes here.

File details

Details for the file ovos_utterance_normalizer-0.2.5a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_utterance_normalizer-0.2.5a2-py3-none-any.whl
Algorithm Hash digest
SHA256 78ae9f62bf3aaaf355e24242beb1344e3b6c3ead6a1a94254dc123ef332a2204
MD5 d9f3718daaf83779bdf7514b04c0732a
BLAKE2b-256 ff804276b214da6b51764534f936d91ff612fb3811628277326c82ea1a0caa78

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