clean_windows: Extract windows of words around a focal pattern.

Description Usage Arguments Value Author(s)

View source: R/clean_windows.R

Description

Extract windows of words around a regex pattern.

Usage

1
clean_windows(text, pattern, before = 3, after = 3)

Arguments

text

Character string. String from which the windows should be extracted.

pattern

Character string. Regex pattern around which the adjacent pattern has to be detected within the window.

before

Integer. Number of words to extract before the pattern.

after

Integer. Number of words to extract after the pattern.

Value

A list of windows around each occurrences of the focal pattern.

Author(s)

Nicolas Mangin


NicolasJBM/lexR documentation built on Feb. 4, 2021, 6:43 p.m.