pattern2list: Convert various input as pattern to a vector used in...

Description Usage Arguments See Also

View source: R/utils.R

Description

Convert various input as pattern to a vector used in tokens_select, tokens_compound and kwic.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pattern2list(
  x,
  types,
  valuetype,
  case_insensitive,
  concatenator = "_",
  levels = 1,
  remove_unigram = FALSE,
  keep_nomatch = FALSE
)

Arguments

valuetype

the type of pattern matching: "glob" for "glob"-style wildcard expressions; "regex" for regular expressions; or "fixed" for exact matching. See valuetype for details.

case_insensitive

logical; if TRUE, ignore case when matching a pattern or dictionary values

concatenator

concatenator that join multi-word expression in tokens object

levels

only used when pattern is a dictionary

remove_unigram

ignore single-word patterns if TRUE

See Also

pattern2id()


koheiw/quanteda.core documentation built on Sept. 21, 2020, 3:44 p.m.