Learn R Programming

quanteda (version 2.1.2)

valuetype: Pattern matching using valuetype

Description

Pattern matching in quanteda using the valuetype argument.

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

Details

Pattern matching in in quanteda uses "glob"-style pattern matching as the default, because this is simpler than regular expression matching while addressing most users' needs. It is also has the advantage of being identical to fixed pattern matching when the wildcard characters (* and ?) are not used. Finally, most dictionary formats use glob matching.

"glob"

"glob"-style wildcard expressions, the quanteda default. The implementation used in quanteda uses * to match any number of any characters including none, and ? to match any single character. See also utils::glob2rx() and References below.

"regex"

Regular expression matching.

"fixed"

Fixed (literal) pattern matching.

See Also

utils::glob2rx(), glob pattern matching (Wikipedia), stringi::stringi-search-regex(), stringi::stringi-search-fixed()