Table of Contents

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

content Attachment

The attachment representing the image to analyze.

cancellationToken CancellationToken

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

content string
cancellationToken CancellationToken

Returns

List<PiiExtraction.PiiExtractedEntity>