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.texttransformer. - ovos-config, which ships the default
mycroft.confthat 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_utterance_normalizer-0.2.5a2.tar.gz.
File metadata
- Download URL: ovos_utterance_normalizer-0.2.5a2.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2025f956a76e6d4d764a6dbcf7b96134301a97499329d4558f47c5c8c75a3e62
|
|
| MD5 |
cf788a4b08e8ec3a050aa5a9f957d7c1
|
|
| BLAKE2b-256 |
a3754783fb296493e67b672236e8db95196911fcaf0a2676f5a088a9e8f172c0
|
File details
Details for the file ovos_utterance_normalizer-0.2.5a2-py3-none-any.whl.
File metadata
- Download URL: ovos_utterance_normalizer-0.2.5a2-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ae9f62bf3aaaf355e24242beb1344e3b6c3ead6a1a94254dc123ef332a2204
|
|
| MD5 |
d9f3718daaf83779bdf7514b04c0732a
|
|
| BLAKE2b-256 |
ff804276b214da6b51764534f936d91ff612fb3811628277326c82ea1a0caa78
|