GetSanitizedTexts input: string[] Documents, enum DocumentFormat output: string[] SanitizedTextsResult
Takes as an input a list of Documents and their DocumentFormat : text or URL.
Replaces identifying entities with randomized entities.
Currently sanitizes: People, Organizations, Addresses, Phone Numbers.
Sample code in C#:
PingarAPIRequest request = new PingarAPIRequest();
request.AppID = "your app id";
request.AppKey = "your app key";
request.TextAnalysis = new EntityExtractionRequest();
request.TextAnalysis.Documents = new string[] { "document text" };
request.TextAnalysis.DocumentsFormat = DocumentFormat.Text;
request.Language = Language.EN;
PingarAPIServiceSoapClient pingarAPI = new PingarAPIServiceSoapClient();
PingarAPIResponse response = pingarAPI.GetSanitizedTexts(request);
int count = 0;
if (response.Error == null)
{
foreach (string document in response.TextAnalysis.SanitizedTextsResult)
{
Console.WriteLine("Sanitized Document " + count);
Console.WriteLine(document);
count++;
}
}