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 · 1 comment · May be fixed by #10
Open

Feature request: In/out replacement backreference #4

h3ndrik opened this issue Jan 8, 2024 · 1 comment · May be fixed by #10
Assignees
Labels
enhancement New feature or request

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

@dekiesel
Copy link

This feature would really cut down on complexity/nr of rules. At the moment you basically have to create an extra sentence for every domain/setting.

@synesthesiam synesthesiam self-assigned this Oct 25, 2024
@synesthesiam synesthesiam added the enhancement New feature or request label Oct 25, 2024
@dekiesel dekiesel linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants