MycroftAI / adapt

Adapt Intent Parser
Apache License 2.0
712 stars 154 forks source link

Optional vs Required with Regex #58

Closed kfezer closed 3 years ago

kfezer commented 7 years ago

It seems that with working with Regex optional is the way to successfully register where required fails to register intents.

forslund commented 6 years ago

I don't think it's as straightforward as described above. It works mostly. But if another regex is added that has a certain content it starts to fail. See https://gist.github.com/forslund/e077b749278de3476ef121b81277d689 for an example. Here the Location won't be found by adapt when the second regex is added.

The second regex will catch EVERYTHING but it's still weird that it will reduce the score of the Location regex.

clusterfudge commented 3 years ago

Thanks for the guidance here, @forslund. Closing as answered.

clusterfudge commented 3 years ago

hey @kfezer , as an FYI I'm finally tackling this as with #137