Method Extract
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
Extract(Attachment, CancellationToken)
Synchronously recognizes PII in the given image attachment.
public List<PiiExtraction.PiiExtractedEntity> Extract(Attachment content, CancellationToken cancellationToken = default)Parameters
- contentAttachment
- The attachment representing the image to analyze. 
- cancellationTokenCancellationToken
- Token to cancel the operation. 
Returns
- List<PiiExtraction.PiiExtractedEntity>
- A list of detected PiiExtraction.PiiExtractedEntity instances. 
Exceptions
- ArgumentNullException
- Thrown when the attachment is null. 
- InvalidModelException
- Thrown when the underlying language model does not support vision input, which is required to analyze images for PII extraction. 
Extract(string, CancellationToken)
Synchronously recognizes PII in the given content.
public List<PiiExtraction.PiiExtractedEntity> Extract(string content, CancellationToken cancellationToken = default)Parameters
- contentstring
- cancellationTokenCancellationToken