Learn R Programming

quanteda (version 1.3.13)

search_glob: Select types without performing slow regex search

Description

This is an internal function for pattern2id that select types using keys in index when available.

Usage

search_glob(patterns, types_search, index)

search_regex(patterns, types_search, case_insensitive)

search_fixed(patterns, types_search, index)

Arguments

patterns

a list of "glob", "fixed" or "regex" patterns

types_search

lowercased types when case_insensitive=TRUE, but not used in glob and fixed matching as types are in the index.

index

index object created by index_types

case_insensitive

ignore case when matching, if TRUE, but not used in glob and fixed matching as types are lowercased in the index.