I am trying to create a custom grammar for a sentence containing a number, e.g. (Revenue increased by 34.5 billion dollars).
A rule that I created using W3C specification looks like:
<rule id="root" scope="public">
<item> <ruleref uri="#subject"/> </item>
<item> <ruleref uri="#direction"/> </item>
<item> <ruleref uri="#thenumber"/> </item>
</rule>
To pick up the numeric part of the sentence, I want to leverage a built-in type of VoiceXML (e.g.)
<grammar type="application/srgs+xml" src="/grammars/number.grxml"/>
or alternatively use some sort of library for number patterns. The last alternative would be to create a set of rules from scratch to recognize any number.
Any help would be greatly appreciated.