Find Named Entities
Table of Contents
Description
The zoho.ai. findNamedEntities task extracts the parameters relevant to the specified intent from the given text. Simply put, it identifies the items that fall under the specified entity types (such as country, state, city, region, postcode, and more) in the given text. For example, if the given text is "I'm a teacher" and the specified entity type is "occupation", the item extracted is "teacher".
- This task only supports English.
- The prediction results may not be accurate, which is also the case with any AI prediction. However, we are working on making it better.
- The prediction results are dynamic. The same script may produce different outcomes at different times based on how much the machine has learned.
Syntax
<response> = zoho.ai.findNamedEntities(<sentence>,<entity_type>);
where:
Example 1
The following script extracts all the items that matches the entity - "person" from the given text - "Hello, I'm Shawn.", i.e, it lists all the person names encountered in the specified sentence.
response = zoho.ai.findNamedEntities("Hello, I'm Shawn.","person");
where:
response
"Hello, I'm Shawn."
"person"
Example 2
The following script extracts all the items that matches the entity types carried by the collection - entity_types from the given text, categorized accordingly.
text = "Hello, I'm Shawn. My interests are data science and Internet Of Things"; entity_types=List(); entity_types.add("person"); entity_types.add("skills"); response = zoho.ai.findNamedEntities(text,entity_types);
where:
text
entity_types
Response Format
Success Response
The success response returned is of the following format.
{
"data": {
"items": [
{
"skills": [
"data science",
"Internet Of Things"
],
"person": [
"Shawn"
]
}
]
},
"message": "OK",
"status": 200
}Failure Response
The failure response returned for an empty parameters is of the following format.
{
"message": "EMPTY_VALUE_NOT_ALLOWED",
"status": 400
}
Related Links