How do you specify a time slot?
Thanks!
So there is different ways to “say time”… You even have different units (hours, seconds, years)
Therefore it is very context Specific.
There are 2 Built in Slots already -> here -> name of months and days.
A example would be Whats the weather next ($rhasspy/days){day}
If you want to setup a timer for example, you will need numbers.
You can find how to use number ranges in your sentences here.
Example: Create a Timer for (5..200){time} (second | minute| minutes | hour | hours){unit}
Handling those intents is easier if you use substitutions: Create a Timer for (5..200){time} (second:s | (minute| minutes):min | (hour | hours):h){unit}
I only got german sentences so those will not help you that much.
But they could help me
I will post my time sentences once i get home. They require some additional work afterwards as i also got time like “halb acht”.
Did anyone try to (or succeed in) create a slot converter for this kind of use? Snips NLU has some built-in slots for this, see https://snips-nlu.readthedocs.io/en/latest/builtin_entities.html#grammar-entity.
Im looking forward to seeing your solution @moqart for cases like “halb acht”, as I’m currently also trying to get that working
snips basically rebranded / reused facebooks duckling for this :
I really like the Idea of adding this functionality as a standard option for slots.
This would include:
- Money
- distance
- duration
- numeral
- ordinal
- quantity
- temperature
- time
- volume
depending on the language however…
@schnopsi @Jowe What system are you using for intent handling?
I got a couple different things that i use in different places as it is hard to make a combination that fits most cases.
[SetAlarm]
(stell | stelle) [mir](den|einen|meinen) wecker [fĂĽr] (heute|((morgen|):morgen)|ĂĽbermorgen| $rhasspy/days){tag} auf (((viertel vor):-15)|((viertel nach):15)|(halb:-30)|:0){minute} (1..23) {stunde} [uhr]
(stell | stelle) [mir] (den | meinen |einen) wecker (fĂĽr | auf) ((heute |):heute | morgen | ĂĽbermorgen | $rhasspy/days){tag} [auf] (0..23){stunde} uhr (0..59){minute}
or this one
Date and time
[AddCalendarEvent]
event= (($termine) | ([das: ]Treffen mit $personen)){summary}
day= ((([am|für] nächsten | für | diesen | am ) ($rhasspy/days){weekday}) | ((am |für den) (1..31){dom} [($rhasspy/months){month}]))
time= ((([am|für] nächsten | für | diesen | am ) ($rhasspy/days){weekday} [um (0..23){hour} [uhr [(0..59){minute}]]])|(um (0..23){hour} uhr [(0..59){minute}] [((diesen | am |nächsten) ($rhasspy/days){weekday})]))
trage [mir] [ein|das] <event> <time> [((in (den | meinen | meinem)) | im) kalender] ein
(erstell|erstelle|erzeuge) [mir] einen termin [((in meinem)|im) kalender] fĂĽr [das |ein|zum] <event> <time>
fĂĽge (meinem |dem) kalender einen termin fĂĽr <event> <time> hinzu
I’m using FHEM for intent handling.
Thanks for your intents!
Maybe we should have a place to collect all posted intents/sentences somewhere.
interesting, i also use FHEM for homeautomation, but i use node-red to do my intent handling.
I’m also using FHEM. With Snips module