Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to integrate child semantics with parent rule in xml grammar

Status
Not open for further replies.

markftwain

Technical User
Jul 12, 2006
108
Hi All

In writing a grammar xml file, I wish to isolate the words "ratio of two to three" and have it written as "2:3". The parent rule will be like "The box's height to width is 2:3" (with the actual spoken words as "The box's height to width is of ratio 2:3." I can achieve the desired results using semantics on the child "ratio" rule, but can think of no way to incorporate those semantics back into the parent rule calling the "ratio" rule without the parent rule also using semnatics. Since "ratio" rule will be called by many layers, repeating semantics throughout higher rules where semantics would not normally be needed poses much extra coding.

What is the best way to produce recognized output with an incorporated word change (as from "ratio two to three to 2:3)?

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top