Text Intent Recognition
The Intent Analysis model will help you capture semantics behind users' messages and assign it to the right label. It is designed to understand human conversation in the form or free text or spoken text.
post
https://api.marsview.ai/text/intent
/get_intent
Returns the predicted intent for a given phrases / sentences
Shown below is a code snippet to send a sample request for intent recognition
curl --location --request POST 'https://api.marsview.ai/text/intent/get_intent' \
--header 'Content-Type: application/json' \
--data-raw '{
"jwtToken" : "Insert JWT token Key",
"threshold": "Insert a desired confidence threshold",
"intentIds": "Insert a list of intent IDs",
"sentences": "Insert your sentence for intent recognition",
"userId" : "[email protected]"
}'
Shown below is a sample JSON response from the above request.
{
"status": true,
"error": {},
"data": {
{
"similarityMatch": [
{
"matchedTextList": [
{
"score": 0.6180883955955505,
"text": "Marsview is a great place to work",
"value": "Marsview"
}
],
"intentId": "intent-bxllq2f7hpkrvtyzi3-1627981197627",
"intentName": "Marsview"
},
],
}
},
"userId": "[email protected]"
}
Field | Description |
---|---|
similarityMatch | The intent similarity output from the models |
intentId | The intent Id against which the sentences are matched |
intentName | The name of the matching intent |
score | The similarity matching score ranges from 0 to 1 |
text | The sentence which is used to predict intent for |
value | The predicted intent |