| <?xml version="1.0" encoding="iso-8859-1"?> |
| <!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd"> |
| <grammar version="1.0" xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" tag-format="semantics/1.0" |
| mode="voice" root="type" > |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| --> |
| |
| <rule id="type" scope="public"> |
| |
| <one-of> |
| <item weight="0.5"><ruleref uri="#numbers10To30"/>years<tag><![CDATA[ |
| $ = $numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| <item weight="2.5"><ruleref uri="#numbers10To30"/>years with <ruleref uri="#points"/><tag><![CDATA[ |
| $ = $numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| |
| |
| |
| <item weight="1.0"> fixed<ruleref uri="#numbers10To30"/>years<tag><![CDATA[ |
| $ =$numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| <item weight="1.0"><ruleref uri="#numbers10To30"/>years fixed<tag><![CDATA[ |
| $ = $numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| |
| |
| <item weight="2.5"> fixed<ruleref uri="#numbers10To30"/>years with<ruleref uri="#points"/><tag><![CDATA[ |
| $ =$numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| |
| <item weight="1.0"><ruleref uri="#numbers10To30"/>years fixed with<ruleref uri="#points"/><tag><![CDATA[ |
| $ =$numbers10To30 + "Y" + "fixed"; |
| ]]></tag></item> |
| |
| </one-of> |
| </rule> |
| |
| <rule id="numbers10To30"> |
| <one-of> |
| <item weight = "2.5"> ten <tag><![CDATA[ $="10"; ]]></tag></item> |
| <item weight = "0.5"> fifteen <tag><![CDATA[ $="15"; ]]></tag></item> |
| <item weight = "2.5"> twenty <tag><![CDATA[ $="20"; ]]></tag></item> |
| <item weight = "0.5"> twenty five <tag><![CDATA[ $="25"; ]]></tag></item> |
| <item weight = "2.5"> thirty <tag><![CDATA[ $="30"; ]]></tag></item> |
| |
| </one-of> |
| </rule> |
| |
| <rule id="points"> |
| <one-of> |
| <item> |
| <one-of> |
| <item> zero points</item> |
| <item> no points </item> |
| </one-of> |
| </item> |
| <item> one point </item> |
| <item> two points </item> |
| </one-of> |
| </rule> |
| |
| |
| |
| </grammar> |