Description Usage Arguments Value
Compute how often a given set of words (descriptors) occur within a given window around another set of words (phenomena) within a text. This can be computed as a ration of n occurrences descriptor/n total words in window or n occurrences descriptor / n occurrences phenomena.
1 2 3 4 5 6 7 8 | bow_analysis(
corpus,
phenomenon,
descriptors,
window = 10,
per_occurrence = TRUE,
own_regex = FALSE
)
|
corpus |
the text or texts to be analyzed as a list of character vectors |
phenomenon |
a list of character vectors (or list of regular expressions if own_regex == TRUE) with terms around which descriptor terms are searched |
descriptors |
a list of characters vectors (or list of regular expressions if own_regex == TRUE) with descriptor terms to search |
window |
number of words left and right of a phenomenon term to be searched for a descriptor |
per_occurrence |
when TRUE divide the number of descriptor occurrences by the number of phenomena occurrences. when FALSE divide the number of descriptor occurrences by the total number of words within the windows around phenomena. Default TRUE. |
own_regex |
when TRUE allows you to add custom regular expressions for phenomenon and descriptors. when FALSE rbow will construct regular expression from the character vectors you supplied. defaults to FALSE |
list of analyzed texts. Each text list contains a list of results for each analyzed phenomenon. each phenomenon list contains a data frame summarizing the average number of descriptors occurrences for that phenomenon and a list of numeric vectors for each descriptor indicating the number of descriptor terms within a window for each phenomenon occurrence.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.