I need to create a programmatic equivalent via Delphi ... or how to grammar a generation using Delphi Regardless of tax or in any instance of XML grammar, there is a programmatic equivalent in Delphi, sorry for my English.
** Program related paragraph **
Ref:
SPSTATEhandle hsHelloWorld; HR = CPRK Grammar-> GetRule (L "HelloWald", NULL, SPRAF_TopLevel | SPRAF_Active, TRUE, and H. S.Hallwold); Hr = cpRecoGrammar-> AddWordTransition (hsHelloWorld, NULL, L "Hello World", L "", SPWADLL, NALL, Faucet); Hr = cpRecoGrammar-> AddWordTransition (hsHelloWorld, NULL, L "is | there", L "|", SPWT_LEXICAL, NULL, NULL); HR = CPRK grammer- & gt; Commit (NULL);
Sample of XML grammar:
& lt; Grammar & gt; & Lt ;! - Create a simple "Hello World" rule - & gt; & Lt; Rule name = "HelloWald" ToplessVal = "Active" & gt; & Lt; P & gt; Hello World & lt; / P & gt; & Lt; / Rules & gt; & Lt; Rule Name = "HelloWaldDisip" ToplessVal = "Active" & gt; & Lt; P DISP = "Hey there!" & Gt; Hello World & lt; / P & gt; & Lt; / Rules & gt; & Lt; Rule Name = "Question_ Pron" TOPLEVEL = "ACTIVE" & gt; & Lt; P DISP = "I do not understand" PRON = "eh" & gt; Is & lt; / P & gt; & Lt; / Rules & gt; & Lt; Rule name = "Nursery rhyme" toplevel = "active" & gt; & Lt; P & gt; This is & lt; / P & gt; & Lt; P MIN = "2" MAX = "2" & gt; Work & lt; / P & gt; & Lt; / Rules & gt; & Lt; Rule name = "use" top = "active" & gt; & Lt; List & gt; & Lt; P weight = ".95" & gt; Speech recognition & lt; / P & gt; & Lt; P weight = ". 05" & gt; A nice beach wreck; & Lt; / P & gt; & Lt; / List & gt; & Lt; / Rules & gt; & Lt; Rule Name = "Use Perops" Topless = "Active" & gt; & Lt; P PROPNAME = "NOVALUE" & gt; A & lt; / P & gt; & Lt; P PROPNAME = "NUMBER" VAL = "2" & gt; Two & lt; / P & gt; & Lt; P PROPNAME = "STRING" VALSTR = "three" & gt; Three & lt; / P & gt; & Lt; / Rules & gt; & Lt; / Grammar and gt; The speech made by the JDI team is a straightforward cover, you should
Be able to get the code from here, but I just checked and the link to the sapi.zip file is being broken, perhaps an email from JDI team will turn it on for you.
If you do catch the cover, and it has been wrapped straight into the API, then there are MDNSN docs that you want, only the Delphi syntax option for C ++ syntax will be 99% straight ahead. , Which is not, just ask specific questions here (or at the AmberCadero News Group)
Comments
Post a Comment