View source: R/regions_multi.R
| sfa_build_regions | R Documentation |
The campaign-scale companion to sfa_build_region(): streams the corpus
once and extracts sentences for every construct simultaneously, then
builds one "sfa_region" per construct. Variants are matched on word
boundaries (a component like "care" must not match "career"), which
also makes compositional names safe: a construct like Honesty-Humility
is gathered through variants = c("honesty", "humility").
sfa_build_regions(
constructs,
corpus = "fineweb-10bt",
target = 1500,
max_docs = 2e+07,
sentences_per_doc = 3,
min_chars = 30,
max_chars = 500,
embeddings = TRUE,
embed = "sbert",
model = NULL,
cache = TRUE,
instruction = TRUE,
dir = NULL,
progress = TRUE
)
constructs |
Named list: construct name -> |
corpus |
|
target, max_docs, sentences_per_doc, min_chars, max_chars |
As in
|
embeddings |
Embed each region now? |
embed, model, cache, instruction |
As in |
dir |
Optional directory: each region is saved as
|
progress |
Print streaming progress? Default |
For encoder-ladder studies, build once with embeddings = FALSE (a pure
extraction; no encoder touched) and embed the same sentence sets under
each encoder with sfa_reembed_region() - the regions differ only in
the embedding space, never in their text.
A named list of "sfa_region" objects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.