View source: R/bt_update_core_kw_filter.R
bt_update_core_kw_filter | R Documentation |
Set relevant/classify based on keywords Use bt_leads_df_kw_filter() keeping/discarding leads based on keywords
bt_update_core_kw_filter(
update.core,
key.words,
positive = T,
filter.cols = c("act.title.en", "act.description.en", "act.title.ll",
"act.description.ll"),
case.sensitive = F,
only.keep.matches = T,
save.match.words = F,
assign.relevance = T
)
update.core |
dataframe to be filtered |
key.words |
character vector of words/phrases to filter (regex) |
positive |
if F, entries containing the key.words will be discarded. |
filter.cols |
which columns to use for filtering |
only.keep.matches |
if True, sets all relevant/classify to 0 first |
save.match.words |
if True, add a column "key.words" containing all the words that generated matches |
assign.relevance |
if True, assign the relevant and classify 0/1 to the returned df. default is TRUE |
filtered dataframe
bt_update_core_kw_filter(update.core, c("(import|export) tariff", "illegal trade practices"), filter.cols = "act.title.en")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.