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

Add natural language parsing info #219

Open
peteruithoven opened this issue Feb 12, 2018 · 3 comments
Open

Add natural language parsing info #219

peteruithoven opened this issue Feb 12, 2018 · 3 comments

Comments

@peteruithoven
Copy link
Collaborator

peteruithoven commented Feb 12, 2018

@marioguerriero added natural language parsing in the following commit: 8a20630

But there is only a very subtle hint this exists and no information on "syntax".
Daniel mentioned "Dancing at 7pm" as an example in:
https://elementaryos.stackexchange.com/questions/9486/how-can-i-create-an-event-with-natural-language-parsing-in-calendar

Parsing is handled by ParserEn or ParserDe. I'll only focus on English for now.

Part examples

Some research / resource to come up with more practical examples. Since these are parsed by regular expressions it's hard to express all possible expressions in a easy to understand manner.

Date

  • two days ago
  • yesterday
  • today
  • tomorrow
  • this weekend
  • all day
  • the whole day
  • next week/month
    • days ago
  • in * days/weeks
  • next/on/this {weekday name}
  • this {weekday name} to {weekday name}
  • on {month name} {day}
  • on {month name} {day} {year}
  • from {day} to {day} {month name}
  • from {month name} {day} - {day}
  • in a month

time

  • at 19:00
  • at 5:02pm
  • at 7pm
  • @19:00
  • @7pm
  • from 19:00 to 20:00
  • 19:00 o'clock
  • 19:00h
  • 19h
  • for *min/h/d
  • for * minutes/hours/days/weeks

Persons

  • with {name}
  • with the {name}

Location

  • at/in {location}
  • at/in the {location}

Practical examples

  • Lecture on march 19 at 20:00 at MIT
  • Dancing at 7pm
  • Swimming lessons tomorrow with Elise
  • Dentist next tuesday
  • Paris from March 1 - 7
  • UX meeting at HQ at 10:00 tomorrow with dev team

Maybe we could show some practical examples in a information on hover over an info icon near the Title field? Or on hover over the arrow icon?

I'm afraid this won't be intuitive without interface improvements. Currently only on the first "enter" press the field is parsed and for this to work it probably needs some real time feedback. Maybe this would work better if we could move this into the Applications menu.
I also think we should look for an existing language processing library, so it can handle more cases and languages.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@marioguerriero
Copy link
Collaborator

Maybe we could show a popover the first time the user tries to add an event with some hints on how to use that feature.

@phase1geo
Copy link

It might be nice to increase the width of the Title field to accommodate entering the enhanced syntax.

@mcclurgm
Copy link
Collaborator

If this is something we want to do, have a look at Fantastical for Mac and iOS. They have a great method of teaching the syntax, which isn't as obtrusive as a popover and doesn't go away after one (or any number) times. They animate feedback as you type (easier would be highlight). It would be much harder to implement than any of these, but a lot better. This would basically be a sort of syntax highlighting, but for a different grammar.

If we add a help popover, it would maybe nice nice to add a button in the text field that links to it. Like a little (i) button on the trailing edge.

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

4 participants