Home > Software design >  Azure PII minimumPrecision Filter
Azure PII minimumPrecision Filter

Time:05-12

I am trying to filter results by minimum precision to exclude any PII names that are too low in confidence (.5) using python and Azures PII cognitive service.

response=client.recognize_pii_entities(documents,language="en",categories_filter=['Person'], minimumPrecision=[.8])

the request() gets an unexpected key word argument for "minimumPrecision"

categories_filter was different from the piiCategories that the azure documentation says to use and that is the functional parameter so I am wondering if minimumPrecision is also actually supposed to be different, but I cannot find it in the docs.

CodePudding user response:

The client library does not support a minimumPrecision parameter. The REST API does not either. Can you share the Azure documentation which shows usage of this parameter?

You should be able to filter the entity results on the confidence_score for the same effect:

response = client.recognize_pii_entities(documents, language="en", categories_filter=['Person'])
results = [entity for entity in res.entities for res in result if entity.confidence_score > 0.8]
  • Related