textstat_context {LSX} | R Documentation |
Identify context words using user-provided patterns
Description
Identify context words using user-provided patterns
Usage
textstat_context(
x,
pattern,
valuetype = c("glob", "regex", "fixed"),
case_insensitive = TRUE,
window = 10,
min_count = 10,
remove_pattern = TRUE,
n = 1,
skip = 0,
...
)
char_context(
x,
pattern,
valuetype = c("glob", "regex", "fixed"),
case_insensitive = TRUE,
window = 10,
min_count = 10,
remove_pattern = TRUE,
p = 0.001,
n = 1,
skip = 0
)
Arguments
x |
a tokens object created by |
pattern |
|
valuetype |
the type of pattern matching: |
case_insensitive |
if |
window |
size of window for collocation analysis. |
min_count |
minimum frequency of words within the window to be considered as collocations. |
remove_pattern |
if |
n |
integer vector specifying the number of elements to be concatenated
in each n-gram. Each element of this vector will define a |
skip |
integer vector specifying the adjacency skip size for tokens
forming the n-grams, default is 0 for only immediately neighbouring words.
For |
... |
additional arguments passed to |
p |
threshold for statistical significance of collocations. |
See Also
tokens_select()
and textstat_keyness()