Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: In/out replacement backreference #4

Open
h3ndrik opened this issue Jan 8, 2024 · 0 comments
Open

Feature request: In/out replacement backreference #4

h3ndrik opened this issue Jan 8, 2024 · 0 comments

Comments

@h3ndrik
Copy link

h3ndrik commented Jan 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant