diff options
author | mah <mah@android.com> | 2010-02-23 15:41:45 -0800 |
---|---|---|
committer | mah <mah@android.com> | 2010-02-25 14:14:28 -0800 |
commit | 18d902b732b0e834591fff49f36f9f8b174c61fa (patch) | |
tree | 2a62f8b9e7ec97ea38db3bdb446b5e0e025d0b1c | |
parent | 5724a749e555281f76a12c9990d0f180ca7e4757 (diff) | |
download | srec-18d902b732b0e834591fff49f36f9f8b174c61fa.tar.gz |
Add phone_type_choice grammar to Srec
Bug#232200
This grammar accepts the four phone types supported by the
VoiceDialer: "home", "mobile", "work", and "other", along
with "retry" and "exit". It is used when the voicedialer
has determined which person to call, but is not yet sure
which phone to call them on.
Also get rid of some of the uneeded code from the boolean
grammar. It was allowing for changes to be made at runtime,
but that is not needed.
-rw-r--r-- | config/en.us/Android.mk | 3 | ||||
-rw-r--r-- | config/en.us/grammars/boolean.grxml | 5 | ||||
-rw-r--r-- | config/en.us/grammars/phone_type_choice.grxml | 19 |
3 files changed, 21 insertions, 6 deletions
diff --git a/config/en.us/Android.mk b/config/en.us/Android.mk index 309990d..9af1f12 100644 --- a/config/en.us/Android.mk +++ b/config/en.us/Android.mk @@ -46,7 +46,8 @@ srec_grammars : \ $(G2G_INSTALL_PATH)/lookup.g2g \ ALL_PREBUILT += $(G2G_INSTALL_PATH)/VoiceDialer.g2g \ - $(G2G_INSTALL_PATH)/boolean.g2g + $(G2G_INSTALL_PATH)/boolean.g2g \ + $(G2G_INSTALL_PATH)/phone_type_choice.g2g #--------------------------------------------------------------------------------- # Explicit rules. diff --git a/config/en.us/grammars/boolean.grxml b/config/en.us/grammars/boolean.grxml index e9fa199..edabd2d 100644 --- a/config/en.us/grammars/boolean.grxml +++ b/config/en.us/grammars/boolean.grxml @@ -10,14 +10,9 @@ <one-of> <item>yes <tag>MEANING='1'</tag></item> <item>no <tag>MEANING='0'</tag></item> - <item> <ruleref uri="#ROOT"/> </item> </one-of> </rule> -<rule id="ROOT" scope="public"> -<item>__ROOT__</item> -</rule> - </grammar> diff --git a/config/en.us/grammars/phone_type_choice.grxml b/config/en.us/grammars/phone_type_choice.grxml new file mode 100644 index 0000000..519fce2 --- /dev/null +++ b/config/en.us/grammars/phone_type_choice.grxml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<grammar version="1.0" xml:lang="en-US" mode="voice" root="_phone_type_choice"> +<!-- + --> + + <rule id="_phone_type_choice" scope="public"> + <one-of> + <item>home <tag>MEANING='H'</tag></item> + <item>mobile <tag>MEANING='M'</tag></item> + <item>cell <tag>MEANING='M'</tag></item> + <item>work <tag>MEANING='W'</tag></item> + <item>other <tag>MEANING='O'</tag></item> + <item>exit <tag>MEANING='X'</tag></item> + <item>try again <tag>MEANING='R'</tag></item> + <item>retry <tag>MEANING='R'</tag></item> + </one-of> + </rule> + +</grammar> |