Conversation
Make use of DateTime and Duration captures backed by dicio-numbers
b7bf286 to
647d7f7
Compare
There was a problem hiding this comment.
Thank you!
I pushed some more commits, and I rewrote a lot of stuff I didn't like. Also, I recently implemented support for datetime/duration/number capturing groups directly in the sentence matching algorithm (that only match parts of the sentence that actually represent a datetime/duration/number), and I therefore made use of them.
The sentences generated by AI were not very sensical 😅. I rewrote them as good as I could, but there are still some things that get misinterpreted, e.g. "remind me about whatever tomorrow at nine". And now the sentences file is a 1.5KiB monster 😅😅. I will need to improve the sentences before merging this. Any help would be appreciated!
app/src/main/res/values/strings.xml
Outdated
| <string name="skill_calendar_on_date_you_have_count">On %1$s, you have %2$d events</string> | ||
| <string name="skill_calendar_on_date_you_have_one_event">On %1$s, you have 1 event</string> |
There was a problem hiding this comment.
This won't work for languages where plurals work differently. Use <plurals> instead, or even just use the always-plural form to keep things simple. Edit: I fixed this myself.
I'm finally fairly happy with how the calendar skill is receiving input, sentences are structured, and behaving. One of the biggest hurdles with this implementation is handling relative times - "tomorrow" works just fine but "Monday" does not. Stuff like "evening/morning" just flat out does not work. If you are specific with date/time, it works very well.
I tried to cover as much ground with how a user might phrase things but input and suggestions are welcome!
Resolves #232