A function to retrieve a full-sentence citation for a match/pattern. This function can be used to check the full sentence in which a word/pattern occur in a corpus. This can be a useful follow-up upon inspecting the wordlist results derived via freqlist_leipzig_each function.

freqlist_leipzig_citation(
  pattern = NULL,
  leipzig_path = "(full) filepath to Leipzig corpus files",
  case_insensitive = TRUE
)

Arguments

pattern

regular expressions/strings of the target words/patterns.

leipzig_path

complete file path of the Leipzig corpora to search for full citation of the words/patterns of interest.

case_insensitive

whether to search case-insensitive pattern (TRUE -- the default) or not (FALSE).

Value

A tibble containing the info for 'corpus names', 'sentence number', 'node word', and 'sentence match'.