Toggle recognized element in grxml file

I created a grammar (in grxml format) to recognize the OMV literal (with hu-hu language settings)

This is the problematic part:

<item>oemfau</item>

The nuance recognizes this and prints "oemfau", but I want this nuance to say that the word is not oemfau, but OMV. How can I switch a word?

+3
source share
1 answer

If your grammar uses tag-format="swi-semantics/1.0, you can use ECMAScript in the element <tag>as follows:

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

Just replace the “slot” with any NL slot that you would like to use in your application.

+2
source

All Articles