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_paramingetContextand 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_paramingetContextand thusfilterWeight).- sup_weight_fun
Function that takes the output of
weight_param_funas input and returnsTRUEif weighting values should be added as superindices andFALSEif 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.
