Example 4: Calling an external service/framework for PII detection
In a similar way to example 3, we can write logic to call external services for PII detection. There are two types of external services we support:
- Remote services such as a PII detection model hosted somewhere. In this case, the recognizer would do the actual REST request and translate the results to a list of
- Calling PII models from other frameworks, such as transformers or Flair.
Calling a remote service
Calling a model in a different framework
- This example shows a Presidio wrapper for a Flair model.
- Using a similar approach, we could create wrappers for HuggingFace models, Conditional Random Fields or any other framework.