Closed nhan-ng closed 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
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()