Tailor weighting function to a lemma
Arguments
- cws
Dataframe with one row per token per context word, output of
setupConcordancer
.- foc_param_fun
Function that takes the name of a model and returns a character string with first-order filters (to be used as
foc_param
ingetContext
and thusfilterFoc
).- weight_param_fun
Function that takes the name of a model and returns a character string with weighting filters (to be used as
weight_param
ingetContext
and thusfilterWeight
).- sup_weight_fun
Function that takes the output of
weight_param_fun
as input and returnsTRUE
if weighting values should be added as superindices andFALSE
if they should not. To be fed tofilterWeight
.- ...
Arguments to be passed to
getContext
.
Value
Function that takes a token ID, a list of context words and a model name
as input and calls getContext
.