in src/handler.py [0:0]
def get_interested_pii(document: Document, classification_config: PiiConfig):
"""
Get a list of interested pii from the document.
Return a list of pii entity types of the given document with only the entities of interest
and above the confidence threshold.
"""
pii_entities = []
for name, score in document.pii_classification.items():
if name in classification_config.pii_entity_types or ALL in classification_config.pii_entity_types:
if score >= classification_config.confidence_threshold:
pii_entities.append(name)
return pii_entities