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 )
corpus_vector | the vector of corpus texts. |
---|---|
pattern | regular expressions for the search pattern. |
to_lower_corpus | whether to lowercase the corpus ( |
case_insensitive | whether to ignore the case for the search |
context_char | integer vector for the specified number of character as context to the left and right of the node pattern. |
A tibble/data frame for the concordance match with LEFT
and RIGHT
contexts.