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

Allow for multiple regexes per action #29

Open
ewjmulder opened this issue Aug 26, 2018 · 0 comments
Open

Allow for multiple regexes per action #29

ewjmulder opened this issue Aug 26, 2018 · 0 comments

Comments

@ewjmulder
Copy link
Contributor

Very common scenario:

  • Turn on 1 light with id: "Turn on light 1"
  • Turn on all lights: "Turn on the lights"

These can easily be represented by 1 action + converter + executor in the backend, since with one you just take a list of size 1. But now we have 1 regex per action. You could try to write a regex that matches both scentences and be damned with regex issues later. Or we can introduce a new feature: multiple regexes per action.

Details:

  • Allow for set of regexes per action in framework
  • Also still have easy option of providing just one
  • Identify the regex by some id (String)
  • At conversion, you get the id so you know what to parse
  • After conversion, model and executor are generic so don't need to know about the original distinction
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