top of page

Final Code: Dictionary

  • Yavneeka Patel
  • Apr 29, 2015
  • 1 min read

/**

*Java Speech Grammar Format (JSGF) file

*This file holds all the words that the program will recognize

**/

//------------------------GRAMMAR HEADER BEGINS--------------------------------//

#JSGF V1.0;

grammar dialog; //Grammar name

//------------------------GRAMMAR HEADER ENDS--------------------------------//

//------------------------GRAMMAR BODY BEGINS--------------------------------//

/**Rule definition format:

* "Public" is optional, but remaining part is mandatory

* public <ruleName> = ruleExpansion

*An expansion can refer to one or more tokens OR rules

**/

<greeting> = hi | hello | my name is;

<feel> = how are;

<location> = where are you from;

<age> = old;

<hardware> = on | off | blink ;

public <command> = <feel> | <greeting> | <feel> | <hardware> | <age>;

//------------------------GRAMMAR BODY ENDS--------------------------------//


 
 
 

Comments


Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
  • Facebook Classic
  • Twitter Classic
  • Google Classic
  • RSS Classic

© 2023 by TOKYO DESIGN. Proudly created with Wix.com

bottom of page