Class Embedder
- Namespace
- LMKit.Embeddings
- Assembly
- LM-Kit.NET.dll
A class designed for generating embeddings. It facilitates execution of tasks related to natural language and coding, such as semantic search, clustering, topic modeling, and classification.
public sealed class Embedder
- Inheritance
-
Embedder
- Inherited Members
Constructors
- Embedder(LLM)
Initializes a new instance of the Embedder class.
Properties
Methods
- GetCosineSimilarity(IList<float>, IList<float>)
Calculates the cosine similarity between two embedding vectors, representing the cosine of the angle between them in a multidimensional space.
- GetEmbeddings(IEnumerable<IList<int>>, CancellationToken)
Generates embedding vectors for a collection of tokenized texts. Each vector represents a text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddings(IEnumerable<string>, CancellationToken)
Generates embedding vectors for a collection of text strings. Each vector represents a text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddings(IList<int>, CancellationToken)
Generates the embedding vector for a given tokenized text. This vector represents the text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddings(string, CancellationToken)
Generates the embedding vector for a given text string. This vector represents the text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddingsAsync(IEnumerable<IList<int>>, CancellationToken)
Asynchronously generates embedding vectors for a collection of tokenized texts. Each vector represents a text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddingsAsync(IEnumerable<string>, CancellationToken)
Asynchronously generates embedding vectors for a collection of text strings. Each vector represents a text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddingsAsync(IList<int>, CancellationToken)
Asynchronously generates the embedding vector for a given tokenized text. This vector represents the text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.
- GetEmbeddingsAsync(string, CancellationToken)
Asynchronously generates the embedding vector for a given text string. This vector represents the text in a high-dimensional space, enabling various natural language processing tasks by capturing semantic meaning.