Skip to content

Feature request: In/out replacement backreference #4

@h3ndrik

Description

@h3ndrik

I'd like to do the following:

sentences:
  - in: "dim <light>"
    out: "set <light> brightness to 25"
expansion_rules:
  light: "(livingroom light|kitchen light)"

As of now it literally writes set <light> brightness to 25 to the corrected transcript. I'd like this to work like named backreferences in a regex and replace the placeholder in the out part with whatever it captured earlier. (set kitchen light brightness to 25)

This should obviously work both for lists and expansion_rules. And maybe a short example could be added to the README.md

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions