sfa_lexmap: Build the Lexical Map for Leximax Rotation

View source: R/leximax.R

sfa_lexmapR Documentation

Build the Lexical Map for Leximax Rotation

Description

Precomputes everything leximax needs to score orientations of one instrument: the instruction-conditioned item embeddings, their Gram matrix, and the pool-by-item cosine matrix S. Building the map costs one pass over the candidate pool; every subsequent naming of any orientation of the same items is then nearly instant, which is what makes multi-start optimization and Monte Carlo calibration practical.

Usage

sfa_lexmap(
  x,
  model = NULL,
  instruction = NULL,
  pool = NULL,
  block_size = 50000L,
  ...
)

Arguments

x

An sfa() fit, or a character vector of item texts.

model

Naming model id. Default NULL follows sfa_name(): the fit's embedding model (or the package default) is used.

instruction

Naming instruction override (see sfa_naming_instruction()).

pool

An sfa_pool() object, or NULL to fetch it.

block_size

Pool rows per block while building S (memory knob; results are identical for any value).

...

Passed to the embedding backend.

Value

An object of class sfa_lexmap.


semanticfa documentation built on Sept. 2, 2026, 1:07 a.m.