| sfa_embed | R Documentation |
Computes embeddings for a vector of item text using a sentence-transformer or other embedding backend.
sfa_embed(items, embed = "sbert", model = NULL, cache = TRUE, ...)
items |
Character vector of item text, or a data frame with an
|
embed |
Embedding backend: |
model |
Model name passed to the backend. If |
cache |
Logical: cache embeddings in
|
... |
Additional arguments passed to the embedding backend function. |
A numeric matrix (n_items x embedding_dim). Rownames are the item
codes when items is a data frame with a code column,
otherwise the item text.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.