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 categorizes. 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 returns an array of all the entities recognized in the text, and a tag indicating the category they belong to. It will also contain the confidence score of each categorization in percentage values, to showcase its accuracy. The response also returns the location of the entity in the text through its start index and end index.

You can pass a block of text as the input of upto 1500 characters in a single request, as shown below. The text is passed to getNERPrediction(). The code contains statements to fetch the entities, their tags, locations, and the confidence scores.

Ensure the following packages are imported:

    
copy
import org.json.simple.JSONArray; import com.zc.component.ml.ZCML; import com.zc.component.ml.ZCNERData; import com.zc.component.ml.ZCNERDetails; import java.io.File;
    
copy
JSONArray textArray = new JSONArray(); textArray.add("Zoho Corporation, is an Indian multinational technology company that makes web-based business tools.It is best known for Zoho Office Suite. The company was founded by Sridhar Vembu and Tony Thomas and has a presence in seven locations with its global headquarters in Chennai, India, and corporate headquarters in Pleasanton, California."); //Input text to be processed List listOfNERData = ZCML.getInstance().getNERPrediction(textArray); //Pass the input text List nerDetails = listOfNERData.get(0).getNERList(); String token = nerDetails.get(0).getToken(); //To recognize the entity String tag = nerDetails.get(0).getNERTag(); //To fetch the category of each entity double confidenceScore = nerDetails.get(0).getConfidenceScore(); //To fetch the confidence score of each classification int startIndex = nerDetails.get(0).getStartIndex(); //To fetch the start index of each entity int endIndex = nerDetails.get(0).getEndIndex(); //To fetch the end index of each entity

Last Updated 2023-09-03 01:06:41 +0530 +0530

ON THIS PAGE