Get Grammar Return for an Voice Bot

I am developing a voice bot where I have a scenario to use basic voice grammar, below is a sample.

out = "outage"; Outage One

I am able to read the utterance but if i want to get the grammar tag out, how to get that?

Note: for getting utterance i am using userinput$.utterance

@vijayakumar.palanive

Please elaborate the requirement on “i want to get the grammar tag out, how to get that?

Would you want to retrieve the Grammar tag in the similar way as you are retrieving the utterance?

Regards,
Yoga Ramya
Kore Support

Along with the elaboration about exactly what you mean, can you describe what you want to do?
Why do you want to know the (I assume) the POS tag for a word?

I have a menu where it accepts dtmf and voice input. So, on voice call properties, I am using two grammars, dtmf and voice grammar.

The prompt is, “To report an application, network or systems outage say or press 1.”

DTMF Grammar

<rule id="DTMFDIGITS" scope="public">
  <one-of>
    <item>
      <tag>out = "outage";</tag>
      1
    </item>

Voice Grammar

<rule id="MainMenu" scope="public">
  <one-of>
    <item>
		<tag>out = "outage";</tag>
		<one-of>
			<item>Outage</item>
			<item>One</item>
		</one-of>
    </item>

Once the form filled, if I use the utterance, then i need to compare 1 and One/Outage in the if condition to branch out, if i get the tagged response from grammar, then i simply check “Outage”. This is a simple example i have shared here.

By the time the input reaches the NL engine it is just text and the NL processing doesn’t care how it got there. Therefore training is built around the text that is received.

Typically you would have am enumerated List of Items entity where you are asking the user to say outage or press 1. That entity would have a set of choices where the valid values for each choice are entered in the synonyms, which in this case would be outage and 1.

You did not understand my question i think, just i need custom grammar return

Perhaps I’ll ask the question a different way.

Why do you need to know, from an NL perspective, the particular grammar that was used to interpret the user’s input?
What difference would it make?