Description Usage Arguments Value Examples
q_collocations
performs collocation analysis of a query match. If
query match is longer than one token the context is build around the entire
length of the query match. E.g. if context = 3
, three tokens before
the first token of the match and three tokens after the last token of the
match are taken into account. In case two or more numeric collocation windows
overlap, tokens are counted multiple times. However, if more than one match
fall within a structural region, only unique structural regions are
considered.
1 | q_collocations(query_result, context, pattr = "word", exclude_match = T)
|
query_result |
list of class query result returned from
|
context |
integer vector of length one: number of tokens around the query match. integer vector of length two: number of tokens to the left and right. character: structural attribute (e.g. "s"). |
pattr |
character specifying positional attribute (e.g. "word"). |
exclude_match |
logical indicating whether the matched tokens themselves should be excluded from the analysis. |
data.table of collocators and frequencies.
1 2 3 | ## Not run: q_collocations(my_query_result, context = 3)
## Not run: q_collocations(my_query_result, context = c(2, 0))
## Not run: q_collocations(my_query_result, context = "s", pattr = "lemma", exclude_match = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.