Skip to contents

This function accepts a vector of character strings, packages, or paths to local source code directories, and calculates language model (LM) embeddings for each string within the vector.

The embeddings are currently retrieved from a local 'ollama' server (https://ollama.com) running Jina AI text embeddings (https://ollama.com/jina/jina-embeddings-v2-base-en).

Usage

pkgmatch_embeddings_from_text(input = NULL)

Arguments

input

A vector of one or more text strings for which embeddings are to be extracted.

Value

A matrix of embeddings, one column for each input item, and a fixed number of rows defined by the embedding length of the language models.

See also

Other embeddings: pkgmatch_embeddings_from_pkgs()

Examples

if (FALSE) { # \dontrun{
input <- "Download open spatial data from NASA"
emb <- pkgmatch_embeddings_from_text (input = input)
} # }