get_keywords: Get Keywords

get_keywordsR Documentation

Get Keywords

Description

Gets keywords to feed to 'active_EM()', depending on on scheme type.

Usage

get_keywords(
  docs,
  dfm,
  num_keywords = 10,
  scheme = c("max_eta_raw", "max_eta_ratio"),
  verbose = TRUE
)

Arguments

docs

Documents table, same as for 'active_EM()'.

dfm

Quanteda document-feature matrix matching 'docs'.

num_keywords

Number of keywords selected for each class.

scheme

Keyword selection scheme. "max_eta_raw" finds selects based on maximum eta values for positive and negative classes. "max_eta_ratio" selects based on ratio between eta values for positive and negative classes.

verbose

If 'TRUE', prints out keywords to console.

Value

List of length 2. First element is vector of keywords for negative class, second element is vector of keywords for positive class.


activetext/activeR documentation built on May 31, 2024, 10:21 a.m.