cs2103aug2014-w13-2j / main

To-Do list program for CS2103T @ NUS
MIT License
1 stars 0 forks source link

[Parser] Handling of ambiguous inputs where multiple parsing is available #73

Closed nhan-ng closed 9 years ago

nhan-ng commented 9 years ago

This should return a new Feedback type (maybe AmbiguousInputFeedback) so that it will present multiple options for user to choose from and hence act accordingly.

This will possibly create a new link between the UI and Controller, i.e. UI calls Controller via resolveFeedback()

nhan-ng commented 9 years ago

Using a heuristic approach to deal with this. Parser will only parse and extract the last occurrence of the input.

For example, if a user enters a command: "add watching from 10pm on tomorrow from 8pm to 10pm"

The heuristic reasoning is that the user intents to watch a movie titled "from 10pm" and then decides on the time for the task, hence the later option will be more likely to be the chosen OptionType to be parsed.

Thus the parsed result is CommandType: ADD Desc: watching from 10pm Start time: tomorrow 8pm End time: tomorrow 10pm

image