GetEntities input: string[] Documents, enum DocumentFormat output: Entities[] EntitiesResult
Takes as an input a list of Documents and their DocumentFormat : text or URL.
Extracts a collection of entities from the document contents.
Entities can be of the following types: People, Organizations, Addresses, Email Addresses, Phone Numbers, Credit Cards, URLs, Times and Dates (more to be added in the future).
The Entity class holds information about an entity, such as type, text, alternate forms, and subentities, if applies. Person Entities and Address SubEntities have support for location in text.
See also Taxonomy extraction.
See also Address extraction.
Sample code in C#:
PingarAPIRequest request = new PingarAPIRequest();
request.AppID = "your app id";
request.AppKey = "your app key";
request.EntityExtraction = new EntityExtractionRequest();
request.EntityExtraction.Documents = new string[] { "document text" };
request.EntityExtraction.DocumentsFormat = DocumentFormat.Text;
request.Language = Language.EN;
PingarAPIServiceSoapClient pingarAPI = new PingarAPIServiceSoapClient();
PingarAPIResponse response = pingarAPI.GetEntities(request);
int count = 0;
if (response.Error == null)
{
foreach (Entities document in response.EntityExtraction.EntitiesResult)
{
Console.WriteLine("Entities For Document " + count);
foreach (Entity entity in document.entities)
{
Console.WriteLine(entitity.Type + ": " + entity.Title);
}
count++;
}
}