search_glob: Select types without performing slow regex search

Description Usage Arguments

View source: R/pattern2fixed.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
search_glob(pattern, types_search, index)

search_glob_multi(patterns, types_search, index)

search_regex(pattern, types_search, case_insensitive)

search_regex_multi(patterns, types_search, case_insensitive)

search_fixed(pattern, types_search, index)

search_fixed_multi(patterns, types_search, index)

Arguments

pattern

a "glob", "fixed" or "regex" pattern

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

patterns

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

case_insensitive

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


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