The function generates a tidy concordance for a search pattern in a (set of) corpus (files). The function requires the corpus file(s) loaded and ready in the console as a vector of text with more than one line of texts/sentences. Each line should not correspond to one sentence. See Examples below for details.

concord_others(
  corpus_vector = "character vector of text loaded/read into console",
  pattern = "regular expressions",
  to_lower_corpus = TRUE,
  case_insensitive = TRUE,
  context_char = 50
)

Arguments

corpus_vector

the vector of corpus texts.

pattern

regular expressions for the search pattern.

to_lower_corpus

whether to lowercase the corpus (TRUE -- the default) first or leave it as is (FALSE).

case_insensitive

whether to ignore the case for the search pattern argument (TRUE -- the default) or not (FALSE).

context_char

integer vector for the specified number of character as context to the left and right of the node pattern.

Value

A tibble/data frame for the concordance match with LEFT and RIGHT contexts.

Examples