sfa_reembed_region: Re-Embed a Construct Region Under Another Encoder

View source: R/regions_multi.R

sfa_reembed_regionR Documentation

Re-Embed a Construct Region Under Another Encoder

Description

Takes a region's sentences (from sfa_build_region() or sfa_build_regions(), including sentence-only regions built with embeddings = FALSE) and embeds them under the given encoder, returning a region in that encoder's space. This is how an encoder-ladder study reuses one extraction: the regions differ only in embedding space, never in text.

Usage

sfa_reembed_region(
  region,
  embed = "sbert",
  model = NULL,
  cache = TRUE,
  file = NULL
)

Arguments

region

An "sfa_region" (or path to one).

embed, model, cache

As in sfa_build_region().

file

Optional path to save the re-embedded region.

Value

The "sfa_region" with new embeddings and encoder.


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