weightConcordance | R Documentation |
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
.
weightConcordance(variables, cws, lemma, ...)
variables |
Dataframe with one row per token ID and at least columns
prefixed by |
cws |
Dataframe with one row per token ID per context word as outputted
by |
lemma |
Name of the lemma, to process model names |
... |
Arguments to be passed to |
Enriched variables
dataframe with columns containing weighted
concordance lines.
## Not run: cws <- setupConcordancer(lemma, input_dir) variables <- readr::read_tsv('path/to/file', lazy = F) ctxts <- weightConcordance(variables, cws, lemma) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.