开发者

switch recognized item in grxml file

开发者 https://www.devze.com 2023-03-09 04:41 出处:网络
I have created a grammar (in grxml format开发者_高级运维) to recognize the OMV literal (with hu-hu language settings)

I have created a grammar (in grxml format开发者_高级运维) to recognize the OMV literal (with hu-hu language settings)

This is the problematic part:

<item>oemfau</item>

nuance recognize it, and print 'oemfau', but i want that nuance say, the word is not oemfau, but OMV. How can i switch the word?


If your grammar uses tag-format="swi-semantics/1.0, you can use ECMAScript in a <tag> element like this:

<item>
   oemfau
   <tag>out.slot = &quot;OMV&quot;</tag>
</item>

Simply replace "slot" with whatever NL slot you'd like to use in your application.

0

精彩评论

暂无评论...
验证码 换一张
取 消