Text analysis¶
-
POST
/nlu/v1/agents/{agent_id}/processing/conversation_analysis
Analyzing user sentences in a conversation using the editing model.
Sample input
{ "text": "Quero retirar R$10 da poupança" }
Sample Response
{ "input_text": "Quero retirar R$10 da poupança", "intents": [ { "name": "Sacar", "score": 0.56 } ], "entities": [ { "name": "sys.currency", "value": "10", "unit":"BRL", "text": "r$ 10", "start_pos": 14, "end_pos": 19, "score": 1.0 } ], "metadata": { "pipeline": "pt-br/conversation-1.0", "worker_id": "06023f4e-c4a6-4b8e-aa5d-be0ba0dfa09b", "transation_id": "6122d3f3-f7d2-476d-b8fb-250600c2d7e7", "response_time": 12.190378904342651 } }
- Parameters
agent_id – Agent ID
name – Published model’s name
- Status Codes
200 OK – Success
404 Not Found – Agent or version not found
500 Internal Server Error – Internal error
- Response JSON Object
input_text (string) – Sentence sent.
intents (List[Intent]) – Detected intentions.
entities (List[Entity]) – List of entities found.
metadata (Dict[Metadata]) – Metadatas.
Intent Object
- Response JSON Object
name (string) – Intent name.
score (float) – Confidence score (0.0 - 1.0).
Entity Object
- Response JSON Object
name (string) – Entity type name.
score (float) – Confidence score (0.0 - 1.0).
text (string) – Entity text.
value (string) – Normalized value.
unit (string) – Entity measurement unit.
start_pos (integer) – Starting position (characters).
end_pos (integer) – Ending position (characters).
Metadata Object
- Response JSON Object
pipeline (string) – Type of pipeline used.
response_time (string) – Analysis time.