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

More than 1 sentence should be checked if matched #2551

Open
salleq opened this issue Nov 16, 2024 · 2 comments
Open

More than 1 sentence should be checked if matched #2551

salleq opened this issue Nov 16, 2024 · 2 comments
Labels

Comments

@salleq
Copy link
Contributor

salleq commented Nov 16, 2024

For now I only have one example but I'll fill in more if I (again) see other similar issues. But for instance on timers - I can start a timer like
- "<timer_set> <timer_duration> (ajastin|ajastus)"
And I would say (in Finnish): "Aloita tunnin ajastin" which translates to "Start one hour timer" but without the numeral "one" - we don't necessarily say "1 tunnin" even though that's also correct.

Then if I want to cancel the timer and I have these two sentences:
- "<timer_cancel> <timer_start> (ajastin|ajastus)" - "<timer_cancel> {timer_name:name} (ajastin|ajastus)"
I would say "Peruuta tunnin ajastin" ("Cancel 1 hour timer") but without the numeral "one" again, it will match with the named timer and come up with error: there's no timer named "tunnin".

If I then change the latter sentence to:
- "<timer_cancel> {timer_name:name} niminen (ajastin|ajastus)"

Then it will only match with the <timer_start> sentence correctly.

However I think Hassil should try these both sentences - first the named one of course and if that's not found then the other one. There shouldn't be conflicts in having a name of "Tunnin". Now canceling the timer works inconsistently on starting it, unless I add the "niminen" word for the latter sentence.

@tetele
Copy link
Contributor

tetele commented Nov 18, 2024

Can this be solved by adding some "default" values to the <time_duration> like, for example, "half" is used in English

timer_duration_minutes: "({timer_minutes:minutes} minute[s][ [and ]{timer_seconds:seconds} second[s]])|({timer_minutes:minutes} and[ a] {timer_half:seconds} minute[s])|({timer_half:seconds} a minute[s])"
?

@salleq
Copy link
Contributor Author

salleq commented Nov 18, 2024

I use those "default values" for quarter hour, half hour and "hour". Those work when starting the timer just fine, it's canceling the timer which becomes problematic unless I have that filler word for named timers.

@duhow duhow added the lang: fi label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants