topics:  main-page   everything   99things   things-to-do   software   space   future   exercise & health   faith  
  thought   web   movies+TV   music   mymusic   food   curiosity   tidbits   I remember   wishlist   misc   links


This section lists all blog posts, regardless of topic.

Exercise 36: Ordering groceries
November 6, 2008

Summary

Building upon exercise 35, implement a basic system to order groceries from http://www.grocerygateway.com/.

Support 100 food items added to the grocery list via "We need more {food_item}" or "Add {food_item} to the grocery list".
Add a "display the grocery list" command. This should display a full-screen white form with the header "Grocery List" at the top and with the list in a scrollable container. A command "Close that" should hide this form.
Add a "print the grocery list" command.
The command "Order the groceries for delivery at {time}" should place an order via the web. Once the user speaks this command, the computer should reply with "Speak the confirmation code to continue". The confirmation code should consist of the word "delta" followed by the number that represents the current day of week. So for Tuesday, the confirmation code is "delta two". Alternatively, the command "cancel that" can be used to abort. Techniques used from exercise 35 should be employed to implement a system that detects unexpected results and aborts operations. A successful order should be communicated as "Your grocery order was placed successfully. The total came to 85 dollars and 21 cents.".



Exercise 35: Order meal #1 from Swiss Chalet
November 6, 2008

Summary

This exercise will explore the challenges involved with carrying out a complex web action autonomously where XML web services aren't available.

Using screen scraping techniques to extract information from web pages. These techniques need to be easily adapted when service providers change their web pages.
Error handling to ensure that problems are detected and operations aborted upon unexpected results or upon unhandled exceptions within the Grace application.
Communication of errors in a concise way using text-to-speech.
Storage of credit card information in an encrypted format on the hard disk.
Relaying price of and expected delivery time via text-to-speech.



Exercise 34: Appointments
November 6, 2008

Summary

"My next dentist appointment is on November 6th at 3:45" or "I have a dentist appointment on {date} at {time}" or "I have an appointment with {person} on {date} at {time}". Appointments to support: Dentist, massage, doctor, church, and work. Also support non-specific appointments such as "I have an appointment on {date} at {time}".
When an appointment is created, add it to the individual's Google Calendar.
"What appointments do I have today?" should result in "You have a dentist appointment at {time}".
"What appointments do I have this week?" should result in "You have a dentist appointment on Thursday at 3:45, a massage appointment on Friday at 7:00, and a church appointment on Saturday at 8:00".
For the time being, implement a speaker specification via the command "This is {person} speaking". So, for example. "Grace, this is Daniel speaking. I have dentist appointment on November 6th at 3:45". To make this work it will be necessary to implement a secondary command and control grammar that doesn't require the "Grace" prefix. This grammar should be enabled for three seconds after a previous command is interpreted, at which point the standard command and control grammar should be reverted to.

Solution

Click here

Comments

This one ended up being a very involved effort -- not a few days, or even a week, but several weeks. I needed to overhaul the linguistic transformation algorithm for performance reasons, which I did as exercises 39 and 40, and there were several other significant changes that needed to be made. Finishing this exercise has culminated in having a working installation of the application in our Kitchen here at home, running on an iMac. I will use the ability to create and query appointments as a test case over the next few months to see how the technology feels to use.

older >>