slord

Untitled

Jun 13th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <vxml version="2.1">
  3.  
  4. <form id="parrot">
  5. <block>
  6. You can start speaking any time.
  7. </block>
  8. <field name="main">
  9. <nomatch>
  10. Your response was out of grammar. Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
  11. </nomatch>
  12. <noinput>
  13. I could not hear you. Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
  14. </noinput>
  15. <prompt>
  16. Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
  17. </prompt>
  18. <grammar src="file:///work/zanzibar/src/main/voicexml/parrot.gram" type="application/x-jsgf"/>
  19. <filled>
  20. <prompt> <value expr="main"/> </prompt>
  21. <if cond="main=='quit'">
  22. <exit/>
  23. <else/>
  24. <clear namelist="main"/>
  25. <reprompt/>
  26. </if>
  27.  
  28. </filled>
  29. </field>
  30. <block>
  31. Goodbye.
  32. </block>
  33. </form>
  34.  
  35. </vxml>
  36.  
  37. #JSGF V1.0;
  38.  
  39. /**
  40. * JSGF Grammar for demo examples
  41. */
  42.  
  43. grammar example;
  44.  
  45. public <main> = ( [ <pre> ] ( <weather> {WEATHER} | <sports> {SPORTS} | <stocks> {STOCKS} ) ) | <quit> {QUIT};
  46.  
  47. <pre> = ( I would like [ to hear ] ) | ( hear ) | ( [ please ] get [ me ] ) | ( look up );
  48.  
  49. <weather> = [ the ] weather;
  50.  
  51. <sports> = sports [ news ];
  52.  
  53. <stocks> = ( [ a ] stock ( quote | quotes ) ) | stocks;
  54.  
  55. <quit> = exit | goodbye | quit;
Advertisement
Add Comment
Please, Sign In to add comment