View source: R/get_collocations.R
get_collocations | R Documentation |
This function retrieves collocation data from a corpus using a given word and a list of unique identifiers (pids) of corpus data frame.
get_collocations(pids, word, before = 10, after = 10, sample_size = 5000)
pids |
A vector or data frame containing the unique identifiers of the texts in the corpus. |
word |
The target word for which you want to find concordances. |
before |
The number of words before the target word to include in the context (default is 10). |
after |
The number of words after the target word to include in the context (default is 10). |
sample_size |
The number of samples to retrieve from the API (default is 5000). |
A data frame of concordances.
pids <- c("URN:NBN:no-nb_digibok_2008051404065", "URN:NBN:no-nb_digibok_2010092120011")
word <- "."
collocations <- get_collocations(pids, word)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.