This code assumes that the lists of context words are stored in columns
starting with _cws
, followed by the name of the lemma and a model name
from which first-order parameter settings can be extracted (all separated
by periods). Then it creates
the weighted concordance lines and stores them in columns following the same
name pattern, but starting with _ctxt
. In addition, it creates a non
weighted column _ctxt.raw
.
Arguments
- variables
Dataframe with one row per token ID and at least columns prefixed by
_cws.
with semicolon-separated context words.- cws
Dataframe with one row per token ID per context word as outputted by
setupConcordancer
.- lemma
Name of the lemma, to process model names
- ...
Arguments to be passed to
weightLemma
andgetContext
, in order to adapt to different ways of coding parameter settings. Seevignette('weightConcordance')
.
Examples
if (FALSE) {
cws <- setupConcordancer(lemma, input_dir)
variables <- readr::read_tsv('path/to/file', lazy = F)
ctxts <- weightConcordance(variables, cws, lemma)
}