How to get the intent using the CLU instead of using LUIS

186 views Asked by At

I want to get the intent according to the user input in a chatbot and I want to get it using the CLU instead of using LUIS.

in the code below is how i do it using LUIS:

var result = await LuisRecognizer.RecognizeAsync(turnContext, cancellationToken);
var topIntent = result?.GetTopScoringIntent();
var intent = (topIntent != null) ? topIntent.Value.intent : null;
var value = turnContext.Activity.Value;

i want to do the same but using the CLU. Note: the CLU is already configured.

1

There are 1 answers

0
Rishabh Meshram On

To get intent using CLU you check this example documentation.

As per documentation once you have cluResult with cluRecoginzer, you can get the intent with cluResult.TopIntent().intent.

For complete example please check this repository and for more details please check DotNet CLU Recognizer.