Chapter 6

Grammars for dialog

Source code:

Available in GitHub

Exercises:

Flexible matching

In the apps presented in this chapter, the match between the recognized utterance and the hand-crafted rules in the grammar must be perfect in order to accept the recognition results. You can use the distance metrics described in Chapter 4 to allow more flexible matches.

Using statistical grammars

In this chapter you learned how to use the Maluuba API to obtain a semantic representation of a sentence based on Maluuba’s statistical grammars. In this exercise you will go a step further and make use of the semantic representation within a calendar app.

Using your Maluuba API key, check for the results returned for inputs within the calendar domain. For example: for the input “set up a meeting with john tomorrow” you will receive a semantic interpretation such as the following from Maluuba:

{“entities”:{“dateRange”:[{“start”:”2013-05-09″,”end”:”2013-05-10″}],”title”:[“meeting”],”contacts”:[{“name”:”john”}]},”action”:”CALENDAR_CREATE_EVENT”,”category”:”CALENDAR”}

From this you should be able to extract relevant details such as:

category: CALENDAR
action: CALENDAR_CREATE_EVENT
title: meeting
contacts:
name: john
dateRange:
start: 2013-05-09
end: 2013-05-10

Use the Calendar API (https://developers.google.com/google-apps/calendar/v3/reference/events/insert) to create a new event with these details inserted into the calendar app on your device.

You can also create other apps that make use of the other categories supported by Maluuba (see http://dev.maluuba.com/categories).

Alternative speech recognition engines

In this chapter you learned how to

Suggested reading:

D. Dahl. Natural Language Processing: Past, Present and Future. In A. Neustein and J.A. Markowitz (eds.), Mobile Speech and Advanced Natural Language Solutions, Springer Science+Business Media 2013.

J.R. Bellegarda Natural Language Technology in Mobile Devices: Two Grounding Frameworks. In A. Neustein and J.A. Markowitz (eds.), Mobile Speech and Advanced Natural Language Solutions, Springer Science+Business Media New York 2013.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s