Method Recognize
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
Recognize(Attachment, CancellationToken)
Synchronously recognizes named entities in the given image attachment.
public List<NamedEntityRecognition.ExtractedEntity> Recognize(Attachment content, CancellationToken cancellationToken = default)Parameters
- contentAttachment
- The attachment representing the image to analyze. 
- cancellationTokenCancellationToken
- Token to cancel the operation. 
Returns
- List<NamedEntityRecognition.ExtractedEntity>
- A list of detected NamedEntityRecognition.ExtractedEntity 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 entity recognition. 
Recognize(string, CancellationToken)
Synchronously recognizes named entities in the given content.
public List<NamedEntityRecognition.ExtractedEntity> Recognize(string content, CancellationToken cancellationToken = default)Parameters
- contentstring
- The non-null, non-empty input text to analyze. 
- cancellationTokenCancellationToken
Returns
- List<NamedEntityRecognition.ExtractedEntity>
- A list of NamedEntityRecognition.ExtractedEntity objects representing each detected entity. 
Exceptions
- ArgumentException
- Thrown if - contentis null or whitespace.