Loading...

Named Entity Recognition

Zia Named Entity Recognition is a part of Text Analytics that processes textual content to extract key words and group them into various categories. For example, it can determine a word in a text to be the name of an organization, the name of a person, or a date, and add it to the appropriate category accordingly. Refer here for a list of all categories recognized by NER.

The response will return the details of all recognized entities, and a tag indicating the category they belong to. It will also contain the confidence score of each recognition to showcase its accuracy, and the locations of the entity in the text.

Execute Named Entity Recognition

Description

You can use this API to perform named entity recognition on a block of text of upto 1500 characters in a single request. You can pass the text in the JSON body of the request, as shown in the sample request.

Request Details

Request URL

POST

{api-domain}/baas/v1/project/{project_id}/ml/text-analytics/ner

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}
content-type: application/json

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.mlkit.READ

Request JSON Properties

document string array
mandatory
The text to be processed for Named Entity Recognition

Response Details

The response returns an array of all the entities recognized in the text. The details of each entity recognition contains the tag of the entity’s categorization, such as ORG orMISC to indicate the name of an organization or a miscellaneous value respectively.

The response also returns the location of each entity in the text through start_index and end_index, that indicate the start and end indices of the entity. The confidence score determined for each entity classification is represented in percentage values.

Sample Request
copy

curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/text-analytics/ner
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: application/json”
-d ‘{ “document”:"[The biggest reason for me to love and remember this trek is the beautiful valley itself. Right from the entry, you can see a bed of pink alpine orchids, blue Himalayan poppies, yellow marigolds, and a whole variety of flowers spread out around you. The weather was also very pleasant that day, about 24 degree celsius, which made the experience all the more amazing.]" }’

Sample Response
copy
    {
    "status": "success",
    "data": [
    {
    "ner": {
    "general_entities": [
    {
    "start_index": 21,
    "confidence_score": 100,
    "end_index": 25,
    "ner_tag": "Color",
    "token": "pink"
    }
    ]
    }
    },
    {
    "ner": {
    "general_entities": [
    {
    "start_index": 94,
    "confidence_score": 56,
    "end_index": 97,
    "ner_tag": "Duration",
    "token": "day"
    }
    ]
    }
    },
    {
    "ner": {
    "general_entities": []
    }
    },
    {
    "ner": {
    "general_entities": []
    }
    },
    {
    "ner": {
    "general_entities": [
    {
    "start_index": 0,
    "confidence_score": 100,
    "end_index": 6,
    "ner_tag": "Color",
    "token": "yellow"
    }
    ]
    }
    },
    {
    "ner": {
    "general_entities": [
    {
    "start_index": 6,
    "confidence_score": 100,
    "end_index": 15,
    "ner_tag": "Temperature",
    "token": "24 degree",
    "fine_entities": [
        {
            "start_index": 9,
            "end_index": 15,
            "ner_tag": "Fahrenhiet",
            "token": "degree"
        },
        {
            "start_index": 6,
            "end_index": 8,
            "ner_tag": "Value",
            "token": "24"
        }
    ]
    },
    {
    "start_index": 16,
    "confidence_score": 100,
    "end_index": 23,
    "ner_tag": "Unit_temperature",
    "token": "celsius"
    }
    ]
    }
    },
    {
    "ner": {
    "general_entities": [
    {
    "start_index": 5,
    "confidence_score": 61,
    "end_index": 14,
    "ner_tag": "Miscellaneous",
    "token": "Himalayan"
    },
    {
    "start_index": 0,
    "confidence_score": 100,
    "end_index": 4,
    "ner_tag": "Color",
    "token": "blue"
    }
    ]
    }
    }
    ]
    }
View more