Neon Transformers
About
Utterance Transformers
A utterance transformer takes utterances and a context as input,
then returns the modified utterances and a new context
context is simply a python dictionary, it can contain anything
utterances is a list of transcription candidates, assumed to be a single utterance not a list of unrelated documents!
A transformer might change the utterances or simply return them unmodified with a context
eg.
- The translator transformer will detect language and translate as necessary, it returns modified utterances
- the NER transformer return unmodified utterances and the context contains extracted entities
Transformers may also depend on other transformers
from neon_utterance_KeyBERT_plugin import KeyBERTExtractor
from neon_utterance_wn_entailment_plugin import WordNetEntailments
# depends on keywords being tagged by a prev transformer
entail = WordNetEntailments()
kbert = KeyBERTExtractor() # or RAKE or YAKE ...
utts = ["The man was snoring very loudly"]
_, context = kbert.transform(utts)
_, context = entail.transform(utts, context)
print(context)
# {'entailments': ['exhale', 'inhale', 'sleep']}
mycroft integration
Usage with mycroft-core is limited to skills, it is useful for fallback and common_qa skills
You can import individual transformers directly in skills
neon integration
neon-core integrate the neon_transformers service in the nlp pipeline transparently
- neon_transformers are integrated into mycroft after STT but before Intent parsing
- all enabled transformer plugins (mycroft.conf) are loaded
- each plugin has a priority that the developer sets and the user can override (mycroft.conf)
- utterances are passed to each transformer sequentially
- utterances are replaced with the text returned by a transformer
- if utterances are transformed, the next transformer receives the transformed utterances
- context is merged with context returned by previous transformer
- the transformed utterances are passed to the intent stage
- context is available in message.context for skills during intent handling
- skills can add transformers to their requirements.txt
- for compatibility with vanilla mycroft-core skills should handle message.context as optional data
- if a certain transformer is absolutely necessary, load it directly if message.context is missing data
ovos-core integration
WIP - not available
Audio Transformers
TODO
Metadata
Release files for neon-transformers 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neon_transformers-1.0.0.tar.gz | 8.4 kB | Without provenance | Details for neon_transformers-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neon_transformers-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for neon_transformers-1.0.0-py3-none-any.whl |
Total release size: 23.7 kB
Release files / neon_transformers-1.0.0.tar.gz
| Download URL | neon_transformers-1.0.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12aa944216551155f8853f8b57a07ac13be17358d1bbe68d26938031b28961f6
|
|
BLAKE2b-256 checksum How to use checksums |
c1993e0753011df8847e977f271807c7a9d2a95fadfd773d8fb6d2695bc6a28f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / neon_transformers-1.0.0-py3-none-any.whl
| Download URL | neon_transformers-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
210ee645f9e64b148c3d7c1a13aaa1976e3b040b7fd28bc3fb6c0653a5bb37fa
|
|
BLAKE2b-256 checksum How to use checksums |
1da2147abbb602ff66e29f29a3d472ecef2e9d84e86a0c5237f2e9916502f969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for neon-transformers 1.0.0
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.